/* ========================================
   SHAHEEN PUBLIC HIGH SCHOOL - Premium Theme
   Design system: tokens, layout, components
   ======================================== */

/* Color Variables (values are injected dynamically by theme_helper.php — DO NOT change these here) */
:root {
    --primary-color: #0B4DA2;
    --secondary-color: #FFFFFF;
    --accent-color: #F9C900;

    /* Neutral palette */
    --ink: #10151f;
    --text-dark: #1c2430;
    --text-light: #5c6672;
    --muted: #8892a0;
    --border-color: #e7e9ee;
    --bg-light: #f6f8fb;
    --surface: #ffffff;

    /* Derived accents (graceful fallback to solid colors if color-mix unsupported) */
    --primary-dark: #0a3a7a;
    --primary-dark: color-mix(in srgb, var(--primary-color) 78%, black);
    --primary-soft: #eaf1fb;
    --primary-soft: color-mix(in srgb, var(--primary-color) 8%, white);
    --accent-dark: #d1a900;
    --accent-dark: color-mix(in srgb, var(--accent-color) 80%, black);

    /* Typography */
    --font-display: 'Plus Jakarta Sans', 'Poppins', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Radii */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-xs: 0 2px 8px rgba(16, 21, 31, 0.06);
    --shadow-sm: 0 8px 24px rgba(16, 21, 31, 0.08);
    --shadow-md: 0 16px 40px rgba(16, 21, 31, 0.10);
    --shadow-lg: 0 30px 70px rgba(16, 21, 31, 0.14);
    --shadow: var(--shadow-sm);
    --shadow-lg-legacy: var(--shadow-md);

    /* Layout */
    --container-width: 1240px;
    --transition: 500ms cubic-bezier(.4,0,.2,1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

hero_img {
    max-width: 100%;
    height: auto;
    display: block;
    animation:zoomEffect 10s infinite alternate;   
}

@keyframes ZoomEffect{
    0% { transform:scale(1);}
    100% {transform:scale(1.1);}
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

ul {
    list-style: none;
}

p {
    color: var(--text-light);
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 25px;
}

/* ========================================
   Header & Navigation
   ======================================== */
header {
    background: var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--transition);
}

header.is-scrolled {
    box-shadow: var(--shadow-sm);
}

/* Tier 1: Topbar (brand, contact, social, apply) */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 0 1 auto;
}

.brand-logo {
    height: 90px;
    width: 90px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.brand-text strong {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-text small {
    font-size: 11.5px;
    color: var(--text-light);
    letter-spacing: .01em;
    white-space: nowrap;
}

.topbar-info {
    display: none;
    align-items: center;
    gap: 24px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.info-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    transition: background var(--transition);
}

.info-item:hover .info-icon {
    background: var(--accent-color);
    color: var(--ink);
}

.info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.info-text small {
    font-size: 11px;
    color: var(--text-light);
}

.info-text strong {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.topbar-social {
    display: none;
    align-items: center;
    gap: 8px;
}

.soc {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: transform var(--transition), filter var(--transition);
}

.soc:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.soc-fb { background: #1877f2; }
.soc-ig { background: linear-gradient(135deg, #f58529, #dd2a7b 45%, #8134af 70%, #515bd4); }
.soc-yt { background: #ff0000; }
.soc-tw { background: #14171a; }

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: background var(--transition), color var(--transition);
}

.icon-btn:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    background: var(--accent-color);
    color: var(--ink);
    font-weight: 700;
    font-size: 13.5px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    filter: brightness(1.04);
}

/* Search panel (Tier 1 dropdown) */
.search-panel {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.search-panel-inner {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
}

.search-panel-inner input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text-dark);
}

.search-panel-inner input[type="search"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-panel-inner button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
}

.search-panel-inner button:hover {
    background: var(--primary-dark);
}

/* Tier 2: Main navigation (dark bar) */
header > nav {
    background: var(--ink);
    padding: 0;
}

header > nav .container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    gap: 2px;
    align-items: center;
}

.nav-links a {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.82);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 17px 18px;
    position: relative;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.nav-links a.active {
    color: var(--accent-color);
    background: rgba(255,255,255,0.06);
}

/* Dropdown Menu */
.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.nav-links .dropdown-toggle i {
    font-size: 11px;
    transition: transform var(--transition);
}

.nav-links .dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    min-width: 230px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    padding: 10px;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    z-index: 1000;
}

.nav-links .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links .dropdown-menu li {
    margin: 0;
}

.nav-links .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    text-transform: none;
    letter-spacing: normal;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-links .dropdown-menu a::after {
    display: none;
}

.nav-links .dropdown-menu a i {
    font-size: 15px;
    color: var(--primary-color);
    width: 18px;
}

.nav-links .dropdown-menu a:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) {
    .topbar-social { display: flex; }
}

@media (min-width: 1130px) {
    .topbar-info { display: flex; }
}

/* ========================================
   Eyebrow / Badge
   ======================================== */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.eyebrow.on-dark {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--secondary-color);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.6) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.08;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: clamp(34px, 4.4vw, 54px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
    color: #fff;
}

.hero .tagline {
    font-size: clamp(18px, 2vw, 22px);
    margin-bottom: 26px;
    color: var(--accent-color);
    font-weight: 600;
}

.hero p {
    font-size: 18px;
    margin-bottom: 34px;
    line-height: 1.8;
    color: rgba(255,255,255,0.88);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 400px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Full-bleed image hero (carousel-style) */
.hero-cover {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    animation:ZoomBackground 10s infinite alternate;
}


@keyframes ZoomBackground{
    0% { background-size: 100%;}
    100% {background-size: 150%;}
}


.hero-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,15,26,0.55) 0%, rgba(10,15,26,0.72) 100%);
}

.hero-cover .container {
    position: relative;
    z-index: 2;
}

/* Only the first carousel slide uses a real <h1> (one per page, for SEO);
   the other rotating slides reuse this class on a <p> so every slide
   still looks identical as the carousel cycles through them. */
.hero-cover h1,
.hero-cover .hero-heading {
    font-size: clamp(32px, 4.4vw, 54px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .01em;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid rgba(255,255,255,0.55);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
    transform: translateY(-3px);
}

.btn-outline-dark {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.btn-outline-dark:hover {
    border-color: var(--primary-color);
    background: var(--primary-soft);
    transform: translateY(-3px);
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: clamp(64px, 8vw, 110px) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: clamp(28px, 3.4vw, 40px);
    color: var(--ink);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-light);
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
}

.bg-light { background: var(--bg-light); }
.bg-surface { background: var(--surface); }
.bg-ink { background: var(--ink); color: #fff; }

/* Generic responsive grid utilities */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }

/* ========================================
   Cards
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 65%, #2b6fd1));
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 26px;
    margin-bottom: 22px;
}

.card h3 {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Compact feature row card (icon + text inline) */
.feature-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
    border: 1px solid var(--border-color);
}

.feature-row:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-4px);
    border-color: transparent;
}

.feature-row .feature-icon {
    min-width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 65%, #2b6fd1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
}

.feature-row h4 {
    color: var(--ink);
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
}

.feature-row p {
    color: var(--text-light);
    font-size: 13.5px;
    margin: 0;
    line-height: 1.4;
}

/* ========================================
   Stats Section
   ======================================== */
.stats {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--secondary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    position: relative;
}

.stat-item h3 {
    font-size: 46px;
    color: var(--accent-color);
    margin-bottom: 8px;
    font-weight: 800;
}

.stat-item p {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    letter-spacing: .02em;
}

/* ========================================
   CTA Banner
   ======================================== */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 64px 0;
    text-align: center;
    border-radius: var(--radius-lg);
}

.cta-banner h2 {
    color: #fff;
    font-size: clamp(26px, 3vw, 36px);
    margin-bottom: 16px;
}

.cta-banner p {
    color: rgba(255,255,255,0.85);
    font-size: 18px;
    margin-bottom: 30px;
}

/* ========================================
   Form Styles
   ======================================== */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all var(--transition);
    font-family: inherit;
    background: var(--surface);
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   Testimonial Carousel
   ======================================== */
.testimonial-carousel {
    position: relative;
    padding: 0 10px;
}

.testimonial-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 6px 6px 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testimonial-track::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-xs);
}

.testimonial-stars {
    color: var(--accent-color);
    margin-bottom: 14px;
    font-size: 14px;
    letter-spacing: 2px;
}

.testimonial-quote {
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 22px;
    min-height: 76px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.testimonial-author strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 12.5px;
}

.testimonial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
    z-index: 2;
    transition: all var(--transition);
}

.testimonial-nav:hover {
    background: var(--primary-color);
    color: #fff;
}

.testimonial-nav.prev {
    left: -14px;
}

.testimonial-nav.next {
    right: -14px;
}

@media (max-width: 768px) {
    .testimonial-nav {
        display: none;
    }

    .testimonial-card {
        flex-basis: 280px;
    }
}

/* ========================================
   Alerts (form success/error feedback)
   ======================================== */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    font-weight: 600;
    border: 1px solid transparent;
}

.alert i {
    font-size: 22px;
    flex-shrink: 0;
}

.alert-success {
    background: #eafaf1;
    color: #1e7e4d;
    border-color: #c3ecd6;
}

.alert-error {
    background: #fdecec;
    color: #b3261e;
    border-color: #f8cfcc;
}

/* ========================================
   FAQ Accordion
   ======================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.faq-item.is-open {
    box-shadow: var(--shadow-sm);
    border-color: transparent;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
    cursor: pointer;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.faq-item.is-open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-light);
    line-height: 1.8;
}

.faq-item.is-open .faq-answer {
    max-height: 400px;
}

/* ========================================
   Scroll reveal
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--ink);
    color: #ffffff;
    padding: 70px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 22px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .01em;
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.65);
    line-height: 2;
    font-size: 14.5px;
}

.footer-section p i {
    color: var(--accent-color);
    width: 18px;
    margin-right: 4px;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--ink);
}

.footer-bottom {
    text-align: center;
    color: rgba(255,255,255,0.45);
    font-size: 13.5px;
}

/* Responsive Design */

/* Tablet Landscape and Below (1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 18px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 42px !important;
    }

    .hero p {
        font-size: 18px !important;
    }

    .hero .container {
        padding: 0 20px !important;
    }

    .nav-links a {
        padding: 15px 13px;
        font-size: 11.5px;
    }

    .brand-text small {
        display: none;
    }
}

/* Tablet Portrait and Below (768px) */
@media (max-width: 768px) {
    /* Mobile Menu */
    .menu-toggle {
        display: flex;
    }

    header > nav {
        background: transparent;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary-color);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        box-shadow: var(--shadow-sm);
        display: none;
        z-index: 999;
        gap: 4px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        color: var(--text-dark);
        text-transform: none;
        letter-spacing: normal;
        font-size: 15px;
        font-weight: 600;
        padding: 12px 4px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a.active,
    .nav-links a:hover {
        color: var(--primary-color);
        background: none;
    }

    /* Mobile Dropdown */
    .nav-links .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--bg-light);
        margin: 0;
        border-radius: var(--radius-sm);
        border-top: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, margin 0.3s ease;
        border: none;
    }

    .nav-links .dropdown:hover .dropdown-menu,
    .nav-links .dropdown.active .dropdown-menu {
        max-height: 300px;
        margin: 10px 0;
    }

    .nav-links .dropdown-menu a {
        padding: 10px 15px;
        font-size: 14px;
        border-bottom: none;
    }

    .nav-links .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    /* Brand */
    .brand-text strong {
        font-size: 14px;
    }

    .brand-logo {
        height: 42px;
        width: 42px;
    }

    /* Hero Section */
    .hero,
    .hero-cover {
        padding: 60px 0 !important;
        min-height: 440px !important;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 32px !important;
    }

    .hero .tagline {
        font-size: 20px !important;
    }

    .hero p {
        font-size: 16px !important;
    }

    .hero-content {
        max-width: 100% !important;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px !important;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    /* Hero carousel: shrink the fixed-height slide and its text so wrapped
       titles don't grow past the vertically-centered prev/next arrows */
    .hero-carousel {
        min-height: 480px !important;
    }

    .hero-cover h1,
    .hero-cover .hero-heading {
        font-size: 28px !important;
        line-height: 1.25 !important;
    }

    .hero-cover .tagline {
        font-size: 16px !important;
    }

    .carousel-prev,
    .carousel-next {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
        left: 10px !important;
    }

    .carousel-next {
        left: auto !important;
        right: 10px !important;
    }

    /* Grid utilities */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    .stat-item h3 {
        font-size: 34px;
    }

    .stat-item p {
        font-size: 14px;
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 26px;
    }

    .section-header p {
        font-size: 16px;
    }

    /* Card Grid */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-section {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Legacy inline-style pages - two column layouts collapse on mobile */
    section [style*="grid-template-columns: 1fr 1fr"],
    section [style*="grid-template-columns: 350px 1fr"],
    section [style*="grid-template-columns: 1fr 350px"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Campus detail rows (campuses.php) - class-based, not tied to a
       specific pixel value like the legacy attribute-selector rules above */
    .campus-row {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Keep the image first on mobile regardless of desktop left/right order */
    .campus-row-reverse > div:first-child {
        order: 2;
    }

    .campus-row-reverse > div:last-child {
        order: 1;
    }

    section [style*="grid-template-columns: 1fr 350px"] > div:first-child {
        order: 2;
    }

    section [style*="grid-template-columns: 1fr 350px"] > div:last-child {
        order: 1;
    }

    section [style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Only (480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 26px !important;
    }

    /* Arrows collide with wrapped hero titles at this width; dots still
       give full slide navigation, so hide the arrows instead of the text */
    .hero-carousel {
        min-height: 460px !important;
    }

    .hero-cover h1,
    .hero-cover .hero-heading {
        font-size: 24px !important;
    }

    .carousel-prev,
    .carousel-next {
        display: none !important;
    }

    .hero .tagline {
        font-size: 18px !important;
    }

    .hero p {
        font-size: 14px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .btn {
        padding: 12px 25px !important;
        font-size: 14px !important;
    }

    .card {
        padding: 24px 20px;
    }

    .card h3 {
        font-size: 19px;
    }

    section [style*="width: 250px; height: 250px"] {
        width: 180px !important;
        height: 180px !important;
        font-size: 60px !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .topbar-inner {
        padding: 8px 0;
    }

    .brand-text strong {
        font-size: 13px;
    }

    .apply-btn {
        padding: 10px 14px;
        font-size: 0;
        gap: 0;
    }

    .apply-btn i {
        font-size: 15px;
    }
}

.download-row:hover {
    background: var(--bg-light) !important;
}

/* Utilities */
.text-center { text-align: center; }
.mt-30 { margin-top: 30px; }
.mb-30 { margin-bottom: 30px; }
