/* style.css */

/*------------------------------------------------------------------
[Table of Contents]

1. CSS Variables
2. Base & Typography Styles
3. Utility Classes
4. Global Component Styles
    - Buttons
    - Cards
    - Forms
5. Layout Styles
    - Header
    - Footer
    - Main Container
6. Section-Specific Styles
    - Hero Section
    - Mission Section
    - Methodology Section (Progress Bars)
    - Events Section
    - Insights Section (Stat Widgets)
    - Awards Section
    - Behind the Scenes Section
    - External Resources Section
    - Contact Section
7. Page-Specific Styles
    - success.html
    - privacy.html & terms.html
8. Animations & Transitions
-------------------------------------------------------------------*/

/* 1. CSS Variables */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'IBM Plex Sans', sans-serif;

    /* Defined in HTML, reiterated here for clarity and potential overrides */
    --color-primary: #0D47A1;       /* Deep Blue */
    --color-primary-dark: #0A3A82;
    --color-secondary: #1565C0;     /* Medium Blue */
    --color-secondary-dark: #1050A0;
    --color-accent: #4CAF50;        /* Green */
    --color-accent-dark: #388E3C;
    --color-accent-light: #81C784;

    --color-text-light: #FFFFFF;
    --color-text-dark: #333333; /* For body text on light backgrounds */
    --color-text-medium: #555555;
    --color-text-heading-dark: #1A202C; /* For headings on light backgrounds */
    --color-text-subtle: #718096; /* gray-500 from Tailwind */

    --color-background-light: #F3F4F6; /* gray-100 from Tailwind */
    --color-background-white: #FFFFFF;

    --color-glass-bg: rgba(255, 255, 255, 0.1); /* Default glass bg for dark backgrounds */
    --color-glass-bg-light-theme: rgba(229, 231, 235, 0.5); /* For glass on light backgrounds (e.g., gray-200 with opacity) */
    --color-border-glass: rgba(255, 255, 255, 0.2);
    --color-border-glass-light-theme: rgba(209, 213, 219, 0.7); /* gray-300 with opacity */

    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 2. Base & Typography Styles */
body {
    font-family: var(--font-secondary);
    color: var(--color-text-dark);
    background-color: var(--color-background-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--color-text-heading-dark);
    margin-bottom: 0.75em; /* Tailwind uses my- classes, this is a fallback */
    line-height: 1.3;
    font-weight: 700;
}
/* Tailwind's text-size classes are preferred but providing fallbacks */
h1 { font-size: 2.5rem; } /* text-4xl or 5xl */
h2 { font-size: 2rem; }   /* text-3xl or 4xl */
h3 { font-size: 1.5rem; } /* text-2xl or xl */
h4 { font-size: 1.25rem; }/* text-xl or lg */

p {
    margin-bottom: 1rem;
    color: var(--color-text-medium);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Removes bottom space under images */
}

/* Base styles for scroll-triggered animations */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
}
[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* 3. Utility Classes */
.container { /* Tailwind has .container, this is for any custom overrides or if not using TW's */
    width: 90%;
    max-width: 1200px; /* Adjust as needed */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.text-on-image-overlay > * {
    position: relative;
    z-index: 2;
}
.text-on-image-overlay::before { /* For ensuring text readability on background images */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
    border-radius: inherit; /* Inherit border-radius from parent if any */
}

.section-padding {
    padding-top: 4rem; /* py-16 from Tailwind is 4rem */
    padding-bottom: 4rem;
}
@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem; /* py-24 from Tailwind is 6rem */
        padding-bottom: 6rem;
    }
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem; /* mb-12 or mb-16 */
    font-size: 2.25rem; /* ~text-4xl */
    font-weight: 800;
    color: var(--color-text-heading-dark);
}
@media (min-width: 768px) {
    .section-heading {
        font-size: 2.75rem;
        margin-bottom: 4rem;
    }
}

/* 4. Global Component Styles */

/* Buttons */
.btn, button, input[type="submit"], input[type="button"] {
    display: inline-block;
    padding: 0.75rem 1.75rem; /* py-3 px-6/7 */
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem; /* text-base or text-lg */
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth "drawn" feel */
    text-decoration: none !important;
    line-height: 1.5; /* Ensure text is vertically centered */
}

.btn:focus, button:focus, input[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb, 76, 175, 80), 0.4); /* Focus ring with accent color */
}

.btn-primary, button[type="submit"] /* Default form submit button style */ {
    background-color: var(--color-accent);
    color: var(--color-text-light);
    border-color: var(--color-accent);
}
.btn-primary:hover, button[type="submit"]:hover {
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-color: var(--color-primary);
}
.btn-secondary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    transform: translateY(-2px);
}

/* Read More Link Style */
.read-more-link {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}
.read-more-link::after {
    content: ' \2192'; /* Right arrow */
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}
.read-more-link:hover {
    color: var(--color-accent-dark);
    text-decoration: underline;
}
.read-more-link:hover::after {
    transform: translateX(4px);
}

/* Glassmorphism Effect */
.glassmorphism {
    background: var(--color-glass-bg); /* Default for dark backgrounds */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border-glass);
    box-shadow: var(--shadow-lg);
    /* padding is applied by Tailwind or specific section styles */
}

/* For glass elements on lighter backgrounds */
.glassmorphism-light {
    background: var(--color-glass-bg-light-theme);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border-glass-light-theme);
    box-shadow: var(--shadow-md);
}


/* Cards */
.card {
    background-color: var(--color-background-white); /* Default card background */
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden; /* Important for image fitting and border-radius */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    /* align-items: center; For card's direct children if they need centering. Content inside card-content might be text-aligned. */
}
.card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-xl);
}

/* If a card itself is glassmorphic (many are in the HTML) */
.card.glassmorphism {
    background: var(--color-glass-bg-light-theme); /* Assuming cards are mostly on light page backgrounds */
    border-color: var(--color-border-glass-light-theme);
}
.card.glassmorphism:hover {
    box-shadow: 0 8px 40px rgba(0,0,0,0.15); /* Slightly enhanced shadow for glass hover */
}

.card-image { /* Container for the image */
    width: 100%;
    /* height: 200px;  Tailwind h-56 is 14rem/224px. Let Tailwind control this or set a consistent height. */
    /* The HTML uses h-40, h-56 for card images. We respect that. */
    overflow: hidden; /* Ensure image respects border-radius */
    display: flex; /* For centering image if it's smaller than container, though object-fit:cover handles it */
    align-items: center;
    justify-content: center;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crucial for consistent image display */
    transition: transform 0.4s ease;
}
.card:hover .card-image img {
    transform: scale(1.05); /* Subtle zoom on card hover */
}

.card-content {
    padding: 1.5rem; /* p-6 in Tailwind */
    flex-grow: 1; /* Allows content to take up space if card heights are unified by grid */
    color: var(--color-text-dark); /* Ensure text in cards on light bg is dark */
}
.card-content h3 {
    margin-top: 0;
    color: var(--color-primary); /* Card titles match primary color */
    font-size: 1.25rem; /* text-xl */
}
.card-content p {
    color: var(--color-text-medium);
    font-size: 0.95rem; /* Slightly smaller for card text */
    line-height: 1.5;
}

/* Forms: General styling for inputs, textarea for consistency */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB; /* Tailwind gray-300 */
    border-radius: var(--border-radius-sm);
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--color-text-dark);
    background-color: var(--color-background-white);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 13, 71, 161), 0.2); /* Use RGB for box-shadow color */
}
textarea {
    min-height: 120px;
    resize: vertical;
}
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-dark); /* Default label color */
}

/* Progress Bars */
.progress-bar-container {
    background-color: #E5E7EB; /* Tailwind gray-200 */
    border-radius: 9999px; /* pill shape */
    height: 0.75rem; /* h-3 */
    overflow: hidden;
    width: 100%;
}
.progress-bar {
    background-color: var(--color-accent);
    height: 100%;
    border-radius: 9999px;
    transition: width 1s cubic-bezier(0.65, 0, 0.35, 1); /* Smooth fill animation */
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.7rem;
    line-height: 0.75rem; /* Match height */
}


/* 5. Layout Styles */
/* Header */
header {
    /* Tailwind classes handle bg, shadow, sticky, z-index. Ensure these defaults are fine. */
    /* .bg-white/80 backdrop-blur-md shadow-md sticky top-0 z-50 */
    /* Custom styles if needed beyond Tailwind */
}
header .container a.text-2xl { /* Logo */
    font-weight: 800;
}
#mobile-nav-links a { /* Mobile menu links */
    border-bottom: 1px solid var(--color-background-light); /* Subtle separator */
}
#mobile-nav-links a:last-child {
    border-bottom: none;
}
/* Active nav link styling (example, JS might be needed to add 'active' class) */
nav a.active {
    color: var(--color-accent) !important;
    font-weight: 600;
}

/* Footer */
footer {
    background-color: #1F2937; /* Tailwind gray-800 */
    color: #D1D5DB; /* Tailwind gray-300 */
    padding: 3rem 0; /* py-12 */
}
footer h3 {
    color: var(--color-text-light);
    font-size: 1.25rem; /* text-xl */
    margin-bottom: 1rem;
}
footer p, footer ul li a {
    font-size: 0.9rem; /* text-sm */
    color: #9CA3AF; /* Tailwind gray-400 */
}
footer ul li a:hover {
    color: var(--color-accent-light);
    text-decoration: underline;
}
footer .border-t {
    border-color: #374151; /* Tailwind gray-700 */
}
footer #currentYear { /* Span for current year */
    font-weight: 500;
}
/* Footer social links (text-based) */
footer ul li a[target="_blank"] { /* Basic styling for external social links */
    /* Add specific icons via ::before if desired, or just keep as text */
}

/* 6. Section-Specific Styles */

/* Hero Section */
#hero {
    /* min-height: 100vh; -- Already in HTML */
    /* background-size: cover; background-position: center; background-attachment: fixed; -- Already in HTML */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* For overlay */
}
#hero::before { /* Parallax background overlay, same as .text-on-image-overlay::before */
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); /* Darken for text contrast */
    z-index: 1; /* Underneath the .glassmorphism content but above bg image */
}
#hero .glassmorphism { /* The content box within hero */
    position: relative;
    z-index: 2; /* Above the ::before overlay */
    padding: 2rem; /* Tailwind p-8 */
    max-width: 90%;
    background: rgba(0, 0, 0, 0.2); /* Darker glass for hero on image */
    border: 1px solid rgba(255, 255, 255, 0.15);
}
@media (min-width: 768px) {
    #hero .glassmorphism {
        padding: 3rem; /* Tailwind p-12 */
    }
}
#hero h1.hero-text-overlay {
    color: var(--color-text-light); /* Ensure white text */
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7); /* Stronger shadow for hero heading */
}
#hero p.hero-text-overlay {
    color: var(--color-text-light); /* Ensure white text */
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}
/* Curved SVG path at bottom of hero */
#hero .absolute.bottom-0 svg path {
    /* Fill color is set inline in HTML, e.g., fill: rgba(243, 244, 246, 1); to match next section bg */
}

/* Mission Section */
#mission .glassmorphism {
    background-color: var(--color-glass-bg-light-theme); /* Glass on light page background */
    border-color: var(--color-border-glass-light-theme);
}
#mission img {
    border-radius: var(--border-radius-sm);
}

/* Methodology Section */
#methodology .glassmorphism {
    /* Styles for cards in methodology */
    background-color: var(--color-glass-bg-light-theme);
    border-color: var(--color-border-glass-light-theme);
    text-align: center;
}
#methodology .card-image img { /* Icon images */
    width: 80px; /* As per HTML */
    height: 80px; /* As per HTML */
    border-radius: 50%;
    object-fit: contain; /* If icons are not square and need to fit */
}

/* Events Section */
#events .card {
    /* Uses global card styles */
}
#events .card.glassmorphism {
    background-color: var(--color-glass-bg-light-theme);
    border-color: var(--color-border-glass-light-theme);
}

/* Insights Section */
#insights .glassmorphism {
    text-align: center;
    background-color: var(--color-glass-bg-light-theme);
    border-color: var(--color-border-glass-light-theme);
}
#insights .glassmorphism img { /* Stat widget images */
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}
#insights h3 { /* The stat number */
    color: var(--color-accent);
    font-size: 3rem; /* text-5xl */
    font-weight: 800;
    margin-bottom: 0.25rem;
}
#insights .text-gray-600 { /* Stat description */
    color: var(--color-text-medium);
}
#insights .text-sm {
    color: var(--color-text-subtle);
}

/* Awards Section */
#awards .card.glassmorphism {
    text-align: center;
    background-color: var(--color-glass-bg-light-theme);
    border-color: var(--color-border-glass-light-theme);
    padding: 1rem;
}
#awards .card-image {
    height: 8rem; /* h-32 */
}
#awards .card-image img { /* Award icons/images */
    max-width: 100px; /* As per HTML */
    max-height: 100px;
    object-fit: contain;
}

/* Behind the Scenes Section */
#behind-the-scenes .glassmorphism {
    background-color: var(--color-glass-bg-light-theme);
    border-color: var(--color-border-glass-light-theme);
}
#behind-the-scenes img {
    border-radius: var(--border-radius-md);
}

/* External Resources Section */
#external-resources .glassmorphism {
    background-color: var(--color-glass-bg-light-theme);
    border-color: var(--color-border-glass-light-theme);
    height: 100%; /* For consistent height in grid if content varies */
}
#external-resources h3 a {
    color: var(--color-primary);
}
#external-resources h3 a:hover {
    color: var(--color-accent);
}

/* Contact Section */
#contact {
    /* background gradient set inline in HTML */
}
#contact .glassmorphism { /* Form container */
    background: var(--color-glass-bg); /* Darker theme glass, matches HTML */
    border: 1px solid var(--color-border-glass);
}
#contact label {
    color: #E5E7EB; /* Tailwind gray-200, for light text on dark bg */
    font-weight: 500;
}
#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
    background-color: rgba(255, 255, 255, 0.15); /* Semi-transparent white */
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-text-light);
    border-radius: var(--border-radius-sm);
    padding: 0.85rem 1rem;
}
#contact input[type="text"]::placeholder,
#contact input[type="email"]::placeholder,
#contact textarea::placeholder {
    color: #D1D5DB; /* Tailwind gray-300 */
}
#contact input[type="text"]:focus,
#contact input[type="email"]:focus,
#contact textarea:focus {
    border-color: var(--color-text-light);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}
#contact button[type="submit"] {
    background-color: var(--color-text-light);
    color: var(--color-primary); /* Button text color to match primary for contrast */
    font-weight: 700;
    padding: 0.85rem 1.5rem;
}
#contact button[type="submit"]:hover {
    background-color: #F3F4F6; /* Tailwind gray-100 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
#contact .text-gray-200, #contact .text-gray-200 a {
    color: #E5E7EB;
}
#contact .text-gray-200 a:hover {
    color: var(--color-text-light);
}

/* 7. Page-Specific Styles */

/* success.html */
.success-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px); /* Account for typical header/footer height, adjust if needed */
    text-align: center;
    padding: 2rem;
    background-color: var(--color-background-light);
}
.success-page-container .glassmorphism {
    padding: 2rem 3rem;
    background-color: var(--color-glass-bg-light-theme);
    border-color: var(--color-border-glass-light-theme);
}
.success-page-container h1 {
    color: var(--color-accent);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.success-page-container p {
    font-size: 1.1rem;
    color: var(--color-text-dark);
    margin-bottom: 2rem;
}

/* privacy.html & terms.html */
.static-page-content { /* Apply to main content wrapper on these pages */
    padding-top: 100px; /* Adjust if header height changes */
    padding-bottom: 3rem;
    background-color: var(--color-background-white); /* Optional: distinct background for these pages */
}
.static-page-content .container { /* Ensure container within respects padding */
    max-width: 800px; /* Narrower content for readability */
}
.static-page-content h1 {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
}
.static-page-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}


/* 8. Animations & Transitions */
/* (Basic transitions are already on elements like buttons, cards) */
/* Example "Hand-drawn" subtle animation on hover */
.interactive-element-hand-drawn:hover {
    animation: slight-wiggle 0.4s ease-in-out;
}

@keyframes slight-wiggle {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-1deg) scale(1.01); }
    50% { transform: rotate(1deg) scale(1.01); }
    75% { transform: rotate(-0.5deg) scale(1.005); }
    100% { transform: rotate(0deg) scale(1); }
}

/* Parallax - Basic setup for JS to hook into */
.parallax-bg {
    background-attachment: fixed; /* Simple parallax effect */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Ensure Barba.js transitions are smooth if default ones are too abrupt */
.barba-leave-active,
.barba-enter-active {
  transition: opacity .5s ease;
}
.barba-leave-to,
.barba-enter-from {
  opacity: 0;
}

/* Responsive adjustments if Tailwind classes aren't sufficient */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .section-heading { font-size: 1.8rem; margin-bottom: 2rem; }
    .btn, button, input[type="submit"] { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
}