/* ============================================
   LINGSPEAK SECTIONS
   1. Hero Section
   2. Section Headers
   3. Social Section
   4. Resources Section
   5. Programs Section (Pixel-Perfect Neon Cards, Standard Headers)
   ============================================ */

/* [Previous CSS 1-4 Unchanged] */
/* 1. HERO SECTION */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Hero Backgrounds */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #f8f9fa;
    overflow: hidden;
}

.hero-background::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(45, 55, 72, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 55, 72, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.animated-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    filter: blur(80px);
    opacity: 0.6;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 25s infinite ease-in-out;
    mix-blend-mode: multiply;
}

.shape-1 {
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(41, 9, 166, 0.3) 0%, rgba(41, 9, 166, 0) 70%);
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 50vw;
    height: 50vw;
    max-width: 500px;
    max-height: 500px;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.25) 0%, rgba(79, 172, 254, 0) 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 30s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    padding: var(--space-4xl) 0;
}

.hero-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    padding: var(--space-lg) 0;
}

.hero-text-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: var(--space-xl);
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--text-7xl);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 540px;
}

.hero-image-right {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 0;
}

.teacher-photo {
    width: 100%;
    max-width: 550px;
    height: auto;
    object-fit: contain;
    transition: var(--transition-base);
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.08));
}

.teacher-photo:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.12));
}

/* Hero Language Buttons */
.language-selector {
    display: flex;
    gap: var(--space-lg);
}

.lang-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: var(--space-lg) var(--space-2xl);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-xl);
    font-size: var(--text-base);
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(41, 9, 166, 0.3);
    overflow: hidden;
}

.lang-button span {
    position: relative;
    z-index: 1;
    color: white;
}

.lang-button:hover {
    transform: translateY(-4px) scale(1.05);
}

/* Mobile Hero Reordering */
@media (max-width: 768px) {
    .hero-grid-two {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .hero-text-left {
        order: 1;
        text-align: center;
        align-items: center;
    }

    .hero-image-right {
        order: 2;
    }

    .hero-title {
        font-size: var(--text-5xl);
    }
}

/* 2. SECTION HEADERS */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-md);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
}

/* 3. SOCIAL SECTION */
.social-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: var(--space-4xl) 0;
}

.social-section .section-title {
    background: none;
    -webkit-text-fill-color: initial;
    color: white;
}

.social-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
    margin-top: var(--space-2xl);
}

.social-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    transition: all 0.4s;
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.social-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.3);
}

.social-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.social-card:hover .social-icon {
    transform: scale(1.1);
}

/* 4. RESOURCES & SERVICES GRIDS */
.services-section {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    padding: var(--space-lg);
}

.resources-section {
    background: #f0f2f5;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.resource-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.resource-image {
    height: 200px;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f5ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary-light);
}

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

.resource-tag {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-primary);
    margin-bottom: var(--space-xs);
}

/* 5. PROGRAMS SECTION */
.programs-section {
    background-color: black;
    /* bg-black */
    color: white;
    position: relative;
    overflow: hidden;
    padding: 120px 0;
}

/* Revert Headers to Global Style (removed overrides) */
/* The global .section-title and .section-subtitle defined above under "2. SECTION HEADERS" will apply */

/* Adjusting subtitle for dark background since default is dark text */
.programs-section .section-subtitle {
    color: #9ca3af;
    /* Light gray for dark background */
}

/* Noise Background */
.programs-bg-noise {
    position: absolute;
    inset: 0;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.2;
    mix-blend-mode: normal;
    pointer-events: none;
    filter: brightness(1) contrast(1.5);
}

/* Grid Layout */
.programs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    /* gap-8 */
    max-width: 72rem;
    /* max-w-6xl */
    margin: 0 auto;
}

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

/* Card Styles */
.program-card {
    position: relative;
    height: 350px;
    width: 100%;
    background-color: #111827;
    /* bg-gray-900 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.5s ease;
}

.program-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

/* Program Specific Colors */
.program-card.blue {
    --card-color: #2962FF;
}

.program-card.cyan {
    --card-color: #00E5FF;
}

.program-card.yellow {
    --card-color: #FFEA00;
}

/* Gradients */
.card-gradient-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    z-index: 0;
    background: linear-gradient(to bottom, var(--card-color) 0%, transparent 100%);
    opacity: 0.8;
}

.card-gradient-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 33%;
    background: linear-gradient(to top, var(--card-color), transparent);
    opacity: 0.2;
    z-index: 10;
    pointer-events: none;
}

.card-noise {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.05;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
}

/* Content Area - Reverted to flex-end */
.program-content-wrapper {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
}

.program-content-inner {
    position: relative;
    z-index: 10;
}

/* Tag */
.program-tag {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.program-tag svg {
    width: 0.75rem;
    height: 0.75rem;
    color: var(--card-color);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.program-tag span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--card-color);
}

/* Title */
.program-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: left;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.25;
    filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07));
}

/* Description */
.program-desc {
    font-size: 0.875rem;
    color: #d1d5db;
    line-height: 1.625;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
    margin-bottom: 0;
    text-align: left;
}

.program-card:hover .program-desc {
    color: white;
}

/* Link Reveal Interaction */
.program-link-revealer {
    height: 0;
    overflow: hidden;
    transition: height 0.5s ease-in-out;
}

.program-card:hover .program-link-revealer {
    height: 2.5rem;
}

.program-link {
    padding-top: 0.75rem;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--card-color);
    transition: opacity 0.5s ease;
    transition-delay: 100ms;
}

.program-card:hover .program-link {
    opacity: 1;
}

.program-link svg {
    width: 1rem;
    height: 1rem;
}

/* Intersection Observer Animations Base */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}