/*
 * 24YMTC – Custom Styles
 * Smile Foundation Inspired Design
 * Primary Green: #0B8A63
 * Secondary Gold: #FFD91A
 * Accent Red: #E53935
 */

/* ================================
   Base & Resets
   ================================ */
*,
*::before,
*after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #0B8A63;
    color: #fff;
}

:focus-visible {
    outline: 2px solid #0B8A63;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ================================
   Top Bar
   ================================ */
.top-bar {
    background: #0A6D56;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
}

/* ================================
   Navbar
   ================================ */
#navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hamburger-line {
    transform-origin: center;
}

#mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ================================
   Hero – Smile Foundation Style
   ================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(160deg, #0B8A63 0%, #0A6D56 40%, #07573D 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255, 217, 26, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating shapes */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 217, 26, 0.08);
    top: -100px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    bottom: 10%;
    left: 5%;
    animation: float 15s ease-in-out infinite reverse;
}

.hero-shape-3 {
    width: 150px;
    height: 150px;
    background: rgba(255, 217, 26, 0.06);
    top: 30%;
    right: 20%;
    animation: float 18s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(5deg); }
    66% { transform: translateY(10px) rotate(-3deg); }
}

/* ================================
   Impact Stats Bar
   ================================ */
.impact-bar {
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
    margin-top: -3rem;
    position: relative;
    z-index: 20;
}

/* ================================
   Section Styles
   ================================ */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0B8A63;
    margin-bottom: 0.75rem;
}

.section-eyebrow::before {
    content: '';
    width: 2rem;
    height: 3px;
    background: #FFD91A;
    border-radius: 2px;
}

/* ================================
   Cards
   ================================ */
.program-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.program-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0B8A63, #FFD91A);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.program-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(11, 138, 99, 0.1);
    border-color: transparent;
}

.program-card:hover::after {
    transform: scaleX(1);
}

.program-card .icon-wrapper {
    transition: all 0.3s ease;
}

.program-card:hover .icon-wrapper {
    background: #0B8A63;
    color: white;
    transform: scale(1.05);
}

/* ================================
   Statistics – Smile Style
   ================================ */
.stat-box {
    position: relative;
    text-align: center;
    padding: 1.5rem 1rem;
}

.stat-box::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
}

.stat-box:last-child::after {
    display: none;
}

/* ================================
   Gallery
   ================================ */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.gallery-item img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 138, 99, 0.85), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

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

/* ================================
   Committee Cards
   ================================ */
.committee-card {
    transition: all 0.3s ease;
}

.committee-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(11, 138, 99, 0.1);
}

.committee-card .avatar-ring {
    position: relative;
}

.committee-card .avatar-ring::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0B8A63, #FFD91A);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.committee-card:hover .avatar-ring::before {
    opacity: 1;
}

/* ================================
   Animations
   ================================ */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 80ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(7) { transition-delay: 480ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(8) { transition-delay: 560ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(9) { transition-delay: 640ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(10) { transition-delay: 720ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(11) { transition-delay: 800ms; opacity: 1; transform: translateY(0); }

/* ================================
   Page Header
   ================================ */
.page-header {
    position: relative;
    padding: 9rem 0 4rem;
    background: linear-gradient(160deg, #0B8A63 0%, #0A6D56 100%);
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(255, 217, 26, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 40px;
    background: white;
    clip-path: ellipse(55% 100% at 50% 100%);
}

/* ================================
   Buttons
   ================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #FFD91A;
    color: #1F2937;
    font-weight: 700;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(255, 217, 26, 0.35);
}

.btn-primary:hover {
    background: #FFE026;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 217, 26, 0.5);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: white;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #0B8A63;
    font-weight: 600;
    border: 2px solid #0B8A63;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #0B8A63;
    color: white;
    transform: translateY(-2px);
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #E53935;
    color: white;
    font-weight: 700;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(229, 57, 53, 0.35);
}

.btn-accent:hover {
    background: #D32F2F;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.5);
}

/* ================================
   Form Elements
   ================================ */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #0B8A63;
    box-shadow: 0 0 0 3px rgba(11, 138, 99, 0.1);
}

.form-input::placeholder {
    color: #9CA3AF;
}

/* ================================
   CTA Banner
   ================================ */
.cta-banner {
    background: linear-gradient(135deg, #FFD91A 0%, #FFE93D 50%, #FFF176 100%);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 50%, rgba(11, 138, 99, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 30%, rgba(229, 57, 53, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* ================================
   Scrollbar
   ================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0B8A63;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0A6D56;
}

/* ================================
   Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in {
        opacity: 1;
        transform: none;
    }

    .stagger-children > * {
        opacity: 1;
        transform: none;
    }

    .hero-shape {
        animation: none;
    }
}

/* ================================
   Print
   ================================ */
@media print {
    #navbar,
    footer,
    #back-to-top,
    .top-bar {
        display: none !important;
    }

    .hero-section {
        min-height: auto;
        padding: 2rem;
        background: white;
        color: black;
    }
}
