/* Bushra Matriculation School - Enhanced UI/UX Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Open+Sans:wght@400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette (60-30-10 Rule) */
    --primary-green: #1F7A63;
    /* Primary Brand */
    --dark-green: #0F3D3E;
    /* Secondary Supporting */
    --accent-yellow: #F59E0B;
    /* Accent / Highlights */
    --bg-light: #F8FAFC;
    /* Neutral Background */
    --bg-gray: #F1F5F9;
    --text-primary: #1E293B;
    /* Main Text */
    --text-secondary: #475569;
    --white: #FFFFFF;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #1F7A63 0%, #0F3D3E 100%);
    --grad-secondary: linear-gradient(135deg, #0A1128 0%, #172a5a 100%);
    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);

    /* Typography System */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Typography Scale */
    --text-hero: 48px;
    /* Reduced from 56px to prevent massive titles */
    --text-section: 32px;
    /* Reduced from 36px */
    --text-sub: 20px;
    /* Reduced from 24px */
    --text-card: 18px;
    --text-body: 16px;
    --text-small: 14px;

    /* Line Heights */
    --line-height-heading: 1.3;
    --line-height-base: 1.7;
    /* Increased from 1.6 for better readability */

    /* 8-Point Spacing System */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 64px;
    --space-7: 96px;

    --section-padding-y: 80px;
    /* Reduced from 96px for tighter vertical rhythm */
    --container-max: 1140px;
    /* Enforce strict max-width */

    /* Cards & Components */
    --radius-btn: 8px;
    --radius-card: 16px;
    --radius-img: 16px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 8px 24px rgba(31, 122, 99, 0.3);

    /* Animations */
    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

p {
    margin-bottom: 16px;
    max-width: 85ch;
    /* Clamp line width for readability */
}

ul:not([class]),
ol:not([class]) {
    padding-left: 20px;
    margin-bottom: 16px;
}

ul:not([class]) li,
ol:not([class]) li {
    margin-bottom: 10px;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    line-height: var(--line-height-heading);
    margin-bottom: var(--space-2);
}

.hero-heading {
    font-size: var(--text-hero);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-heading {
    font-size: var(--text-section);
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-4);
    font-weight: 700;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 64px;
    height: 4px;
    background: var(--primary-green);
    border-radius: 4px;
}

.text-center .section-heading::after {
    left: 50%;
    transform: translateX(-50%);
}

.subheading {
    font-size: var(--text-sub);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.card-heading {
    font-size: var(--text-card);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.text-small {
    font-size: var(--text-small);
}

.text-secondary {
    color: var(--text-secondary);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-3);
    position: relative;
    z-index: 1;
}

.section {
    padding: var(--section-padding-y) 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.section-bg-light {
    background-color: var(--bg-light);
}

.section-bg-gray {
    background-color: var(--bg-gray);
}

/* 12-Column Responsive Grid System */
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-4);
    width: 100%;
}

.col-1 {
    grid-column: span 1;
}

.col-2 {
    grid-column: span 2;
}

.col-3 {
    grid-column: span 3;
}

.col-4 {
    grid-column: span 4;
}

.col-5 {
    grid-column: span 5;
}

.col-6 {
    grid-column: span 6;
}

.col-7 {
    grid-column: span 7;
}

.col-8 {
    grid-column: span 8;
}

.col-9 {
    grid-column: span 9;
}

.col-10 {
    grid-column: span 10;
}

.col-12 {
    grid-column: span 12;
}

/* Add Standardized Components Phase 9 */
.card,
.tile {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: var(--space-4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
}

.card:hover,
.tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: var(--space-4);
    display: grid;
    gap: 16px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-list i {
    color: var(--primary-green);
    margin-top: 4px;
    background: rgba(31, 122, 99, 0.1);
    padding: 6px;
    border-radius: 50%;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.feature-list li:hover i {
    transform: scale(1.15) rotate(5deg);
}

.action-block {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-green);
    padding: var(--space-3) var(--space-4);
    border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
    margin-top: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.action-block-text {
    flex: 1;
    min-width: 200px;
}

.action-block-text h4 {
    margin-bottom: 4px;
    font-size: 18px;
}

.action-block-text p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

@media (max-width: 992px) {
    .grid {
        gap: var(--space-3);
    }

    .col-lg-6 {
        grid-column: span 6;
    }

    .col-lg-12 {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .col-1,
    .col-2,
    .col-3,
    .col-4,
    .col-5,
    .col-6,
    .col-7,
    .col-8,
    .col-9,
    .col-10,
    .col-11,
    .col-12 {
        grid-column: span 1;
    }
}

/* Modern Buttons (Glow, Lift, Layers) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-heading);
    font-size: var(--text-body);
    font-weight: 600;
    border-radius: var(--radius-btn);
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    outline: none;
    gap: var(--space-1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--grad-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(31, 122, 99, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0F3D3E 0%, #0c3333 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.btn-primary:hover {
    color: var(--white);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--bg-gray);
    box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-green);
    border-color: rgba(31, 122, 99, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-smooth);
    background-color: transparent;
    padding: var(--space-4) 0;
    border-bottom: 1px solid transparent;
}

.header.sticky {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    padding: var(--space-2) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-container img {
    height: 52px;
    width: auto;
    transition: height var(--transition-smooth);
}

.header.sticky .logo-container img {
    height: 44px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 22px;
    color: var(--primary-green);
    line-height: 1.1;
    letter-spacing: -0.5px;
    transition: color var(--transition-smooth);
}

.header:not(.bg-white):not(.sticky) .logo-text {
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0; /* Reset gap to use padding instead */
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}

.nav-menu li {
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    font-family: var(--font-heading);
    transition: color var(--transition-fast);
    position: relative;
    padding: 8px 16px;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px; /* Match left padding */
    width: 0;
    height: 2px;
    background-color: var(--primary-green);
    transition: width var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: calc(100% - 32px); /* 100% minus left&right padding */
}

.header.sticky .nav-link {
    color: var(--text-primary);
}

.header:not(.bg-white):not(.sticky) .nav-link {
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header:not(.bg-white):not(.sticky) .nav-link::after {
    background-color: var(--accent-yellow);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-green);
}

.header:not(.bg-white):not(.sticky) .nav-link:hover,
.header:not(.bg-white):not(.sticky) .nav-link.active {
    color: var(--accent-yellow);
}

.header-cta {
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1001;
    transition: color var(--transition-fast);
}

.header:not(.bg-white):not(.sticky) .mobile-menu-btn {
    color: var(--white);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999;
    clip-path: circle(0px at 100% 0%);
    transition: clip-path 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 100px var(--space-4) var(--space-5);
    overflow-y: auto;
}

.mobile-nav-overlay.active {
    clip-path: circle(150% at 100% 0%);
}

.mobile-nav-overlay .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    margin-bottom: var(--space-4);
}

.mobile-nav-overlay .nav-link {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    display: block;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active .nav-link {
    transform: translateY(0);
    opacity: 1;
}

/* Staggered Delay for Mobile Nav Links */
.mobile-nav-overlay.active li:nth-child(1) .nav-link { transition-delay: 0.1s; }
.mobile-nav-overlay.active li:nth-child(2) .nav-link { transition-delay: 0.15s; }
.mobile-nav-overlay.active li:nth-child(3) .nav-link { transition-delay: 0.2s; }
.mobile-nav-overlay.active li:nth-child(4) .nav-link { transition-delay: 0.25s; }
.mobile-nav-overlay.active li:nth-child(5) .nav-link { transition-delay: 0.3s; }
.mobile-nav-overlay.active li:nth-child(6) .nav-link { transition-delay: 0.35s; }
.mobile-nav-overlay.active li:nth-child(7) .nav-link { transition-delay: 0.4s; }

.mobile-nav-overlay .btn-primary {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
}

.mobile-nav-overlay.active .btn-primary {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-overlay .nav-menu li {
    width: 100%;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    visibility: hidden;
    will-change: opacity, transform;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.fade-up {
    transform: translateY(50px);
}

.fade-down {
    transform: translateY(-50px);
}

.fade-left {
    transform: translateX(50px);
}

.fade-right {
    transform: translateX(-50px);
}

.scale-in {
    transform: scale(0.9);
}

.zoom-in {
    transform: scale(0.95);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}

/* Parallax, Floats, Patterns */
.hero-parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.bg-pattern {
    background-image: radial-gradient(var(--bg-gray) 2px, transparent 2px);
    background-size: 32px 32px;
}

.floating-shape {
    animation: float 6s ease-in-out infinite;
}

.floating-shape-2 {
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Hero Gradient & Layers */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 61, 62, 0.85) 100%);
    z-index: -1;
}

.layered-stat-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    z-index: 10;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-smooth);
    cursor: default;
}

.layered-stat-card:hover {
    transform: translateY(-4px);
}

/* Advanced Cards */
.card {
    background-color: var(--white);
    border-radius: var(--radius-card);
    padding: var(--space-4);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Icons & Tiles for Modern Grids */
.tile {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: var(--space-4);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
}

.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--grad-primary);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

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

.tile:hover::before {
    opacity: 0.03;
}

.tile:hover .icon-container {
    transform: scale(1.1);
}

.icon-container {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-3) auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 28px;
    transition: transform var(--transition-smooth);
}

.icon-gradient-1 {
    background: rgba(31, 122, 99, 0.1);
    color: var(--primary-green);
}

.icon-gradient-2 {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-yellow);
}

.icon-gradient-3 {
    background: rgba(15, 61, 62, 0.1);
    color: var(--dark-green);
}

/* Features List & Highlights */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: 12px;
}

.feature-list i {
    color: var(--primary-green);
    margin-top: 4px;
    font-size: 18px;
}

/* Program Cards (Overlay Design) */
.program-card {
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.program-img {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.program-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.program-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.program-label {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    z-index: 2;
}

.program-content {
    padding: var(--space-4);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
    z-index: 10;
    transform: translateY(-40px);
    margin: 0 var(--space-3);
    border-radius: var(--radius-card);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}

/* Images & Media */
.img-rounded {
    border-radius: var(--radius-img);
    box-shadow: var(--shadow-soft);
    object-fit: cover;
    width: 100%;
}

.aspect-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-1-1 {
    aspect-ratio: 1 / 1;
}

.aspect-4-3 {
    aspect-ratio: 4 / 3;
}

.img-hover-zoom {
    overflow: hidden;
    border-radius: var(--radius-img);
    position: relative;
    display: block;
    box-shadow: var(--shadow-soft);
}

.img-hover-zoom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    display: block;
}

.img-hover-zoom:hover img {
    transform: scale(1.03);
}

iframe {
    border-radius: var(--radius-img);
    box-shadow: var(--shadow-soft);
    border: none;
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: var(--text-small);
    font-weight: 600;
    border-radius: 50px;
    gap: var(--space-1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.badge-solid {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(31, 122, 99, 0.2);
}

/* Glass Testimonials Review Carousel */
.testimonial-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-slide {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-card);
    padding: var(--space-5) var(--space-4);
    text-align: center;
    box-shadow: var(--shadow-hover);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.stars {
    color: var(--accent-yellow);
    font-size: 20px;
    margin-bottom: var(--space-3);
    letter-spacing: 2px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-soft);
    margin: 0 auto var(--space-3) auto;
}

.review-quote {
    font-size: var(--text-sub);
    font-weight: 500;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: var(--space-4);
}

/* Waves SVG */
.wave-svg {
    position: absolute;
    left: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.wave-top {
    top: -1px;
    transform: rotate(180deg);
}

.wave-bottom {
    bottom: -1px;
}

/* Custom Form Styles - Floating Labels */
.form-group {
    position: relative;
    margin-bottom: var(--space-3);
}

.form-input {
    width: 100%;
    padding: var(--space-3) 20px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-btn);
    background: var(--bg-gray);
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-green);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.form-label {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: var(--text-body);
    color: var(--text-secondary);
    pointer-events: none;
    transition: all var(--transition-fast);
    transform-origin: left top;
}

.form-input:focus~.form-label,
.form-input:not(:placeholder-shown)~.form-label {
    transform: translateY(-10px) scale(0.75);
    color: var(--primary-green);
    font-weight: 600;
}

/* Footer Section */
:root {
    --grad-footer: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}

.footer {
    background: var(--grad-footer);
    color: var(--white);
    padding: var(--space-5) 0 var(--space-3) 0;
    position: relative;
    overflow: hidden;
}

.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

.footer-top {
    position: relative;
    z-index: 1;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
}

.footer-top h4 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: var(--space-4);
    position: relative;
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 700;
}

.footer-top h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--primary-green);
    border-radius: 2px;
}

.footer-col p {
    color: #94A3B8;
    margin-bottom: var(--space-2);
    line-height: 1.6;
    font-size: var(--text-small);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
    padding-bottom: 0;
}

.footer-links li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.footer-links a {
    color: #94A3B8;
    font-size: var(--text-small);
    text-decoration: none;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-bottom: 2px;
}

.footer-links a::before {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    opacity: 0;
    color: var(--primary-green);
    transition: all var(--transition-fast);
}

.footer-links a::after {
    display: none;
    /* Remove old underline */
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 20px;
}

.footer-links a:hover::before {
    opacity: 1;
}

.social-icons {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-3);
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-size: 16px;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons a:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: scale(1.1) translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(31, 122, 99, 0.4);
}

.footer-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-4);
    margin-top: var(--space-4);
    color: #94A3B8;
    font-size: var(--text-small);
}

.footer-brand-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: var(--space-3) 0;
    max-width: 80%;
}

/* Timeline Styling */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--grad-primary);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: var(--space-5);
    padding-left: var(--space-3);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--primary-green);
    z-index: 2;
    box-shadow: 0 0 0 6px rgba(31, 122, 99, 0.1);
    transition: var(--transition-fast);
}

.timeline-item:hover::before {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(31, 122, 99, 0.2);
}

.timeline-year {
    font-family: var(--font-heading);
    font-size: var(--text-sub);
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: var(--space-1);
    display: inline-block;
}

.timeline-content {
    background: var(--white);
    padding: var(--space-4);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.timeline-item:hover .timeline-content {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Stat Cards */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: var(--space-4);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    z-index: 1;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--grad-primary);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

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

.stat-card:hover::before {
    opacity: 0.03;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: var(--text-hero);
    font-weight: 700;
    color: var(--primary-green);
    line-height: 1;
    margin: var(--space-2) 0;
}

/* Feature Chips */
.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    font-size: var(--text-small);
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-fast);
    cursor: default;
}

.feature-chip i {
    font-size: 16px;
    padding: 6px;
    border-radius: 50%;
    background: rgba(31, 122, 99, 0.1);
    color: var(--primary-green);
    transition: var(--transition-fast);
}

.feature-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-color: rgba(31, 122, 99, 0.2);
}

.feature-chip:hover i {
    background: var(--primary-green);
    color: var(--white);
}

/* Structured Program Cards (.activity-card) */
.activity-card {
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.activity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.activity-card-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.activity-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.activity-card-content {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.activity-card h4 {
    font-size: 20px;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.activity-card:hover h4 {
    color: var(--primary-green);
}

.activity-card p {
    color: var(--text-secondary);
    font-size: var(--text-small);
    line-height: var(--line-height-base);
    margin-bottom: var(--space-3);
    flex: 1;
}

.activity-card-footer {
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: var(--space-3);
    margin-top: auto;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-green);
    font-weight: 600;
    font-size: var(--text-small);
    transition: color 0.3s ease, transform 0.3s ease;
}

.activity-card:hover .read-more-btn {
    color: var(--dark-green);
}

.activity-card:hover .read-more-btn i {
    transform: translateX(4px);
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

/* Magazine Gallery System */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.magazine-grid .featured-item {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 992px) {
    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .magazine-grid .featured-item {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 576px) {
    .magazine-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }

    .magazine-grid .featured-item {
        grid-column: span 1;
        grid-row: span 1;
    }
}

.magazine-item {
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: block;
    box-shadow: var(--shadow-soft);
    background: var(--bg-gray);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    animation: fadeUp 0.6s ease forwards;
    height: 100%;
    width: 100%;
}

.magazine-item:hover {
    box-shadow: var(--shadow-hover);
    z-index: 2;
}

.magazine-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.magazine-item:hover img {
    transform: scale(1.05);
}

.magazine-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(20, 108, 67, 0.95) 0%, rgba(20, 108, 67, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    color: var(--white);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.magazine-item:hover .magazine-overlay {
    opacity: 1;
}

.magazine-overlay h5 {
    transform: translateY(10px);
    transition: transform var(--transition-smooth);
    margin-bottom: var(--space-1);
    color: var(--white);
    font-size: 20px;
    font-family: var(--font-heading);
}

.magazine-overlay span.cat {
    font-size: var(--text-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-green);
    transform: translateY(10px);
    transition: transform var(--transition-smooth);
    transition-delay: 50ms;
    display: block;
    margin-bottom: var(--space-1);
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.magazine-item:hover .magazine-overlay h5,
.magazine-item:hover .magazine-overlay span.cat,
.magazine-item:hover .magazine-overlay .view-indicator {
    transform: translateY(0);
}

.view-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30px);
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-green);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.magazine-item:hover .view-indicator {
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* Filter Navigation */
.filter-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.filter-btn {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.filter-btn:hover {
    border-color: rgba(31, 122, 99, 0.2);
    color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.filter-btn.active {
    background: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
    box-shadow: 0 8px 20px rgba(31, 122, 99, 0.3);
    transform: translateY(-2px);
}

/* Remove old Grid Systems */
/*.row, .col, .grid-2, .grid-3, .grid-4 { ... logic moved to 12-column above ... }*/

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

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

@media (min-width: 768px) {
    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-right: var(--space-5);
    }

    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-right: 0;
        padding-left: var(--space-5);
    }

    .timeline-item::before {
        left: auto;
        right: -42px;
    }

    .timeline-item:nth-child(even)::before {
        left: -10px;
        right: auto;
    }
}

@media (max-width: 1024px) {

    .nav-menu.desktop-only,
    .header-cta.desktop-only {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

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

    .grid-2 {
        gap: var(--space-5);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding-y: 64px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 12px;
    }

    .header-cta.desktop-only {
        display: none;
    }

    .hero-parallax {
        background-attachment: scroll;
    }

    .layered-stat-card {
        position: relative;
        transform: none;
        animation: none;
        margin-bottom: 24px;
        width: 100%;
        left: auto !important;
        bottom: auto !important;
        right: auto !important;
        top: auto !important;
    }

    .program-content {
        transform: translateY(0);
        margin: 0;
        border-radius: 0 0 var(--radius-card) var(--radius-card);
        padding: 24px;
    }

    .testimonial-carousel {
        min-height: 500px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding-y: 48px;
    }
}

/* --- Global Utilities Added for Detail Pages Update --- */

/* Image Lift Hover effect */
.img-lift-shadow {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.img-lift-shadow:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Button Lift Hover effect */
.btn-hover-lift {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease, color 0.3s ease !important;
}

.btn-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

/* Advanced Gallery Layout */

.advanced-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.gallery-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all .35s ease;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.gallery-card:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    opacity: 0;
    transition: opacity .35s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-category {
    font-size: 12px;
    display: inline-block;
    margin-bottom: 6px;
    opacity: .9;
}

.gallery-view {
    font-size: 13px;
    margin-top: 6px;
    display: block;
    opacity: .85;
}

/* Featured Image */

.gallery-featured {
    grid-column: span 2;
    grid-row: span 2;
    height: 420px;
}

.gallery-card:not(.gallery-featured) {
    height: 200px;
}

/* Responsive */

@media(max-width:1024px) {

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

    .gallery-featured {
        grid-column: span 2;
    }

}

@media(max-width:640px) {

    .advanced-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-featured {
        grid-column: auto;
        grid-row: auto;
        height: 260px;
    }

}

/* Contact Page Specific */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-5);
    margin-top: var(--space-5);
}

.contact-card-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    height: 100%;
}

.contact-card {
    background: var(--white);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.contact-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(30, 142, 90, 0.1);
    /* Primary green 10% opacity */
    color: var(--primary-green);
    font-size: 22px;
    flex-shrink: 0;
}

.contact-form-box {
    background: var(--white);
    padding: var(--space-5);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-hover);
}

.form-switch {
    display: flex;
    background: var(--bg-gray);
    padding: 6px;
    border-radius: 12px;
    margin-bottom: var(--space-4);
}

.switch-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    color: #64748b;
    transition: all 0.3s ease;
}

.switch-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
}

.switch-btn.active {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(30, 142, 90, 0.2);
}

@keyframes contactFormFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-form {
    display: none;
}

.contact-form.active {
    display: block;
    animation: contactFormFade 0.4s ease forwards;
}

.input-wrapper {
    position: relative;
    margin-bottom: var(--space-3);
    width: 100%;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper textarea~i {
    top: 24px;
}

.form-control {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: var(--text-base);
    font-family: var(--font-body);
    color: var(--text-primary);
    background: #f8fafc;
    transition: all 0.3s ease;
}

.form-control:hover {
    border-color: #cbd5e1;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(30, 142, 90, 0.15);
}

.form-control:focus+i,
.input-wrapper:focus-within i {
    color: var(--primary-green);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.map-card {
    border-radius: 20px;
    overflow: hidden;
    height: 450px;
    box-shadow: var(--shadow-hover);
    margin-top: var(--space-5);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media(max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 576px) {
    .contact-form .grid {
        grid-template-columns: 1fr !important;
    }
}