/* ==========================================================================
   1. CSS Variables & Global Styles
   ========================================================================== */

:root {
    /* Color Scheme: Analogous (Blue Base) with a Pop of Accent */
    --primary-color: #1a237e; /* Indigo - Brutalist, strong */
    --secondary-color: #004d40; /* Dark Teal - Eco */
    --accent-color: #ffab00; /* Amber - High contrast accent */
    --primary-darker: #0d123c;
    --accent-darker: #e69a00;

    /* Typography & Neutral Colors */
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Rubik', sans-serif;
    --text-dark: #222222;
    --text-light: #f8f9fa;
    --bg-light: #f1f3f5;
    --bg-dark: #121212;
    --border-color: #333333;
    --white: #ffffff;

    /* Spacing & Sizing */
    --header-height: 80px;
    --container-width: 1140px;
    --container-padding: 15px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; }
h3 { font-size: 1.75rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: -2rem auto 3rem;
    font-size: 1.1rem;
    color: #555;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ==========================================================================
   3. Layout & Helpers
   ========================================================================== */

.container {
    max-width: var(--container-width);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.bg-dark h1, .bg-dark h2, .bg-dark h3 {
    color: var(--text-light);
}

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
    transition: background-color 0.3s ease;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    padding: 5px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after, .nav-menu a.active::after {
    width: 100%;
}

.burger-menu {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 10px;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ==========================================================================
   5. Buttons & Forms
   ========================================================================== */

/* GLOBAL BUTTON STYLES */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px; /* Subtle radius */
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-dark);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--accent-darker);
    border-color: var(--accent-darker);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

.btn-link {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    font-size: 1rem;
}

.btn-link:hover {
    color: var(--primary-color);
}


/* FORM STYLES */
.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 2px;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */

.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 0 var(--container-padding);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-content p {
    font-size: 1.25rem;
    margin: 1.5rem 0 2.5rem;
    color: var(--white);
    font-weight: 400;
}


/* ==========================================================================
   7. Generic Card Component
   ========================================================================== */

.card {
    background-color: var(--white);
    border: 2px solid var(--text-dark);
    box-shadow: 8px 8px 0 var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 var(--accent-color);
}

.card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Removes bottom space */
}

.card-content {
    padding: 1.5rem;
}


/* ==========================================================================
   8. Section Specific Styles
   ========================================================================== */

/* Mission Section */
.mission-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
}

.mission-image .image-container {
    border: 2px solid var(--text-dark);
    padding: 10px;
}

/* Process Section */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.step-card {
    padding: 2rem;
    text-align: center;
}
.step-icon svg {
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.progress-indicator {
    width: 100%;
    height: 8px;
    background-color: #ddd;
    margin-top: 1rem;
}
.progress-bar {
    height: 100%;
    background-color: var(--secondary-color);
}

/* Innovation Section - Carousel */
.content-carousel {
    position: relative;
}
.carousel-track {
    display: flex;
    overflow-x: auto; /* Use scroll for brutalist/simple approach */
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding-bottom: 1rem; /* for scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.carousel-slide {
    flex: 0 0 calc(33.333% - 1.34rem); /* 3 cards with gap */
    scroll-snap-align: start;
}
.carousel-controls {
    text-align: center;
    margin-top: 2rem;
}
.carousel-controls button {
    background: var(--bg-light);
    border: 2px solid var(--text-dark);
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    margin: 0 10px;
}

/* Success Stories / Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Instructors / Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.team-card .card-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-top: -75px; /* Pulls image up */
    border: 4px solid var(--white);
    position: relative;
    z-index: 1;
    background: var(--white);
}
.team-card .card-content {
    padding-top: 5rem;
}
.team-title {
    color: var(--secondary-color);
    font-weight: 700;
    margin-top: -0.5rem;
}


/* Events Section */
.event-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    border: 2px solid var(--text-dark);
    margin-bottom: 1.5rem;
    align-items: center;
}
.event-date {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--primary-color);
    flex-shrink: 0;
}
.event-date .day {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}
.event-date .month {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Media / External Resources */
.external-links-container .link-item {
    border-bottom: 1px solid #ddd;
    padding: 1.5rem 0;
}
.external-links-container .link-item:last-child {
    border-bottom: none;
}
.link-url {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}
.link-description {
    color: #666;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}
.contact-info ul {
    list-style: none;
    padding: 0;
}
.contact-info li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 1rem;
}


/* ==========================================================================
   9. Footer
   ========================================================================== */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.footer-col p {
    color: #ccc;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul a {
    color: #ccc;
    text-decoration: none;
}

.footer-col ul a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #aaa;
}


/* ==========================================================================
   10. Modal Styles
   ========================================================================== */
.modal {
    border: 2px solid var(--text-dark);
    box-shadow: 10px 10px 0 rgba(0,0,0,0.3);
    padding: 2rem;
    max-width: 600px;
    border-radius: 0;
}
.modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}
.modal-content {
    position: relative;
}
.btn-close-modal {
    position: absolute;
    top: -1rem;
    right: -1rem;
    background: var(--text-dark);
    color: var(--white);
    border: 2px solid var(--text-dark);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   11. Specific Page Styles (Success, Privacy, Terms)
   ========================================================================== */

/* Success Page */
.success-page-body {
    background-color: var(--bg-light);
}

.success-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--container-padding);
}

.success-container h1 {
    color: var(--secondary-color);
}

/* Legal Pages (Privacy, Terms) */
.legal-page-content {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 60px;
}

.legal-page-content h1 {
    margin-bottom: 2rem;
}
.legal-page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}


/* ==========================================================================
   12. Responsive Styles
   ========================================================================== */

@media (max-width: 992px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    h1 { font-size: 2.5rem; }
    .hero-content h1 { font-size: 2.8rem; }
    h2, .section-title { font-size: 2rem; }

    .burger-menu {
        display: block;
        z-index: 1001; /* Above nav menu */
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 20px 0;
    }

    .nav-menu a {
        font-size: 1.2rem;
    }

    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .carousel-slide {
        flex: 0 0 90%;
    }
}