/* Modern Reset & Design System */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* MATHEMATICAL SPACINGS (Fibonacci Sequence - Strict) */
    --space-xs: 8px;
    /* 8px */
    --space-sm: 13px;
    /* 13px - Small gaps */
    --space-md: 21px;
    /* 21px - Related elements */
    --space-lg: 34px;
    /* 34px - Internal padding / Module gap */
    --space-xl: 48px;
    /* 48px - Card Gutters / Icon Size (Not Fibonacci but explicitly requested) */
    --space-2xl: 55px;
    /* 55px - Large Groups */
    --space-3xl: 89px;
    /* 89px - Section Padding */
    --space-4xl: 144px;
    /* 144px - Huge Rhythm */

    /* COLOR ARCHITECTURE */
    /* 60% Dominant */
    --bg-white: #FFFFFF;
    --bg-tint: #F8FAFC;
    /* Light Tint */
    --bg-dark: #1e293b;
    /* New Rich Dark specific request */

    /* 30% Secondary */
    --brand-blue: #2E75B6;

    /* 10% Accent */
    --accent-gold: #F2D84B;
    --accent-gold-hover: #E1C124;

    /* TEXT COLORS */
    --text-primary: #1A1A1A;
    --text-secondary: #475569;
    --text-inverse: #FFFFFF;
    --text-inverse-dim: rgba(255, 255, 255, 0.9);

    /* DIMENSIONS & RATIOS */
    --container-width: 1200px;
    --container-text: 600px;
    /* Text Max Width */
    --header-height: 90px;

    --radius-sm: 4px;
    --radius-md: 6px;
    /* Max 6px for buttons per request */
    --radius-lg: 24px;

    --shadow-subtle: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base for rem calculation */
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* TYPOGRAPHY HIERARCHY (Perfect Fourth Scale) */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

/* H1: Hero Only - 72px */
h1 {
    font-size: clamp(48px, 5vw, 72px);
    letter-spacing: -0.02em;
}

/* H2: Section Headers - 48px */
h2 {
    font-size: clamp(36px, 4vw, 48px);
}

/* H3: Card Titles - 24-26px */
h3 {
    font-size: 24px;
    margin-bottom: var(--space-sm);
}

p {
    font-size: 18px;
    /* Primary Readability */
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    max-width: 75ch;
    /* ~700px max line length */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* UTILITY */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    /* 21px padding */
}

/* COMPONENTS: CARDS & GLASS */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
}

/* BUTTONS & CTAS
   - Height: 48px min
   - Padding: 12px 16px
   - Radius: 4-8px (Avoid pill unless brand required) -> Prompt says avoid pill, but code had pill.
     Prompt: "Border-radius: 4-8px maximum (avoid pill-shaped unless brand requires)"
     I will switch to 8px radius.
*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    /* Exactly 48px */
    padding: 0 32px;
    /* 32px horizontal padding */
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 16px;
    border-radius: var(--radius-md);
    /* 6px max */
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    line-height: 1;
}

/* Primary Action - GOLD ONLY */
.btn-gold {
    background: var(--accent-gold);
    color: #0F172A;
    /* Dark text for contrast on gold */
    box-shadow: 0 4px 12px rgba(242, 216, 75, 0.3);
}

.btn-gold:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(242, 216, 75, 0.4);
}

/* Secondary Action - Ghost Button (Yellow Border) */
.btn-glass {
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: none;
}

.btn-glass:hover {
    border-color: var(--accent-gold-hover);
    color: var(--accent-gold-hover);
    background: rgba(242, 216, 75, 0.05);
}

.btn-sm {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 14px;
}

/* LINKS */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    /* 8px */
    color: var(--brand-blue);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.link-arrow:hover {
    gap: var(--space-sm);
    /* 13px */
    opacity: 0.8;
}

/* NAVIGATION - Apple Island Style */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1100px;
    height: 64px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    /* Island Shape */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);

    /* Floating Shadow */
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

nav:hover {
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 32px;
    height: 100%;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--brand-blue);
}

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

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    position: relative;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--brand-blue);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--brand-blue);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* HERO SECTION */
.hero {
    padding-top: 160px;
    /* Increased to account for island menu */
    padding-bottom: 120px;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-white);
}

.hero-layout {
    display: grid;
    /* Rule of Thirds: 60% left content, 40% right image */
    grid-template-columns: 1.5fr 1fr;
    /* 60/40 split */
    gap: var(--space-xl);
    /* 48px */
    align-items: center;
}



.hero-text h1 {
    margin-bottom: var(--space-md);
    /* 21px spacing to subtext */
}

.hero-text>p {
    font-size: 20px;
    /* Reduced from 36px - was competing with headline */
    line-height: 1.6;
    /* Better readability */
    margin-bottom: var(--space-lg);
    /* 34px to buttons */
    font-weight: 400;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    gap: 24px;
    /* 24px between buttons */
    flex-wrap: wrap;
    margin-top: 0;
    /* Already spaced from p above */
}

.hero-img-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    /* Height based on 1.618 aspect ratio approx to width */
    height: 600px;
    box-shadow: var(--shadow-subtle);
}

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

/* SECTIONS GENERAL */
section {
    padding: var(--space-3xl) 0;
    /* 89px vertical padding */
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-2xl);
    /* 55px margin bottom */
}

/* SECTION SPECIFICS (Alternating Backgrounds) */
.mission {
    background-color: var(--bg-tint);
    /* Gray */
}

.programs {
    background-color: var(--bg-white);
    /* White */
}

/* MISSION */
.mission .glass-panel {
    padding: var(--space-3xl);
    /* 89px */
    max-width: 700px;
    /* Wider for Russian text */
    margin: 0 auto;
    background: #fff;
    border: none;
    box-shadow: var(--shadow-subtle);
}

.mission .section-header {
    text-align: center;
    /* Restored - centered was intentional */
    max-width: 700px;
}

.mission .section-header p {
    text-align: center;
    /* Restored - works better for this content */
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* PROGRAMS Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    /* 48px gutter between cards */
}

.program-card {
    padding: var(--space-lg);
    /* 34px all sides */
    background: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    /* Equal heights */
}

.program-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    /* 13px to description */
}

.program-card p {
    flex-grow: 1;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: var(--space-md);
    /* 21px to CTA link */
}

.program-card .link-arrow {
    margin-top: auto;
    /* Push to bottom */
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-gold);
}

/* TESTIMONIALS (Results) */
.testimonials {
    background-color: var(--bg-tint);
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    /* 48px between cards */
}

.test-card {
    background-color: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    /* Equal heights */
}

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

/* Image card with dark overlay */
.test-card .test-media {
    height: 200px;
    width: 100%;
    object-fit: cover;
    position: relative;
}

.video-box {
    position: relative;
}

.video-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    /* 60% dark overlay */
    z-index: 1;
}

.video-box .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 16px solid var(--brand-blue);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 4px;
}

.test-body {
    padding: var(--space-lg);
    /* 34px */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.test-quote {
    font-style: italic;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    /* 21px */
    color: var(--text-primary);
}

.quote-mark {
    font-size: 48px;
    line-height: 1;
    color: var(--accent-gold);
    font-family: serif;
    margin-bottom: var(--space-md);
    /* 21px below quote mark */
    display: block;
}

.quote-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.test-meta {
    font-size: 14px;
    /* 14-16px per spec */
    font-weight: 600;
    color: var(--brand-blue);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: auto;
    /* Push to bottom */
}

/* HUB (Content) */
.hub {
    background-color: var(--bg-white);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    /* 48px horizontal and vertical */
}

.hub-card {
    display: flex;
    gap: var(--space-lg);
    /* 34px between icon and text */
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: 1px solid transparent;
    align-items: flex-start;
}

.hub-card:hover {
    background: #fff;
    box-shadow: var(--shadow-subtle);
    border-color: rgba(0, 0, 0, 0.05);
}

.hub-icon {
    width: 48px;
    /* Exactly 48px */
    height: 48px;
    /* Exactly 48px */
    background: rgba(46, 117, 182, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    opacity: 0.3;
    /* 30% opacity per spec */
    flex-shrink: 0;
}

.hub-icon svg {
    width: 24px;
    /* Consistent icon size */
    height: 24px;
    stroke-width: 2;
    /* Single outline style */
}

.hub-card h3 {
    font-size: 24px;
    /* 20-24px */
    font-weight: 700;
    margin-top: 0;
    margin-bottom: var(--space-sm);
    /* 13px below headline */
}

.hub-card p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    /* 21px below description */
}

.hub-card .link-arrow {
    font-size: 14px;
    /* 14-16px */
}

/* RESOURCES - Dark Section */
.resources {
    background-color: var(--bg-dark);
    /* #1e293b */
    color: #fff;
    position: relative;
}

/* SVG Shape Divider at top */
.resources::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: linear-gradient(to bottom right, transparent 49%, var(--bg-dark) 50%);
    transform: translateY(-100%);
}

.resources h2,
.resources p {
    color: #fff;
}

.resources p {
    color: var(--text-inverse-dim);
    /* rgba(255,255,255,0.9) */
}

.res-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    /* 48px minimum */
}


.res-card {
    background: rgba(255, 255, 255, 0.07);
    /* Increased from 0.05 for better definition */
    border: 1px solid rgba(255, 255, 255, 0.12);
    /* Increased from 0.1 for subtle contrast */
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    /* 34px */
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.res-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: var(--accent-gold);
}

.res-visual {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.res-visual.gold {
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    background: transparent;
}

.res-body h3 {
    color: #fff;
    font-size: 24px;
    /* 24px per spec */
    margin-bottom: 8px;
}

.res-body p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-inverse-dim);
    /* rgba(255,255,255,0.8) */
    margin-bottom: 16px;
}

/* FINAL CTA */
.cta-section {
    position: relative;
    text-align: center;
    overflow: hidden;
    padding: 120px 0;
    /* Exactly 120px top and bottom */
}

.cta-section h2 {
    margin-bottom: var(--space-md);
    /* 21px to subtext */
}

.cta-section p {
    max-width: var(--container-text);
    /* 600px max */
    margin: 0 auto var(--space-lg);
    /* 34px to button */
    font-size: 18px;
    line-height: 1.6;
}

.cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1552664730-d307ca884978?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') center/cover;
    opacity: 0.1;
    z-index: -2;
    filter: grayscale(100%);
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0.8), #fff);
    z-index: -1;
}

/* FOOTER */
footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--space-2xl) 0 var(--space-xl);
    background: var(--bg-dark);
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer-desc {
    color: #94A3B8;
    max-width: 400px;
    font-size: 14px;
}

.footer-links a {
    display: block;
    margin-bottom: 16px;
    color: #94A3B8;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(4px);
}

.socials {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: #fff;
    font-size: 12px;
}

.social-icon:hover {
    background: var(--brand-blue);
    transform: scale(1.1);
}

.legal {
    color: #475569;
    font-size: 12px;
    margin-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
}

/* BLOG STYLES (Legacy Support with New System) */
.blog-hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-hero h1 {
    font-size: 56px;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.blog-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-subtle);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-blue);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-body {
    padding: var(--space-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    font-size: 12px;
    font-weight: 800;
    color: var(--brand-blue);
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.card-title {
    font-size: 22px;
    margin-bottom: 16px;
    line-height: 1.3;
    font-weight: 700;
}

.card-excerpt {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-author {
    color: var(--text-primary);
    font-weight: 700;
}

#loader {
    text-align: center;
    font-size: 20px;
    padding: 60px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

/* ISLAND NAVIGATION - RESPONSIVE ADJUSTMENTS */
@media (max-width: 968px) {
    nav {
        top: 12px;
        width: calc(100% - 24px);
        height: 56px;
        border-radius: 16px;
    }

    nav .container {
        padding: 0 20px;
    }

    .logo {
        font-size: 18px;
    }
}

/* MOBILE MEDIA QUERIES */
@media (max-width: 968px) {

    /* Dimensions */
    :root {
        --container-width: 100%;
    }

    section {
        padding: var(--space-xl) 0;
        /* 55px Mobile Payload */
    }

    h1 {
        font-size: 42px;
    }

    h2 {
        font-size: 32px;
    }

    /* Layouts */
    .hero-layout,
    .grid-3,
    .grid-2,
    .footer-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    /* Hero Specifics */
    .hero {
        padding-top: 100px;
    }

    .hero-img-wrapper {
        height: 350px;
        order: -1;
        /* Image Top */
        transform: none;
    }

    .hero-text {
        padding-right: 0;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .nav-links {
        display: none;
        /* Hidden on mobile per existing behavior */
    }

    /* Adjustments */
    .res-card {
        flex-direction: column;
        padding: var(--space-lg);
        text-align: center;
    }

    .orb {
        opacity: 0.3;
    }
}

@media (max-width: 600px) {
    .blog-hero h1 {
        font-size: 36px;
    }
}