/*
 * =====================================================
 *  JAMA-ATH Residential Public School
 *  Homepage-Specific Styles — home.css
 * =====================================================
 */

/* ─── Hero Slider ───────────────────────────────────── */
.hero-section {
    position: relative;
    height: clamp(250px, 42vw, 450px);
    overflow: hidden;
    background: var(--c-primary);
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-fallback-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-lighter) 50%, var(--c-accent) 100%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.45);
    opacity: 0; /* Hidden initially */
}

.hero-slide.active .hero-overlay {
    animation: fadeInOverlay 1s ease forwards;
    animation-delay: 1s; /* Show clean image for 1 second */
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    text-align: center;
    z-index: 5;
    background: radial-gradient(circle, rgba(0,0,0,0.5) 0%, transparent 70%);
    padding: var(--sp-xl) var(--sp-md);
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 4px 25px rgba(0,0,0,0.8), 0 2px 10px rgba(0,0,0,0.8);
    margin-bottom: 8px;
    line-height: 1.1;
    opacity: 0; /* Hidden initially */
}

.hero-slide.active .hero-title {
    animation: fadeUpSimple 0.8s var(--ease) forwards;
    animation-delay: 1.4s;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--fs-5xl);
    }
}

.hero-subtitle {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8);
    opacity: 0; /* Hidden initially */
}

.hero-slide.active .hero-subtitle {
    animation: fadeUpSimple 0.8s var(--ease) forwards;
    animation-delay: 1.6s;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: var(--fs-lg);
    }
}

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

.animate-up {
    /* Keep class for potential JS triggers or other sections */
}

/* Hero Controls */
.hero-controls {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* Hidden on mobile */
    align-items: center;
    gap: var(--sp-md);
    z-index: 10;
}

.hero-arrow {
    width: 36px;
    height: 36px;
    border-radius: var(--r-full);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all var(--duration-fast) var(--ease);
    cursor: pointer;
}

.hero-arrow:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.08);
}

@media (min-width: 768px) {
    .hero-controls {
        bottom: auto;
        top: 50%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        justify-content: space-between;
        padding: 0 var(--sp-lg);
    }

    .hero-arrow {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .hero-dots {
        position: absolute;
        bottom: -60px;
        left: 50%;
        transform: translateX(-50%);
    }
}

.hero-dots {
    display: flex;
    gap: 6px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--r-full);
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease);
}

.hero-dot.active {
    background: #fff;
    width: 24px;
}

/* Hero CTA Bar */
.hero-cta-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(10, 22, 40, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    z-index: 10;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hero-cta-bar::-webkit-scrollbar {
    display: none;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--r-full);
    font-size: 0.7rem;
    font-weight: 700;
    transition: all var(--duration-base) var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-cta-btn.primary {
    background: linear-gradient(135deg, var(--c-gold), #d97706);
    color: #fff;
    box-shadow: 0 2px 10px rgba(245,158,11,0.3);
}

.hero-cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(245,158,11,0.5);
}

.hero-cta-btn.secondary {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

.hero-cta-btn.secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* ─── Quick Action Grid ─────────────────────────────── */
.quick-actions {
    padding: var(--sp-base) 0;
    background: var(--c-surface);
    position: relative;
    z-index: 5;
    margin-top: -1px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px;
}

@media (min-width: 768px) {
    .quick-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
}

.quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px var(--sp-xs);
    border-radius: var(--r-md);
    text-decoration: none;
    transition: all var(--duration-base) var(--ease);
    -webkit-tap-highlight-color: transparent;
}

.quick-card:hover {
    transform: translateY(-4px);
    background: var(--c-surface-hover);
}

.quick-card:active {
    transform: scale(0.95);
}

.quick-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent, #4f46e5) 10%, transparent);
    transition: all var(--duration-base) var(--ease);
}

.quick-card:hover .quick-icon {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--accent, #4f46e5) 35%, transparent);
    transform: scale(1.05);
}

.quick-card span {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--c-text-secondary);
    text-align: center;
    line-height: 1.1;
    margin-top: 2px;
}

/* ─── Welcome / About Section ───────────────────────── */
.welcome-section {
    background: url('../../.images/slider/slider1.webp') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    padding: var(--sp-4xl) 0; /* Increased padding */
    overflow: hidden;
    color: #ffffff;
}

.welcome-section .section-badge {
    position: relative;
    z-index: 5;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    display: inline-flex !important;
}

.welcome-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 15, 45, 0.9) 0%, rgba(0, 35, 90, 0.7) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
}

.welcome-section .container {
    position: relative;
    z-index: 2;
}

.welcome-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-2xl);
}

@media (min-width: 1100px) {
    .welcome-layout {
        grid-template-columns: 1fr 340px;
    }
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
    align-items: center;
}

@media (max-width: 767px) {
    .welcome-grid {
        gap: 60px; /* Space for the absolute positioned images to breath */
    }
}

@media (min-width: 768px) {
    .welcome-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.welcome-content .section-title {
    text-align: left;
    font-size: var(--fs-3xl);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    margin-top: var(--sp-md);
    line-height: 1.2;
}

.welcome-text {
    font-size: var(--fs-base);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: var(--sp-lg);
}

.welcome-section .btn-primary {
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.values-row {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    margin-bottom: var(--sp-xl);
}

.value-chip {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-base);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: var(--r-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all var(--duration-base) var(--ease);
}

.value-chip:hover {
    border-color: var(--c-accent);
    box-shadow: var(--shadow-sm);
}

.value-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    background: var(--c-accent-soft);
    color: var(--c-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.value-chip strong {
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: 800;
    color: #000000; /* Pure black for maximum contrast on light glass */
    display: block;
}

.value-chip span {
    font-size: var(--fs-xs);
    color: #222222; /* Very dark grey */
    font-weight: 500;
}

/* Welcome visual */
.welcome-visual {
    position: relative;
}

.welcome-img-stack {
    position: relative;
    max-width: 450px;
    margin: 0 auto;
}

.welcome-img-main {
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.welcome-img-main img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.welcome-img-secondary {
    position: absolute;
    bottom: -20px;
    right: -10px;
    width: 55%;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--c-surface);
    z-index: 3;
}

@media (max-width: 600px) {
    .welcome-img-secondary {
        bottom: -10px;
        right: 0;
        width: 50%;
    }
}

.welcome-img-secondary img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .welcome-img-secondary img {
        height: 150px;
    }
}

/* ─── Sidebar Widgets ───────────────────────────────── */
.welcome-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xl);
}

.sidebar-widget {
    background: rgba(255, 255, 255, 0.85); /* Much lighter */
    backdrop-filter: blur(15px) saturate(200%);
    -webkit-backdrop-filter: blur(15px) saturate(200%);
    border-radius: var(--r-xl);
    padding: var(--sp-xl); /* Increased padding */
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
    transition: all 0.4s var(--ease);
}

.sidebar-widget:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.75);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-lg);
    border-bottom: 1px solid var(--c-border-light);
    padding-bottom: var(--sp-sm);
}

.widget-header h4 {
    font-size: var(--fs-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--c-primary); /* Dark on light glass is good, but maybe a bit darker? */
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-header h4 i {
    color: var(--c-gold);
}

.widget-header a {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: #1d4ed8; /* More vibrant blue for links on glass */
}

/* Sidebar Topper Card */
.sidebar-topper-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
}

.sidebar-topper-card {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    padding: var(--sp-md); /* Increased padding */
    border-radius: var(--r-xl);
    transition: all 0.4s var(--ease);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.5); /* Lighter card */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.sidebar-topper-card:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: translateX(8px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.topper-photo-mini {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.topper-photo-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
}

.topper-rank-mini {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #fff;
    border-radius: var(--r-full);
    font-size: 0.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
    z-index: 5;
}

.topper-info-mini h5 {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--c-primary);
    margin-bottom: 2px;
}

.topper-info-mini span {
    font-size: var(--fs-xs);
    color: #555;
    display: block;
    margin-bottom: 4px;
}

.topper-score-mini {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.2) 100%);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--r-full);
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.05);
}

.topper-action-mini,
.notice-arrow-mini {
    margin-left: auto;
    color: #1d4ed8;
    font-size: 0.9rem;
    transition: transform 0.3s var(--ease);
}

.sidebar-topper-card:hover .topper-action-mini,
.sidebar-notice-item:hover .notice-arrow-mini {
    transform: translateX(5px);
}

/* Sidebar Notice List */
.sidebar-notice-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

.sidebar-notice-item {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md);
    border-radius: var(--r-xl); /* Consistent with toppers */
    transition: all 0.4s var(--ease);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: var(--sp-xs); /* Extra separation */
}

.sidebar-notice-item:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(8px);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.notice-date-box {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notice-date-box .day {
    font-size: var(--fs-base);
    font-weight: 800;
    line-height: 1;
}

.notice-date-box .month {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 700;
}

.notice-content-mini h6 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #000;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s var(--ease);
}

.sidebar-notice-item:hover h6 {
    color: #1d4ed8;
}

.welcome-stat-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: linear-gradient(135deg, var(--c-accent), #1d4ed8);
    color: #fff;
    padding: 10px 15px;
    border-radius: var(--r-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
    z-index: 4;
}

@media (max-width: 600px) {
    .welcome-stat-badge {
        top: -5px;
        left: -5px;
        padding: 8px 12px;
    }
}

.stat-number {
    display: block;
    font-family: var(--font-primary);
    font-size: var(--fs-2xl);
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: var(--fs-xs);
    font-weight: 500;
    opacity: 0.8;
}

/* ─── Facilities Section ────────────────────────────── */
.facilities-section {
    background: var(--c-primary);
    position: relative;
    overflow: hidden;
}

.facilities-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.15), transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(245, 158, 11, 0.1), transparent 60%);
    pointer-events: none;
}

.facilities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
    position: relative;
}

@media (min-width: 640px) {
    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .facilities-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.facility-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--r-xl);
    padding: var(--sp-lg);
    text-align: center;
    backdrop-filter: blur(8px);
    transition: all var(--duration-base) var(--ease);
}

.facility-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-6px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.facility-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--sp-lg);
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, var(--c-accent-soft), rgba(37,99,235,0.2));
    color: var(--c-accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--duration-base) var(--ease);
}

.facility-card:hover .facility-icon {
    background: linear-gradient(135deg, var(--c-accent), #1d4ed8);
    color: #fff;
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 4px 20px rgba(37,99,235,0.4);
}

.facility-card h3 {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--sp-sm);
}

.facility-card p {
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
}

/* ─── Gallery Section ───────────────────────────────── */
.gallery-section {
    background: var(--c-surface);
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    justify-content: center;
    margin-bottom: var(--sp-xl);
}

.filter-chip {
    padding: 0.4rem 1rem;
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    background: var(--c-bg);
    color: var(--c-text-secondary);
    border: 1px solid var(--c-border);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease);
}

.filter-chip:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
}

.filter-chip.active {
    background: var(--c-accent);
    color: #fff;
    border-color: var(--c-accent);
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md);
    margin-top: var(--sp-xl);
}

@media (min-width: 768px) {
    .gallery-masonry {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-masonry {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--sp-lg);
    }
}

.gallery-item {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--c-surface);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s var(--ease);
    cursor: pointer;
    aspect-ratio: 4 / 3; /* Uniform aspect ratio */
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--sp-md);
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s var(--ease);
    z-index: 2;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback for visible caption if desired always */
.gallery-item-label {
    margin-top: var(--sp-sm);
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--c-primary);
    text-align: center;
}

.gallery-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--sp-3xl);
    color: var(--c-text-muted);
    text-align: center;
}

.gallery-placeholder i {
    font-size: 2.5rem;
    margin-bottom: var(--sp-md);
    opacity: 0.4;
}

.gallery-placeholder p {
    font-size: var(--fs-sm);
}

/* ─── Enquiry Section ───────────────────────────────── */
.enquiry-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    position: relative;
    padding-bottom: var(--sp-4xl); /* Breathing room before footer */
}

.enquiry-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-2xl);
    align-items: center;
}

@media (min-width: 768px) {
    .enquiry-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.enquiry-info .section-title {
    text-align: left;
}

.enquiry-info p {
    color: var(--c-text-secondary);
    line-height: 1.6;
    margin-top: var(--sp-md);
}

.enquiry-highlights {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    margin-top: var(--sp-xl);
}

.highlight {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text);
}

.highlight i {
    color: var(--c-success);
    font-size: 1rem;
}

/* Enquiry Form */
.enquiry-form {
    background: var(--c-surface);
    padding: var(--sp-xl);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.form-group {
    margin-bottom: var(--sp-base);
}

.form-group label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: var(--sp-xs);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    font-size: var(--fs-base);
    color: var(--c-text);
    background: var(--c-bg);
    transition: all var(--duration-fast) var(--ease);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px var(--c-accent-soft);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--c-text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-base);
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ─── Side Tabs & Panel ─────────────────────────────── */
.side-tabs {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1000;
}

.side-tab-btn {
    background: var(--c-primary);
    color: #fff;
    border: none;
    padding: 12px 10px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all var(--duration-base) var(--ease);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.side-tab-btn i {
    transform: rotate(90deg);
    color: var(--c-gold);
    font-size: 1rem;
}

.side-tab-btn:hover {
    padding-left: 15px;
    background: var(--c-primary-light);
}

.side-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-base) var(--ease);
}

.side-panel {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(400px, 90vw);
    background: var(--c-surface);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform var(--duration-base) var(--ease);
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 30px rgba(0,0,0,0.2);
}

.side-panel.active {
    transform: translateX(0);
}

.side-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-panel-header {
    padding: var(--sp-lg);
    background: var(--c-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.side-panel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.side-panel-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.side-panel-close:hover {
    background: rgba(255,255,255,0.2);
}

.side-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-lg);
}

/* ─── Mobile Critical Fixes ────────────────────────── */
@media (max-width: 767px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .welcome-section {
        padding: 40px 0 !important;
        overflow: hidden !important;
        width: 100% !important;
    }

    .welcome-layout, .welcome-main, .welcome-grid {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .welcome-content {
        text-align: left !important;
        margin-bottom: 40px !important;
        display: block !important;
    }

    .welcome-content .section-title,
    .welcome-content .welcome-text {
        text-align: left !important;
        width: 100% !important;
    }

    .value-chip {
        justify-content: flex-start !important;
    }

    .welcome-visual {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
    }

    .welcome-img-stack {
        width: 260px !important;
        height: 240px !important;
        position: relative !important;
        margin: 0 auto !important;
        display: block !important;
    }

    .welcome-img-main img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
        border-radius: var(--r-xl) !important;
    }

    .welcome-img-secondary {
        position: absolute !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 130px !important;
        z-index: 5 !important;
        transform: translate(10px, 10px) !important;
    }

    .welcome-img-secondary img {
        height: 80px !important;
        width: 100% !important;
        border: 4px solid #fff !important;
        box-shadow: var(--shadow-lg) !important;
    }

    .welcome-stat-badge {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        z-index: 6 !important;
        transform: translate(-10px, -10px) !important;
        padding: 6px 12px !important;
    }

    /* Sidebar Notice Fixes */
    .welcome-sidebar {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: var(--sp-lg) !important;
        margin-top: 50px !important;
    }

    .sidebar-widget {
        margin: 0 !important;
        width: 100% !important;
    }

    .notice-content-mini h6 {
        white-space: normal !important;
        display: block !important;
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        -webkit-line-clamp: unset !important;
    }
}

@media (max-width: 400px) {
    .welcome-content .section-title {
        font-size: 1.75rem !important;
    }
    
    .value-chip {
        padding: 12px !important;
    }

    .value-chip strong {
        font-size: 0.8rem !important;
    }
}

/* ─── Toppers Section ────────────────────────────────── */
.toppers-section {
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 100%);
    padding: var(--sp-2xl) 0;
    position: relative;
    overflow: hidden;
}

.toppers-section .section-title {
    color: #fff !important;
    background: none !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.toppers-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.main-toppers-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--sp-xl);
    max-width: 900px;
    margin: 0 auto var(--sp-2xl);
}

.main-topper-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: var(--r-2xl);
    padding: var(--sp-xl);
    text-align: center;
    transition: all 0.4s var(--ease);
}

.main-topper-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.12);
    border-color: #fbbf24;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.topper-img {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto var(--sp-lg);
}

.topper-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--r-xl);
    border: 4px solid #fbbf24;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.topper-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: #fbbf24;
    color: #000;
    font-weight: 900;
    padding: 10px 18px;
    border-radius: var(--r-lg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-size: 1.3rem;
}

.main-topper-card h3 {
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 8px;
    font-weight: 800;
}

.main-topper-card p {
    color: #fbbf24;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.toppers-divider {
    text-align: center;
    margin: var(--sp-xl) 0;
    position: relative;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.toppers-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.5), transparent);
}

.toppers-divider span {
    background: #020617;
    color: #fbbf24;
    padding: 6px 24px;
    border: 1px solid rgba(251, 191, 36, 0.6);
    border-radius: var(--r-full);
    font-size: 1rem;
    font-weight: 800;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.15);
}

/* ─── Toppers Carousel (Full Width & Infinite) ───────────────── */
.toppers-section {
    padding-bottom: var(--sp-3xl);
}

.topper-carousel-container {
    position: relative;
    width: 100%;
    margin-bottom: var(--sp-2xl);
    overflow: visible;
}

.topper-carousel-track {
    display: flex;
    gap: var(--sp-lg);
    overflow-x: auto;
    scroll-behavior: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 30px 0;
}

.topper-carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 auto;
    transition: all 0.4s var(--ease);
    scroll-snap-align: center;
}

/* Unified Compact Style for both sections */
/* Consolidated carousel item logic moved to media queries */

.carousel-item:hover {
    transform: translateY(-10px) scale(1.05);
    z-index: 10;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.carousel-btn:hover {
    background: #fbbf24;
    color: #0f172a;
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

/* ─── Toppers Section Header - Ultra Compact ─── */
.toppers-section .section-header {
    margin-bottom: var(--sp-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.toppers-section .section-title {
    margin: 5px 0;
    font-size: 1.8rem;
}

.toppers-section .section-badge {
    padding: 4px 12px;
    font-size: 0.75rem;
}

/* Unified Compact Card Design (Tight & Symmetrical) */
.topper-mini-card, .subject-topper-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--r-xl);
    padding: 25px 15px 18px; /* Reduced gap by half as requested */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 185px;
    min-height: 245px; /* Tightened height */
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s var(--ease);
    position: relative;
    gap: 0;
}

/* Base widths for desktop */
#carousel90 .carousel-item { width: 185px; }
#carouselSubject .carousel-item { width: 200px; }

.mini-img, .sub-info {
    width: 110px;
    height: 110px;
    margin-top: 5px; /* Tightened gap */
    margin-bottom: 12px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    justify-content: center;
}

.mini-img img, .sub-info img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--r-lg);
    border: 2px solid rgba(251, 191, 36, 0.3);
}

.sub-info { display: block; margin-bottom: 12px; } /* Override for subject info container */

/* Badges */
.mini-img::after {
    content: '90%+';
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #fbbf24;
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: var(--r-sm);
    z-index: 2;
    display: none; /* Hidden since we added score badge below */
}

.sub-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: var(--r-md);
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 5;
    background: #1e3a8a;
}

/* Typography - Unified & Balanced */
.sub-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Increased padding between image and name */
}

/* Restored Subject Colors */
.carousel-item:nth-child(7n+1) .sub-badge { background: linear-gradient(135deg, #ef4444, #991b1b); }
.carousel-item:nth-child(7n+2) .sub-badge { background: linear-gradient(135deg, #3b82f6, #1e3a8a); }
.carousel-item:nth-child(7n+3) .sub-badge { background: linear-gradient(135deg, #10b981, #065f46); }
.carousel-item:nth-child(7n+4) .sub-badge { background: linear-gradient(135deg, #f59e0b, #92400e); }
.carousel-item:nth-child(7n+5) .sub-badge { background: linear-gradient(135deg, #8b5cf6, #5b21b6); }
.carousel-item:nth-child(7n+6) .sub-badge { background: linear-gradient(135deg, #06b6d4, #155e75); }
.carousel-item:nth-child(7n+7) .sub-badge { background: linear-gradient(135deg, #ec4899, #9d174d); }

.topper-mini-card h4, .subject-topper-card h4 {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px 0;
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score {
    display: inline-block;
    color: #fbbf24;
    font-weight: 900;
    font-size: 0.95rem;
    background: rgba(251, 191, 36, 0.1);
    padding: 3px 12px;
    border-radius: var(--r-sm);
    margin-top: 5px;
}

/* Carousel Adjustments */
.topper-carousel-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 30px 0;
    scroll-snap-type: x mandatory;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

/* Main Toppers (Top 2) - Making them also tighter */
.main-toppers-row {
    gap: 20px;
    margin-bottom: 30px;
}

.main-topper-card {
    padding: 15px;
    max-width: 300px;
}

.main-topper-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

/* Center Button alignment */
.toppers-section .text-center {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: var(--sp-xl);
}

.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: #fff !important;
    padding: 16px 36px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--r-full);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 1rem;
    transition: all 0.4s var(--ease);
}

/* Responsive overrides start below */

.btn-premium:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000 !important;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(251, 191, 36, 0.4);
}

@media (max-width: 768px) {
    /* For Subject Toppers (Large Cards) */
    #carouselSubject .carousel-item { 
        width: calc(100vw - 80px); 
        max-width: 320px;
    }
    
    /* For 90% Above (Mini Cards) */
    #carousel90 .carousel-item { 
        width: calc(100vw - 120px); 
        max-width: 180px;
    }

    /* If screen is wider (e.g. tablet or landscape phone), show 2 cards */
    @media (min-width: 500px) {
        #carouselSubject .carousel-item { 
            width: calc(50vw - 50px); 
        }
        #carousel90 .carousel-item { 
            width: calc(50vw - 80px); 
        }
    }

    .carousel-btn { 
        width: 36px; 
        height: 36px; 
        font-size: 0.9rem; 
        background: rgba(15, 23, 42, 0.7);
        backdrop-filter: blur(8px);
    }
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
}

/* Redundant topper styles removed to let the new compact carousel design take over. */

/* ─── Teachers Section Styles ─── */
.teachers-section {
    background: #0f172a;
    position: relative;
    padding-bottom: var(--sp-2xl);
    overflow: hidden;
    color: #fff;
}

/* Force Header Visibility - Ultimate Specificity & Gradient Override */
.teachers-section .section-header .section-title {
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    font-size: clamp(1.8rem, 5vw, 3.8rem);
    margin-bottom: 20px;
    font-weight: 900;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    letter-spacing: -1px;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.teachers-section .section-header .section-subtitle {
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1 !important;
    background: none !important;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 500;
    line-height: 1.6;
    display: block !important;
    opacity: 1 !important;
}

.faculty-row {
    display: flex;
    justify-content: center;
    gap: var(--sp-xl);
    flex-wrap: wrap;
    margin-top: var(--sp-2xl);
}

.leadership-row .faculty-card {
    width: calc(50% - var(--sp-xl));
    max-width: 440px;
    min-width: 320px;
}

.faculty-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-3xl);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

.faculty-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(251, 191, 36, 0.3);
}

.leadership-row .faculty-img {
    width: 220px;
    height: 220px;
    margin: 40px auto 10px;
    border-radius: 50%;
    position: relative;
    overflow: visible;
}

.leadership-row .faculty-img img {
    border-radius: 50%;
    border: 6px solid rgba(255,255,255,0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.leadership-row .faculty-tag {
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 8px 25px;
}

.faculty-img {
    height: 460px;
    position: relative;
    overflow: hidden;
}

.faculty-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.faculty-card:hover .faculty-img img {
    transform: scale(1.05);
}

.faculty-tag {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: #1e3a8a;
    color: #fff;
    padding: 10px 25px;
    border-radius: var(--r-full);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 2;
}

.faculty-info {
    padding: 40px 30px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 100%);
}

.faculty-info h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.qualification {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.7;
    max-width: 320px;
    margin: 0 auto;
    font-weight: 400;
}

/* Row 2 - Team Card (Image Focused) */
.full-team-card {
    width: 100%;
    max-width: 100%;
    border: none;
    background: transparent;
    box-shadow: none;
}

.team-img-wide {
    height: auto;
    border-radius: var(--r-3xl);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}

.team-img-wide img {
    object-fit: contain;
    height: auto;
    display: block;
}

.wide-tag {
    background: rgba(30, 58, 138, 0.95);
    backdrop-filter: blur(15px);
    padding: 15px 40px;
    font-size: 1rem;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    white-space: nowrap;
}

.principal-card .faculty-tag {
    background: #fbbf24;
    color: #000;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .leadership-row .faculty-card {
        width: 100%;
        max-width: 100%;
    }
    
    .faculty-img {
        height: 380px;
    }
    
    .team-img-wide {
        height: auto;
        min-height: 200px;
    }
    
    .wide-tag {
        font-size: 0.75rem;
        padding: 8px 15px;
        bottom: 15px;
    }
}

/* ─── Detailed Facilities Section ───────────────────── */
.facilities-detailed-section {
    background: #fff;
    overflow: hidden;
}

.facility-row {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xl);
    align-items: center;
    margin-bottom: 80px;
}

@media (min-width: 992px) {
    .facility-row {
        flex-direction: row;
        gap: 80px;
    }
    .facility-row.reverse {
        flex-direction: row-reverse;
    }
    .facility-row > * {
        flex: 1;
    }
}

.facility-content {
    max-width: 500px;
}

.facility-content h3 {
    font-family: var(--font-primary);
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--c-primary);
    margin-bottom: var(--sp-md);
    position: relative;
}

.facility-content h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--c-gold);
    border-radius: var(--r-full);
}

.facility-content p {
    font-size: var(--fs-base);
    color: var(--c-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--sp-lg);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--c-primary);
    transition: gap var(--duration-fast) var(--ease);
}

.read-more:hover {
    gap: 12px;
    color: var(--c-accent);
}

.facility-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    position: relative;
}

.facility-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

@media (min-width: 768px) {
    .facility-images img {
        height: 260px;
    }
}

.facility-images img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

/* Add a subtle vertical line between rows for modern feel */
@media (min-width: 992px) {
    .facility-row:not(:last-child) {
        position: relative;
    }
    .facility-row:not(:last-child)::before {
        content: '';
        position: absolute;
        bottom: -40px;
        left: 50%;
        transform: translateX(-50%);
        width: 1px;
        height: 40px;
        background: var(--c-border);
    }
}
