/* -------------------------------------------------------
   1. ROOT VARIABLES (Semantic Tokens)
---------------------------------------------------------- */
:root {
    /* Brand Colors (mapped to Tailwind palette) */
    --color-blue-100: #e0f2fe;
    --color-blue-500: #3b82f6;
    --color-blue-900: #1e3a8a;

    --color-teal-100: #ccfbf1;
    --color-teal-500: #14b8a6;
    --color-teal-900: #134e4a;

    --color-warm-100: #f5f5f4;
    --color-warm-500: #78716c;
    --color-warm-900: #292524;

    /* Legacy brand accents preserved */
    --color-orange: #f26b3a;

    /* Layout */
    --max-width: 1100px;

    /* Shadows */
    --shadow-card: 0 3px 10px rgba(0, 0, 0, 0.24);
}

/* -------------------------------------------------------
   2. RESET
---------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* -------------------------------------------------------
   3. TYPOGRAPHY SYSTEM
---------------------------------------------------------- */
body {
    font-family: 'Inter', sans-serif;
    color: var(--color-warm-900);
    background-color: var(--color-warm-100);
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    color: var(--color-blue-900);
    line-height: 1.2;
}

p {
    color: var(--color-warm-500);
    line-height: 1.55;
    font-size: 1rem;
}

/* Programs page heading refinement */ 
.programs-page .section-title { 
	font-size: 1.875rem; /* text-3xl */ 
	line-height: 1.2;
	font-weight: 700;
}

/* Events page heading refinement */ 
.events-page .section-title { 
	font-size: 1.875rem; /* text-3xl */ 
	line-height: 1.2;
	font-weight: 700;
}

/* Donation page: strengthen gratitude section heading */ 
.donation-page .section-title { 
	font-size: 1.875rem; /* text-4xl equivalent */ 
	font-weight: 700; /* ensure bold */  
}

/* -------------------------------------------------------
   4. SECTION SYSTEM
---------------------------------------------------------- */
.section {
    padding: 4rem 1.5rem;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section-blue {
    background-color: var(--color-blue-100);
}

.section-white {
    background-color: #ffffff;
}

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

/* Programs page: tighten vertical spacing between program sections */
.programs-page section.section {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Events page: tighten vertical spacing between sections */
.events-page section.section {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* -------------------------------------------------------
   5. GRID SYSTEM (Tailwind handles most grids)
---------------------------------------------------------- */

/* Auto-fit responsive cards */
.grid-auto {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

@media (min-width: 640px) {
    .grid-auto {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

/* Optional split layout */
.grid-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

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

/* -------------------------------------------------------
   6. CARD SYSTEM
---------------------------------------------------------- */
.text-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
}

/* Programs page spacing refinement */ 
.programs-page .text-card { 
	margin-bottom: 2rem; /* instead of the default 3–4rem */ 
}

/* Card heading */
.text-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-blue-900);
    margin-bottom: 0.75rem;
}

/* Card body */
.text-card p {
    font-size: 1rem;
    color: var(--color-warm-500);
    line-height: 1.55;
}

/* Link-style card (replaces inline styles) */
.card-link {
    display: block;
    padding: 1.25rem;
    text-decoration: none;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* -------------------------------------------------------
   7. BUTTONS
---------------------------------------------------------- */
.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-orange);
    color: #ffffff;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
}

/* -------------------------------------------------------
   8. HERO COMPONENT
---------------------------------------------------------- */
.hero {
    background: radial-gradient(circle at top left, #3f7cc4, #0b2b4c);
    color: #ffffff;
    padding: 4rem 1.5rem 3.5rem;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.hero-text h1 {
    color: #ffffff;
    font-size: clamp(2rem, 3vw + 1rem, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.05rem;
    max-width: 32rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.hero-visual {
    position: relative;
    min-height: 220px;
}

.brain-box {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    background: radial-gradient(circle at 20% 20%, #7fb3ff, #1f4f7b);
    overflow: hidden;
}

.brain-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
    opacity: 0.4;
}

/* Single-column hero for interior pages (pure CSS version) */
.hero-simple {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, #3f7cc4, #0b2b4c);
    color: #ffffff;
    padding: 5rem 1.5rem;
}

.hero-simple-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.hero-simple h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 4vw + 1rem, 3.5rem);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.hero-simple p {
    margin-top: 1rem;
    font-size: 1.15rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-warm-100);
}


/* -------------------------------------------------------
   9. MODAL COMPONENT
---------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    max-width: 700px;
    width: 90%;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.8rem;
    color: var(--color-warm-500);
    background: none;
    border: none;
    cursor: pointer;
}

/* -------------------------------------------------------
   10. UTILITIES
---------------------------------------------------------- */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Event accent borders */
.event-accent-blue {
    border-left: 4px solid var(--color-blue-500);
}

.event-accent-teal {
    border-left: 4px solid var(--color-teal-500);
}

/* Footer heading contrast fix */ 
footer h3, 
footer h4 { 
	color: #ffffff; 
}

/* -------------------------------------------------------
   11. RESPONSIVE ADJUSTMENTS
---------------------------------------------------------- */
@media (max-width: 800px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
}


/* -------------------------------------------------------
   12. VIDEO COMPONENTS
---------------------------------------------------------- */
/* Responsive video container */
.video-container { 
    position: relative; 
    width: 100%; 
    padding-bottom: 56.25%; /* 16:9 aspect ratio */ 
    height: 0; 
}

.video-container iframe { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    border: 0; 
}

/* -------------------------------------------------------
   13. TEAM COMPONENTS
---------------------------------------------------------- */

/* Team page separators */
.team-section {
    border-top: 2px solid rgba(0,0,0,0.08);
    padding-top: 3rem;
    margin-top: 3rem;
}

/* Placeholder images */
.placeholder-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #e5e7eb; /* light gray */
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

/* Centered team grid with max 3 per row */
.team-grid {
    display: grid;
    gap: 2rem;
    justify-content: center; /* centers the entire row */
    grid-template-columns: repeat(auto-fit, minmax(260px, 260px)); 
    /* fixed width columns = consistent image sizes */
    max-width: 900px; /* ensures no more than 3 per row */
    margin-left: auto;
    margin-right: auto;
}


/* Subsection titles */
.subsection-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-blue-900);
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}






