/* Basic Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Color Palette Variables - Deeper Refinement */
:root {
    --primary-dark-blue: #0B2042; /* Slightly darker, deeper blue for gravitas */
    --primary-blue: #2E7BBF;    /* Inviting, mid-tone blue */
    --secondary-blue-light: #EBF2F7; /* NEW: Very light blue for subtle section backgrounds */
    --accent-orange: #FF7F00;   /* Vibrant, warm orange */
    --accent-orange-hover: #E56F00; /* Slightly different hover for orange */

    --light-grey-bg: #F7F9FC;   /* Even softer, cooler off-white background */
    --white-card: #FFFFFF;      /* Pure white for content cards */

    --text-dark: #2C3E50;       /* More sophisticated dark grey for main text */
    --text-medium: #6A7B8C;     /* Softer medium grey for secondary text */
    --text-light: #F8F8F8;      /* Near white for text on dark backgrounds */

    --border-subtle: #DCDCDC;    /* NEW: A very subtle light grey border color */

    /* Enhanced Shadow System for More Depth */
    --shadow-soft: rgba(0, 0, 0, 0.04);  /* Very light, diffused */
    --shadow-elevated: rgba(0, 0, 0, 0.1);  /* More distinct, but still soft */
    --shadow-deep: rgba(0, 0, 0, 0.2); /* Pronounced for strong elevation */

    --header-height: 95px; /* Adjusted for better proportion */

    /* New colors for table */
    --table-header-bg: var(--primary-dark-blue); /* Dark blue for header */
    --table-header-text: var(--text-light);
    --table-row-even-bg: #F0F4F8; /* Light grey-blue for even rows */
    --table-row-odd-bg: var(--white-card); /* White for odd rows */
    --table-border-color: var(--border-subtle);
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7; /* Increased for better readability */
    color: var(--text-dark);
    background-color: var(--light-grey-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body.nav-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px; /* Consistent horizontal padding */
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: var(--primary-dark-blue);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-dark-blue);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px; /* Subtle letter spacing for headings */
}

h2 {
    text-align: center;
    margin-top: 60px; /* Increased top margin for sections */
    font-size: 3.4em; /* Slightly larger and more impactful */
    position: relative;
    padding-bottom: 22px; /* Increased padding for prominent underline */
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 110px; /* Wider underline */
    height: 6px; /* Thicker underline */
    background-color: var(--primary-blue);
    border-radius: 3px;
}

section {
    padding: 80px 0; /* More vertical padding for sections */
    background-color: var(--white-card);
    margin-bottom: 35px; /* More space between sections */
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-soft); /* Softer initial shadow */
    transition: all 0.4s ease;
    border: 1px solid var(--border-subtle); /* NEW: Subtle border for definition */
}

/* Header */
.header {
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
    padding: 15px 0;
    box-shadow: 0 8px 25px var(--shadow-deep); /* Deeper header shadow */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    min-height: var(--header-height);
}

/* --- LOGO STYLES --- */
.logo a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: transform 0.3s ease, filter 0.3s ease; /* Animation for logo */
}

.logo a:hover {
    transform: scale(1.02);
    filter: brightness(1.2);
}

.main-logo-img {
    max-height: 70px;
    width: auto;
    display: block;
}

.logo-icon-img {
    max-height: 65px;
    width: auto;
    display: block;
}
/* --- END LOGO STYLES --- */

/* --- Mobile Navigation (Hamburger Menu) Styles --- */
/* Default (Desktop) State */
.menu-toggle {
    display: none; /* Hidden by default on larger screens */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
    margin-left: 20px;
}

.hamburger {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-light);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-light);
    position: absolute;
    transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger::before {
    top: -10px;
}

.hamburger::after {
    top: 10px;
}

/* Animation for 'X' shape */
.menu-toggle.is-active .hamburger {
    background-color: transparent;
}

.menu-toggle.is-active .hamburger::before {
    transform: translateY(10px) rotate(45deg);
}

.menu-toggle.is-active .hamburger::after {
    transform: translateY(-10px) rotate(-45deg);
}

/* Regular Navbar (Desktop) */
.navbar ul {
    list-style: none;
    display: flex;
    margin: 0;
}

.navbar ul li {
    margin-left: 35px; /* Increased spacing between nav items */
}

.navbar ul li a {
    color: var(--text-light);
    font-weight: 600;
    padding: 10px 0; /* Adjusted padding for underline effect */
    position: relative; /* For ::after underline */
    transition: color 0.3s ease;
}

/* Underline animation for nav links */
.navbar ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px; /* Position below text */
    left: 0;
    width: 0; /* Start hidden */
    height: 3px;
    background-color: var(--accent-orange); /* Use accent color for underline */
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar ul li a:hover::after,
.navbar ul li a.active::after { /* Add 'active' class to current page link via JS if needed */
    width: 100%; /* Expand on hover/active */
}

.navbar ul li a:hover {
    color: var(--accent-orange); /* Change text color on hover */
    text-decoration: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('../assets/images/hero_background.jpg') no-repeat center center/cover;
    color: #fff;
    padding: 180px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 700px; /* Slightly increased height */
    margin-bottom: 35px;
    border-radius: 15px;
    box-shadow: 0 18px 45px var(--shadow-deep); /* Deeper, more impactful shadow */
    text-align: center;
    border: 1px solid var(--border-subtle); /* Subtle border for definition */
}

.hero-content {
    max-width: 950px; /* Slightly increased max-width */
}

.hero-section h1 {
    font-size: 5.2em; /* Slightly larger */
    margin-bottom: 28px;
    color: #fff;
    font-weight: 700;
    text-shadow: 4px 4px 12px rgba(0,0,0,0.7); /* Stronger text shadow */
    letter-spacing: 1px; /* Subtle letter spacing for hero title */
}

.hero-section p {
    font-size: 1.9em; /* Slightly larger sub-text */
    margin-bottom: 45px; /* More space before button */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    line-height: 1.6;
    letter-spacing: 0.2px; /* Subtle letter spacing */
}

.hero-section .btn {
    display: inline-block;
    background-color: var(--accent-orange);
    color: var(--text-light) !important;
    padding: 22px 55px; /* More generous padding */
    border-radius: 50px;
    font-size: 1.5em; /* Larger font size for button */
    font-weight: 700;
    letter-spacing: 1.5px; /* Increased letter spacing */
    text-transform: uppercase; /* NEW: Uppercase text for strong CTA */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35); /* Stronger button shadow */
    outline: none; /* Remove default outline on focus */
}

.hero-section .btn:hover {
    background-color: var(--accent-orange-hover);
    text-decoration: none;
    transform: translateY(-10px); /* More pronounced lift effect */
    box-shadow: 0 12px 30px rgba(0,0,0,0.5); /* Deeper shadow on hover */
}

/* Programs, Faculties, Institutions, Tests Sections - Grid/Flex Layouts */
.programs-grid, .faculty-grid, .tests-list {
    display: grid;
    gap: 40px;
    margin-top: 55px; /* More space below section title */
    padding: 0 25px; /* Ensure grid items don't touch container edges */
}

.programs-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.faculty-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Institutions Grid for Cards (Re-enabled) */
.institutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 55px;
    padding: 0 25px;
}


.card {
    background-color: var(--white-card);
    border: 1px solid var(--border-subtle); /* NEW: Subtle border */
    border-radius: 15px;
    padding: 38px; /* More internal padding */
    text-align: center;
    box-shadow: 0 6px 20px var(--shadow-soft), 0 2px 8px var(--shadow-soft); /* Layered shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-12px); /* More pronounced lift */
    box-shadow: 0 15px 40px var(--shadow-elevated), 0 5px 15px var(--shadow-elevated); /* Deeper layered shadow on hover */
    border-color: var(--primary-blue); /* Highlight border on hover */
}

.card h3 {
    color: var(--primary-blue);
    font-size: 2.1em; /* Slightly larger */
    margin-bottom: 20px;
}

.card p {
    font-size: 1.18em; /* Slightly larger font */
    color: var(--text-medium);
    line-height: 1.7;
}

/* Faculty Specific Styles */
.faculty-card {
    align-items: center;
}

.faculty-card img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 30px;
    border: 6px solid var(--primary-blue);
    box-shadow: 0 0 0 10px rgba(46,123,191,0.15);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease; /* Add transform transition */
}

.faculty-card img:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 10px rgba(255,127,0,0.25);
    transform: scale(1.03); /* Subtle scale on hover */
}

.faculty-card h3 {
    margin-bottom: 12px;
    font-size: 2em;
}

.faculty-card .designation {
    font-style: italic;
    color: var(--text-medium);
    margin-bottom: 28px;
    font-size: 1.15em;
}

.faculty-card h4 {
    color: var(--primary-dark-blue);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.45em;
    font-weight: 600;
}

.faculty-card ul {
    list-style: none;
    text-align: left;
    width: 100%;
    padding: 0 20px;
}

.faculty-card ul li {
    background-color: var(--secondary-blue-light); /* Lighter blue for list items */
    border-left: 5px solid var(--primary-blue);
    padding: 14px 25px; /* More padding */
    margin-bottom: 14px; /* More space */
    border-radius: 8px;
    font-size: 1.1em; /* Slightly larger font */
    box-shadow: 0 2px 6px var(--shadow-soft);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.faculty-card ul li:hover {
    background-color: #DAE7F0; /* Slightly darker on hover */
    border-color: var(--accent-orange);
}

/* Institution Specific Styles (Re-enabled for cards) */
.institution-card {
    text-align: left;
}
.institution-card img {
    max-width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 28px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
    filter: grayscale(80%);
    transition: filter 0.4s ease;
    margin-left: auto;
    margin-right: auto;
}

.institution-card img:hover {
    filter: grayscale(0%);
}

.institution-card h3 {
    font-size: 2.4em;
    margin-bottom: 12px;
}

.institution-card .city {
    color: var(--text-medium);
    font-size: 1.25em;
    margin-bottom: 20px;
}

.institution-card p {
    font-size: 1.15em;
    color: var(--text-medium);
    margin-bottom: 10px;
    line-height: 1.6;
}

.institution-card p strong {
    color: var(--primary-dark-blue);
    font-weight: 600;
    margin-right: 5px;
}

.institution-card a.btn { /* Target specifically the button within the card */
    display: inline-block;
    background-color: var(--accent-orange);
    color: var(--text-light) !important;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.25em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
    margin-top: 20px;
    align-self: center;
}

.institution-card a.btn:hover {
    background-color: var(--accent-orange-hover);
    text-decoration: none;
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.35);
}


/* Tests Section */
.tests-list {
    flex-direction: column;
    gap: 35px; /* More space between test items */
}

.test-item {
    background-color: var(--white-card);
    border: 1px solid var(--border-subtle); /* Subtle border */
    padding: 35px; /* More padding */
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.test-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px var(--shadow-elevated);
    border-color: var(--primary-blue); /* Highlight border on hover */
}

.test-item h3 {
    color: var(--primary-blue);
    font-size: 2.1em;
    margin-bottom: 18px;
}

.test-item p {
    font-size: 1.2em;
    margin-bottom: 10px; /* Adjusted margin for more data fields */
    line-height: 1.6;
    color: var(--text-medium);
}

.test-item p strong { /* NEW: Styling for strong tags in test items */
    color: var(--primary-dark-blue);
    font-weight: 600;
    margin-right: 5px;
}

/* General Page Layout */
main {
    flex: 1;
}

/* Contact Section */
.contact-section {
    background-color: var(--white-card);
    text-align: center;
    padding-top: 60px; /* Consistent top padding for standalone sections */
    padding-bottom: 80px; /* Consistent bottom padding */
    border-radius: 15px; /* Ensure consistency */
    box-shadow: 0 8px 30px var(--shadow-soft); /* Ensure consistency */
    border: 1px solid var(--border-subtle); /* Ensure consistency */
}

.contact-section h2 {
    margin-top: 0;
    padding-bottom: 18px;
}
.contact-section h2::after {
    bottom: 0;
}

.contact-section p {
    font-size: 1.35em; /* Slightly larger */
    margin-bottom: 18px;
    line-height: 1.6;
    color: var(--text-dark);
}


/* For specific pages, adjust padding/margin */
#programs-page,
#faculties-page,
#tests-page { /* All full-page sections */
    padding-top: 70px;
    padding-bottom: 90px;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 0; /* No border-radius for full-width sections */
    box-shadow: none; /* No shadow for full-width sections */
    border: none; /* No border for full-width sections */
    background-color: var(--light-grey-bg); /* Use light grey background for these full sections */
}
/* Ensure the content within these pages still gets container padding */
#programs-page .container,
#faculties-page .container,
#tests-page .container {
    padding: 0 25px; /* Explicitly set horizontal padding */
}

/* Institutions Section - Table Specific Styles */
/* These styles are now more generic and will apply wherever the table is rendered */
.institutions-section h2, /* Keep this for the table title on programs page */
#programs-institutions-table-container h2 { /* Target the new container for the table title */
    margin-top: 60px; /* Ensure consistent top margin for titles */
    margin-bottom: 10px; /* Adjust margin for the note */
}

.institutions-section .data-note, /* Keep this for the table note on programs page */
#programs-institutions-table-container .data-note { /* Target the new container for the table note */
    text-align: right;
    font-size: 0.9em;
    color: var(--text-medium);
    margin-bottom: 30px; /* Space between note and table */
    padding-right: 25px; /* Align with container padding */
}

.table-responsive {
    overflow-x: auto; /* Enable horizontal scrolling on small screens */
    width: 100%;
    margin-top: 20px;
    border-radius: 15px; /* Rounded corners for the whole table container */
    box-shadow: 0 8px 30px var(--shadow-soft);
    border: 1px solid var(--border-subtle);
    background-color: var(--white-card); /* Background for the table itself */
}

.institutions-table {
    width: 100%;
    border-collapse: collapse; /* Remove space between borders */
    min-width: 700px; /* Ensure table doesn't get too narrow on small screens */
    font-size: 1.05em;
    line-height: 1.5;
}

.institutions-table th,
.institutions-table td {
    padding: 18px 25px; /* Generous padding */
    text-align: left;
    border-bottom: 1px solid var(--table-border-color);
}

.institutions-table th {
    background-color: var(--primary-dark-blue);
    color: var(--table-header-text);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky; /* Keep header visible on scroll */
    top: 0;
    z-index: 1;
}

.institutions-table tbody tr:nth-child(even) {
    background-color: var(--table-row-even-bg);
}

.institutions-table tbody tr:hover {
    background-color: #DDE7F0; /* Slightly darker hover for rows */
    cursor: pointer;
}

/* Specific column widths for better layout */
.institutions-table th:first-child,
.institutions-table td:first-child {
    width: 35%; /* Give more space to institute name */
}
.institutions-table th:nth-child(2),
.institutions-table td:nth-child(2) {
    width: 10%; /* Category */
}
.institutions-table th:nth-child(3),
.institutions-table td:nth-child(3) {
    width: 25%; /* Exams Accepted */
}
.institutions-table th:nth-child(4),
.institutions-table td:nth-child(4) {
    width: 15%; /* Avg Salary */
}
.institutions-table th:last-child,
.institutions-table td:last-child {
    width: 15%; /* Total Fees */
}

/* The problematic block that was hiding institution cards is now removed */


/* Footer */
.footer {
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
    text-align: center;
    padding: 38px 0; /* More padding */
    margin-top: auto;
    font-size: 1.08em; /* Slightly larger font */
}

/* Placeholder for images */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Responsive Adjustments */
/* Tablet and smaller screens (up to 992px) - THIS IS WHERE THE NAV SWITCH OCCURS */
@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }

    h2 {
        font-size: 2.8em;
        padding-bottom: 18px;
    }
    h2::after {
        width: 100px;
        height: 5px;
    }

    /* Hide regular navigation on mobile/tablet */
    .navbar {
        display: none; /* Controlled by JS via body.nav-open when mobile menu is open */
        position: fixed; /* Use fixed for full screen overlay */
        top: var(--header-height); /* Position below header */
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height)); /* Full viewport height minus header */
        background-color: var(--primary-dark-blue);
        overflow-y: auto; /* Enable scrolling if menu items exceed height */
        z-index: 999; /* Below toggle, above content */
        transition: transform 0.3s ease-out;
        transform: translateX(100%); /* Start off-screen to the right */
    }

    .navbar ul {
        flex-direction: column; /* Stack vertically for mobile */
        padding: 30px 0; /* More padding for mobile menu items */
        align-items: center;
        width: 100%;
    }
    .navbar ul li {
        margin: 0; /* Remove horizontal margin */
        width: 100%; /* Make list items full width */
    }
    .navbar ul li a {
        padding: 15px 20px; /* Tighter padding for mobile nav */
        border-bottom: 1px solid rgba(255,255,255,0.08); /* Lighter separator */
        display: block; /* Make links block level */
        text-align: center;
        position: relative; /* Override desktop absolute */
    }
    .navbar ul li:last-child a {
        border-bottom: none;
    }
    .navbar ul li a::after {
        display: none; /* Hide underline animation on mobile nav */
    }
    .navbar ul li a:hover {
        background-color: rgba(0,0,0,0.1); /* Lighter hover for menu */
    }
    .navbar ul li a.active {
        background-color: rgba(0,0,0,0.15); /* Keep active state distinct */
    }

    /* Show hamburger menu toggle on mobile/tablet */
    .menu-toggle {
        display: flex; /* Use flex to center hamburger lines */
        justify-content: center;
        align-items: center;
        width: 50px; /* Explicit width */
        height: 50px; /* Explicit height */
        padding: 10px; /* Padding for the lines inside */
        background-color: var(--primary-blue); /* Solid background for visibility */
        border-radius: 8px; /* Rounded corners for the button */
        flex-shrink: 0; /* Prevent button from shrinking */
    }

    /* Show navigation when .nav-open class is on body */
    body.nav-open .navbar {
        display: block; /* Overrides .navbar { display: none; } */
        transform: translateX(0); /* Slide into view */
    }


    .hero-section {
        padding: 120px 20px;
        min-height: 600px;
    }
    .hero-section h1 {
        font-size: 4.5em;
    }
    .hero-section p {
        font-size: 1.7em;
    }
    .hero-section .btn {
        padding: 20px 45px;
        font-size: 1.4em;
    }

    section {
        padding: 60px 0;
        margin-bottom: 30px;
    }

    .card {
        padding: 32px;
    }
    .card h3 {
        font-size: 1.9em;
    }

    .faculty-card img {
        width: 160px;
        height: 160px;
        border: 5px solid var(--primary-blue);
        box-shadow: 0 0 0 8px rgba(46,123,191,0.15);
    }
    .faculty-card ul li {
        padding: 12px 22px;
    }

    /* Table responsive adjustments */
    .institutions-table {
        min-width: 600px; /* Adjust min-width for smaller tablets */
        font-size: 1em;
    }
    .institutions-table th,
    .institutions-table td {
        padding: 15px 20px;
    }
    .institutions-section .data-note,
    #programs-institutions-table-container .data-note {
        padding-right: 20px;
    }

    .test-item {
        padding: 30px;
    }
    .test-item h3 {
        font-size: 1.9em;
    }
    .test-item p {
        font-size: 1.15em;
    }

    .contact-section p {
        font-size: 1.25em;
    }

    #programs-page .container,
    #faculties-page .container,
    #tests-page .container {
        padding: 0 20px;
    }
    /* Institutions grid for cards on mobile */
    .institutions-grid {
        padding: 0 20px;
    }
}

/* Extra small devices (less than 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 2.8em; /* Further adjusted for very small screens */
        letter-spacing: 0.2px;
    }
    h2 {
        font-size: 2.2em; /* Adjusted further for very small screens */
        margin-top: 35px;
        padding-bottom: 12px;
    }
    h2::after {
        width: 70px;
        height: 3px;
    }

    .hero-section {
        padding: 70px 10px; /* Reduced padding slightly */
        min-height: 400px; /* Adjusted min-height */
    }
    .hero-section h1 {
        font-size: 2.5em; /* Adjusted further */
        margin-bottom: 20px;
    }
    .hero-section p {
        font-size: 1.25em; /* Adjusted further */
        margin-bottom: 25px;
        max-width: 95%;
    }
    .hero-section .btn {
        padding: 12px 25px;
        font-size: 1.05em; /* Adjusted further */
    }

    section {
        padding: 35px 0; /* Reduced padding for very small screens */
        margin-bottom: 15px;
    }

    .card {
        padding: 20px; /* Reduced padding */
    }
    .card h3 {
        font-size: 1.5em; /* Adjusted further */
        margin-bottom: 15px;
    }
    .card p {
        font-size: 0.98em; /* Adjusted further for readability */
    }

    .faculty-card img {
        width: 100px; /* Adjusted further */
        height: 100px; /* Adjusted further */
        border: 3px solid var(--primary-blue);
        box-shadow: 0 0 0 4px rgba(46,123,191,0.08); /* Adjusted glow */
        margin-bottom: 25px;
    }
    .faculty-card h3 {
        font-size: 1.4em; /* Adjusted further */
    }
    .faculty-card ul li {
        font-size: 0.9em; /* Adjusted further */
        padding: 8px 15px;
        margin-bottom: 10px;
    }

    /* Table responsive adjustments */
    .institutions-table {
        min-width: 500px; /* Further adjust min-width for mobile */
        font-size: 0.9em;
    }
    .institutions-table th,
    .institutions-table td {
        padding: 12px 15px;
    }
    .institutions-section .data-note,
    #programs-institutions-table-container .data-note {
        padding-right: 10px;
        font-size: 0.8em;
    }

    .test-item {
        padding: 18px; /* Reduced padding */
    }
    .test-item h3 {
        font-size: 1.5em; /* Adjusted further */
    }
    .test-item p {
        font-size: 0.95em; /* Adjusted further */
    }

    .contact-section p {
        font-size: 1.05em; /* Adjusted further */
    }
    .programs-grid, .faculty-grid, .tests-list, .institutions-grid { /* institutions-grid added */
        padding: 0 10px; /* Tighter padding for very small screens grids */
        gap: 30px;
    }
    #programs-page .container,
    #faculties-page .container,
    #tests-page .container {
        padding: 0 10px; /* Ensure consistency */
    }
    .footer {
        padding: 30px 0;
        font-size: 0.95em;
    }
}
