/* ===================================================================
   Table of Contents
======================================================================
   1. CSS Variables & Root Styles
   2. General Body & Typography
   3. Global Component Styles (Buttons, Cards, Forms)
   4. Header & Navigation
   5. Section Specific Styles
      - Hero Section
      - Accolades Section
      - Vision Section
      - History Section (Accordion)
      - Community Section (Carousel)
      - Resources Section
      - Events Section
      - Contact Section
   6. Footer
   7. Page Specific Styles (Success, Privacy, Terms)
   8. Animations & Utility Classes
   9. Media Queries (Responsiveness)
=================================================================== */

/* 1. CSS Variables & Root Styles
====================================================================== */
:root {
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Rubik', sans-serif;
    
    /* Neumorphism Base Palette */
    --bg-color-light: #eef3f8;
    --bg-color-dark: #d9e0e8;
    --bg-gradient: linear-gradient(145deg, var(--bg-color-dark), var(--bg-color-light));
    
    /* Primary Action Gradient */
    --primary-gradient-start: #4a69bd;
    --primary-gradient-end: #6a89cc;
    --primary-gradient-hover-start: #5a7edc;
    --primary-gradient-hover-end: #7a9eee;
    
    /* Text Colors */
    --text-color-dark: #34495e;
    --text-color-light: #FFFFFF;
    --text-color-subtle: #5e6b7b;
    --text-shadow-light: 1px 1px 3px rgba(0, 0, 0, 0.5);

    /* Neumorphism Shadows */
    --neumorphic-shadow-light: -8px -8px 16px rgba(255, 255, 255, 0.8);
    --neumorphic-shadow-dark: 8px 8px 16px rgba(186, 199, 213, 0.7);
    --neumorphic-shadow-inset-light: inset -6px -6px 12px rgba(255, 255, 255, 0.7);
    --neumorphic-shadow-inset-dark: inset 6px 6px 12px rgba(186, 199, 213, 0.6);

    --border-radius-main: 15px;
}

/* 2. General Body & Typography
====================================================================== */
body {
    font-family: var(--font-body);
    background: var(--bg-color-light);
    color: var(--text-color-dark);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: #2c3e50; /* Darker than body text for emphasis */
}

.section-title {
    font-weight: 800;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

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

a {
    color: var(--primary-gradient-start);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-gradient-end);
    text-decoration: underline;
}

section {
    padding-top: 80px;
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

/* 3. Global Component Styles (Buttons, Cards, Forms)
====================================================================== */
/* --- Buttons --- */
.btn, button, input[type='submit'] {
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: var(--border-radius-main);
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: var(--neumorphic-shadow-dark), var(--neumorphic-shadow-light);
    background: var(--bg-color-light);
    color: var(--text-color-dark);
}

.btn:hover, button:hover, input[type='submit']:hover {
    transform: translateY(-2px);
    box-shadow: 12px 12px 24px rgba(186, 199, 213, 0.8), -12px -12px 24px rgba(255, 255, 255, 0.9);
}

.btn:active, button:active, input[type='submit']:active {
    box-shadow: var(--neumorphic-shadow-inset-dark), var(--neumorphic-shadow-inset-light);
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: var(--text-color-light);
    box-shadow: 6px 6px 12px #c1c9d2, -6px -6px 12px #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(145deg, var(--primary-gradient-hover-start), var(--primary-gradient-hover-end));
    box-shadow: 10px 10px 20px #c1c9d2, -10px -10px 20px #ffffff;
}

.btn-primary:active {
    box-shadow: inset 5px 5px 10px #3e56a0, inset -5px -5px 10px #7ca0fa;
}

/* --- Cards --- */
.card {
    border: none;
    border-radius: var(--border-radius-main);
    background: var(--bg-color-light);
    box-shadow: var(--neumorphic-shadow-dark), var(--neumorphic-shadow-light);
    transition: all 0.3s ease;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 12px 12px 24px rgba(186, 199, 213, 0.8), -12px -12px 24px rgba(255, 255, 255, 0.9);
}

.card .card-image {
    margin-bottom: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.card img {
    max-width: 100%;
    border-radius: 10px;
    margin: 0 auto;
}

/* --- Forms --- */
.form-control, .form-select {
    border: none;
    background-color: var(--bg-color-light);
    border-radius: var(--border-radius-main);
    padding: 15px 20px;
    box-shadow: var(--neumorphic-shadow-inset-dark), var(--neumorphic-shadow-inset-light);
    color: var(--text-color-dark);
    transition: all 0.3s ease;
}
.form-control::placeholder {
    color: var(--text-color-subtle);
}
.form-control:focus, .form-select:focus {
    background-color: var(--bg-color-light);
    box-shadow: var(--neumorphic-shadow-inset-dark), var(--neumorphic-shadow-inset-light), 0 0 0 0.25rem rgba(74, 105, 189, 0.25);
    color: var(--text-color-dark);
}

/* 4. Header & Navigation
====================================================================== */
.header.fixed-top {
    background: rgba(238, 243, 248, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-color-dark);
    margin: 0 10px;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-gradient-start);
    background: rgba(217, 224, 232, 0.7);
}

.navbar-toggler {
    border: none;
    box-shadow: var(--neumorphic-shadow-dark), var(--neumorphic-shadow-light);
}
.navbar-toggler:focus {
    box-shadow: var(--neumorphic-shadow-inset-dark), var(--neumorphic-shadow-inset-light);
}


/* 5. Section Specific Styles
====================================================================== */
/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.hero-title, .hero-subtitle {
    color: var(--text-color-light);
    text-shadow: var(--text-shadow-light);
}

/* --- Accolades Section --- */
#accolades {
    background: var(--bg-gradient);
}
.stat-widget .stat-number {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary-gradient-start);
}

/* --- Vision Section --- */
.progress-indicator .progress {
    background-color: var(--bg-color-dark);
    border-radius: 25px;
    box-shadow: var(--neumorphic-shadow-inset-dark), var(--neumorphic-shadow-inset-light);
}
.progress-indicator .progress-bar {
    background: linear-gradient(145deg, var(--primary-gradient-start), var(--primary-gradient-end));
    border-radius: 25px;
}
.neumorphic-image img {
    border-radius: var(--border-radius-main);
    box-shadow: var(--neumorphic-shadow-dark), var(--neumorphic-shadow-light);
}

/* --- History Section (Accordion) --- */
.accordion-item {
    background-color: transparent;
    border: none;
    margin-bottom: 1.5rem;
}
.accordion-button {
    border-radius: var(--border-radius-main) !important;
    background-color: var(--bg-color-light);
    box-shadow: var(--neumorphic-shadow-dark), var(--neumorphic-shadow-light);
    color: var(--text-color-dark);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.accordion-button:not(.collapsed) {
    box-shadow: var(--neumorphic-shadow-inset-dark), var(--neumorphic-shadow-inset-light);
    background-color: var(--bg-color-light);
    color: var(--primary-gradient-start);
}
.accordion-button:focus {
    box-shadow: var(--neumorphic-shadow-inset-dark), var(--neumorphic-shadow-inset-light);
}
.accordion-button::after {
    filter: brightness(0) saturate(100%) invert(29%) sepia(21%) saturate(986%) hue-rotate(176deg) brightness(91%) contrast(89%);
}
.accordion-body {
    padding: 1.5rem;
    margin-top: -1rem;
    border-bottom-left-radius: var(--border-radius-main);
    border-bottom-right-radius: var(--border-radius-main);
    background: var(--bg-color-light);
    box-shadow: var(--neumorphic-shadow-inset-dark), var(--neumorphic-shadow-inset-light);
}

/* --- Community Section (Carousel) --- */
.testimonial-card {
    padding: 2rem;
}
.testimonial-card .card-image {
    width: 120px;
    height: 120px;
    margin-bottom: 0;
}
.testimonial-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    box-shadow: var(--neumorphic-shadow-dark), var(--neumorphic-shadow-light);
}
.carousel-control-prev, .carousel-control-next {
    width: 5%;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
    filter: invert(1);
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    padding: 1.2rem;
}

/* --- Resources Section --- */
.resource-card .btn {
    font-size: 0.9rem;
    padding: 10px 20px;
}

/* --- Events Section --- */
.event-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--border-radius-main);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

/* --- Contact Section --- */
#contact {
    background: var(--bg-gradient);
}
.contact-form-wrapper.card {
    padding: 2rem;
}

/* 6. Footer
====================================================================== */
.footer {
    background-color: var(--bg-color-dark);
    color: var(--text-color-subtle);
}
.footer-brand, .footer-heading {
    color: var(--text-color-dark);
    font-family: var(--font-heading);
    font-weight: 700;
}
.footer-links li a {
    color: var(--text-color-subtle);
    padding: 5px 0;
    display: inline-block;
}
.footer-links li a:hover {
    color: var(--text-color-dark);
    text-decoration: none;
}
.copyright-text {
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* 7. Page Specific Styles
====================================================================== */
.success-page, .legal-page {
    padding-top: 120px; /* Offset for fixed header */
}
.success-container {
    min-height: calc(100vh - 120px); /* Full viewport height minus padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.success-card {
    max-width: 600px;
}

/* 8. Animations & Utility Classes
====================================================================== */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for elements in a row */
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* 9. Media Queries (Responsiveness)
====================================================================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 15px;
        background: var(--bg-color-light);
        border-radius: var(--border-radius-main);
        padding: 1rem;
        box-shadow: var(--neumorphic-shadow-inset-dark), var(--neumorphic-shadow-inset-light);
    }
    .nav-link {
        margin: 5px 0;
    }
    section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    .hero-section {
        background-attachment: scroll; /* Parallax doesn't work well on mobile */
    }
    .testimonial-card .row {
        flex-direction: column;
    }
    .testimonial-card .card-image {
        margin: 0 auto 1.5rem auto;
    }
    .testimonial-card blockquote {
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    h1.display-3 {
        font-size: 2.5rem;
    }
    .footer {
        text-align: center;
    }
    .footer .col-lg-4, .footer .col-lg-2, .footer .col-lg-3 {
        margin-bottom: 2rem;
    }
}