@media (max-width: 768px)
{
    .nav-boxes {
        flex-direction: column;
        align-items: center;
    }
    .menu-links {
        grid-template-columns: 1fr;
    }
    header {
        padding: 40px 10px;
        font-size: 1.2rem;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    /* ensure the list itself has no left padding and no bullets */
    ul {
        padding-left: 0;
        margin: 0;
        list-style: none;
    }
    /* center each list item and make it a flex container */
    ul li {
        display: flex;
        justify-content: center;
        flex-direction: column;
    }

    /* make the link a block centered element and limit its width */
    ul li a {
        display: block;                /* make margin:auto work */
        width: calc(100% - 40px);      /* small horizontal padding */
        max-width: 480px;              /* avoid overly wide buttons */
        margin: 10px auto;             /* centers the link */
        text-align: center;            /* center link text */
    }
}
    body {
            font-family: Arial, sans-serif;
            font-size: 1rem;
            background-color:  hsl(60, 56%, 91%);
            margin: auto;
            padding: 0;
        }
        img {
            max-width: 100%;
            height: auto;
        }
        header1 {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: #0077cc;
            color: white;
            padding: 10px 20px;
            position: sticky;
            top: 0;
            z-index: 1000;
        }
        .logo {
            font-weight: bold;
            font-size: 20px;
        }
        .logo img {
            max-height: 40px;
            max-width: 100px;
            vertical-align: middle;
            margin-right: 10px;
            height: 20px;
            width: auto;
        }
         .menu-toggle {
            font-size: 24px;
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            position: relative; /* ensure it can be stacked above overlay */
            z-index: 1100; /* higher than overlay (500) but below menu panel */
        }
        /* transform the existing menu element into a panel */
        .menu-links {
            /* become the sliding panel */
            position: fixed;
            top: 0;
            right: 0;
            margin-top: 50px;
            height: 100vh;
            width: min(300px, 60vw);
            max-width: 320px;
            background: #0077cc;
            color: #fff;
            padding: 10px;
            box-sizing: border-box;
            transform: translateX(100%); /* hidden off-screen */
            transition: transform 330ms cubic-bezier(.2,.9,.2,1);
            z-index: 99999; /* ensure menu sits above overlay and content */
            pointer-events: auto; /* ensure links are clickable */
            border-radius: 0; /* square */
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow-y: auto;
        }
        /* overlay behind the panel */
        .menu-overlay {
            position: fixed;
            inset: 0;
            background: rgba(184, 184, 184, 0.45);
            opacity: 0;
            pointer-events: none;
            transition: opacity 280ms ease;
            z-index: 500; /* keep below the header so toggle remains clickable */
        }
        /* when menu is open (body gets .menu-open), show panel and overlay */
        body.menu-open .menu-links { transform: translateX(0); }
        body.menu-open .menu-overlay {
            opacity: 1;
            pointer-events: auto;
        }
        /* style links inside panel */
        .menu-links a {
            top: 10px;
            display: block;
            padding: 20px 30px;
            background: #0077cc;
            color: white;
            text-decoration: none;
            font-weight: bold;
            transition: background-colour 0.3s ease;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }
        .menu-links a:hover { 
            background: #003366;
        }
        /* ensure list/link centering still works */
        ul li a { 
            width: 100%; box-sizing: border-box; 
        }
        header {
            background-image: url(Images/Campus\ IQ\ banner\ 3.jpg);
            background-size: cover;       
            background-position: center;  
            background-repeat: no-repeat;   
            color: white;                
            padding: 120px 60px;
            text-align: center;
        }
        .sub-header {
            background-color: #005fa3;
            color: white;
            padding:  0px;
            text-align: center;
            margin-top: -10px;
            font-size: 1rem;
            font-family: 'Trebuchet MS';
        }
        .sub-header p {
            vertical-align: middle;
            margin: 10px 20px;
            font-size: 1.1rem;
            line-height: 1.6;
        }
        .nav-boxes {
            display: flex;
            flex-wrap: wrap;
            flex-direction: column;
            gap: 20px;
            margin-top: 20px;
            justify-content: center;
        }
        .nav-box {
            display: inline-block;
            background-color: #0077cc;
            color: white;
            text-decoration: none;
            padding: 20px;
            min-width: 200px;
            border-radius: 12px;
            text-align: center;
            font-weight: bold;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            transition: transform 0.2s ease;
        }
        .nav-box:hover {
            transform: scale(1.05);
            background-color: #003366;
        }
        main {
            font-size: 1.1rem;
            font-family:'Lucida Sans';
            padding: 20px;
            text-align: center;
        }
        main h4{
            background-color: #8bccfa;
            margin-top: -10px;
            padding: 20px;
            text-align: left;
            color:  #003366;
            cursor: pointer;
            border-radius: 10px;
            transition: background 0.2s, box-shadow 0.2s;
        }
        main h4.section-link:hover {
            background-color: #0077cc;
            color: #fff;
            box-shadow: 0 2px 10px rgba(0,0,0,0.12);
        }
        html {
            scroll-behavior: smooth;
        }
        ul li a{
            display: inline-block;
            flex-wrap: wrap;
            flex-direction: column;
            margin-top: 10px;
            width: 90%;
            background-color: #0077cc;
            color: white;
            text-decoration: none;
            gap: 20px;
            padding: 20px;
            border-radius: 12px;
            text-align: center;
            font-weight: bold;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            transition: transform 0.2s ease;
        }
        ul li a:hover {
            transform: scale(1.05);
            background-color: #003366;
        }
        section h2 {
            color: #003366;
            margin-bottom: 10px;
        }
        p a{
            color: #0077cc;
            text-decoration: none;
            font-family: 'Trebuchet MS';
        }
        p a:hover {
            text-decoration: underline;
        }
        .featured-universities {
            padding: 40px 20px;
            background-color: #f4faff;
            text-align: center;
        }
        .featured-universities h2 {
            font-size: 2rem;
            color: #003366;
            margin-bottom: 30px;
        }
        .university-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }
        .university-card {
            background-color: white;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            text-align: left;
        }
            .university-card h3 {
            margin-bottom: 10px;
            color: #0077cc;
        }
        .university-card p {
            color: #333;
        }
        .search-section {
            padding: 40px 20px;
            text-align: center;
            background-color: #eef6ff;
        }
        .search-section h2 {
            font-size: 1.8rem;
            color: #003366;
            margin-bottom: 20px;
        }
        .search-bar {
            width: 80%;
            max-width: 500px;
            padding: 12px 16px;
            font-size: 1rem;
            border: 1px solid #ccc;
            border-radius: 8px;
            margin-bottom: 10px;
        }
        .search-button {
            padding: 12px 20px;
            font-size: 1rem;
            background-color: #0077cc;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        .search-button:hover {
            transform: scale(1.05);
            background-color: #003366;
        }
        .result-list {
            margin-top: 20px;
            text-align: left;
        }
        .search-results-header {
            background-color: #005fa3;
            color: white;
            padding:  2px;
            text-align: center;
            margin-top: 0px;
            font-size: 1.5rem;
            font-family: 'Trebuchet MS';
        }
        .search-results {
            padding: 40px 20px;
            text-align: center;
        }
        .searchQueryDisplay {
            font-size: 1.2rem;
            margin-bottom: 20px;
        }
        .result-item {
            background-color: #f9f9f9;
            padding: 10px;
            margin: 10px auto;
            max-width: 600px;
            border-left: 4px solid #0077cc;
            text-align: left;
            border-radius: 8px;
        }
        .result-item h3 {
            margin: 0 0 10px 0;
            color: #0077cc;
        }
        .result-item p {
            margin: 5px 0;
            color: #333;
            font-family: 'Trebuchet MS';
        }
        .result-item a {
            color: #0077cc;
            text-decoration: none;
            margin-right: 10px;
        }
        .result-item a:hover {
            text-decoration: underline;
        }
        main h2 {
            color: #003366;
            margin-bottom: 20px;
            font-family: 'Trebuchet MS';
        }
        .form {
            max-width: 600px;
            margin: 0 auto;
            text-align: left;
            padding: 40px 40px 20px 20px;
            background-color: #f4faff;
            border-radius: 12px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            font-family: 'Trebuchet MS';
        }
        .form label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            font-size: 1rem;
        }
        .form input {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 6px;
            font-size: 1rem;
            font-family: 'Trebuchet MS';
        }
        .form textarea {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 6px;
            font-size: 1rem;
            font-family: 'Trebuchet MS';
            resize: vertical;
        }
        .form button {
            padding: 12px 20px;
            font-size: 1rem;
            font-family: 'Trebuchet MS';
            background-color: #0077cc;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        .form button:hover {
            background-color: #003366;
        }
        .note {
            font-size: 0.9rem;
            color: #555;
            margin-top: 20px;
            margin-bottom: 20px;
            font-family: 'Trebuchet MS';
        }
        .methods {
            margin-top: 20px;
            font-size: 1rem;
            font-family: 'Trebuchet MS';
            color: #333;
        }
        .about-section {
            max-width: 800px;
            margin: 0 auto;
            text-align: left;
            padding: 20px;
            background-color: #f4faff;
            border-radius: 12px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            font-family: 'Trebuchet MS';
        }
        .privacy-policy {
            max-width: 800px;
            margin: 0 auto;
            text-align: left;
            padding: 20px;
            background-color: #f4faff;
            border-radius: 12px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            font-family: 'Trebuchet MS';
        }
        footer {
            background-color: #003366;
            color: white;
            padding: 20px 10px 10px;
            font-size: 0.9rem;
        }
        .footer-content {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            gap: 10px;
        }
        .footer-section {
            flex: 1 1 100px
        }
        .footer-section h4 {
            margin-bottom: 10px;
            font-size: 1.1rem;
        }
        .footer-section a {
            display: block;
            color: white;
            text-decoration: none;
            margin-bottom: 6px;
            transition: color 0.3s ease;
        }
        .footer-section a:hover {
            color: #00ccff;
        }
        .footer-bottom {
            text-align: center;
            margin-top: 30px;
            border-top: 1px solid #005fa3;
            padding-top: 10px;
        }