/* ==========================================================================
   1. CSS Variables (:root)
   ========================================================================== */
:root {
    /* Color Palette: Split-Complementary */
    --primary-color: #FF5722;  /* Deep Orange - Energetic, Action-oriented */
    --secondary-color: #03A9F4; /* Light Blue - Trust, Calm */
    --tertiary-color: #009688; /* Teal - Growth, Finance */
    --primary-darker: #E64A19;
    
    /* Background & Text Colors */
    --bg-color: #f7f7f7;
    --bg-color-dark: #1a1a1a;
    --text-color-dark: #222222;
    --text-color-light: #ffffff;
    --border-color: #222222;
    --border-color-light: #444444;
    --subtle-gray: #e0e0e0;
    
    /* Typography */
    --font-header: 'Oswald', sans-serif;
    --font-body: 'Nunito', sans-serif;

    /* Spacing */
    --header-height: 80px;
    --section-padding: 80px 0;

    /* Animations */
    --transition-fast: all 0.2s ease-in-out;
    --transition-bouncy: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* ==========================================================================
   2. Base & Reset Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    color: var(--text-color-dark);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 1.8rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   3. Utility Classes
   ========================================================================== */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.text-center {
    text-align: center;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto 0;
}

/* Global Button Styles */
.btn, button[type="submit"] {
    display: inline-block;
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    padding: 15px 35px;
    border: 3px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color-dark);
    cursor: pointer;
    transition: var(--transition-bouncy);
    text-decoration: none;
}

.btn:hover, button[type="submit"]:hover {
    transform: translateY(-5px) scale(1.05);
    color: var(--text-color-light);
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-darker);
    border-color: var(--primary-darker);
    color: var(--text-color-light);
}

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

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

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 2px solid var(--border-color-light);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-header);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color-light);
    text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--primary-color); }

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color-light);
    font-family: var(--font-header);
    text-transform: uppercase;
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}
.nav-menu a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color-light);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}


/* ==========================================================================
   5. Footer
   ========================================================================== */
.site-footer {
    background-color: var(--bg-color-dark);
    color: var(--text-color-light);
    padding: 4rem 0 2rem;
    border-top: 4px solid var(--primary-color);
}

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

.footer-column h4 {
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}
.footer-column h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}
.footer-column p {
    color: var(--subtle-gray);
    line-height: 1.8;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}
.footer-column ul li a {
    color: var(--subtle-gray);
    text-decoration: none;
}
.footer-column ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-links a {
    color: var(--subtle-gray);
    font-weight: 600;
}
.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color-light);
    color: #aaa;
}

/* ==========================================================================
   6. Section Styles
   ========================================================================== */

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color-light);
    padding: var(--section-padding);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
}

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

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}
.hero-content h1 {
    color: var(--text-color-light); /* IMPORTANT: White text for hero */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin-bottom: 1.5rem;
}
.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* General Section Styling */
#accolades, #instructors, #events, #pricing, #community, #contact, #external-resources {
    padding: var(--section-padding);
}

/* Accolades/Press Section */
.accolades-section {
    background-color: var(--subtle-gray);
}
.accolades-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}
.accolade-item img {
    max-height: 50px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition-fast);
}
.accolade-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Instructors Section & Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}
.card {
    background: var(--text-color-light);
    border: 3px solid var(--border-color);
    text-align: center;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-bouncy);
}
.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}
.card-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 4px solid var(--border-color);
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-content h3 {
    color: var(--primary-color);
}
.card-content h4 {
    color: var(--tertiary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Events Section */
.events-section {
    background-color: var(--text-color-light);
}
.events-list {
    max-width: 900px;
    margin: 0 auto;
}
.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    border: 3px solid var(--border-color);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.event-details {
    flex: 1;
}
.event-date {
    font-family: var(--font-header);
    color: var(--primary-color);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}
.progress-bar-container {
    margin-top: 1rem;
}
.progress-bar-container p {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--subtle-gray);
    border: 1px solid var(--border-color-light);
}
.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--tertiary-color), var(--secondary-color));
}

/* Pricing Section */
.pricing-section {
    background-color: var(--bg-color);
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
}
.pricing-card {
    background: var(--text-color-light);
    border: 3px solid var(--border-color);
    text-align: center;
    padding: 2.5rem 2rem;
    transition: var(--transition-bouncy);
    position: relative;
}
.pricing-card.popular {
    transform: scale(1.05);
    border-color: var(--primary-color);
    z-index: 10;
}
.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 5px 15px;
    font-family: var(--font-header);
    font-size: 0.9rem;
}
.pricing-card h3 {
    font-size: 1.5rem;
}
.price {
    font-family: var(--font-header);
    font-size: 3.5rem;
    color: var(--primary-color);
    margin: 1rem 0;
}
.price span {
    font-size: 1rem;
    color: var(--text-color-dark);
}
.pricing-card ul {
    margin: 2rem 0;
}
.pricing-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--subtle-gray);
}
.pricing-card ul li:last-child {
    border-bottom: none;
}

/* Community / Testimonials */
.community-section {
    position: relative;
    padding: var(--section-padding);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color-light);
}
.section-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(26, 26, 26, 0.85), rgba(26, 26, 26, 0.95));
}
.community-section .container {
    position: relative;
    z-index: 2;
}
.community-section .section-title,
.community-section .section-title::after {
    color: var(--text-color-light);
}
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}
.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    backdrop-filter: blur(5px);
}
.testimonial-card p {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
}
.testimonial-author span {
    font-weight: 600;
}

/* External Resources Section */
.external-resources-section {
    background: var(--text-color-light);
}
.external-resources-section p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}
.resource-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}
.resource-link {
    display: block;
    padding: 1rem 2rem;
    border: 3px solid var(--tertiary-color);
    color: var(--tertiary-color);
    font-family: var(--font-header);
    text-transform: uppercase;
    transition: var(--transition-bouncy);
}
.resource-link:hover {
    background-color: var(--tertiary-color);
    color: var(--text-color-light);
    transform: translateY(-5px) scale(1.05);
    text-decoration: none;
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-color);
}
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    background-color: var(--text-color-light);
    padding: 3rem;
    border: 3px solid var(--border-color);
}
.contact-info p {
    margin-bottom: 1.5rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}
.contact-form label {
    display: block;
    font-family: var(--font-header);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    transition: var(--transition-fast);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--text-color-light);
}
.contact-form button {
    width: 100%;
}
.map-container {
    margin-top: 2rem;
    border: 3px solid var(--border-color);
}
.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   7. Specific Page Styles
   ========================================================================== */
.page-section {
    padding: calc(var(--header-height) + 40px) 0 80px;
}
.page-title {
    text-align: center;
    margin-bottom: 4rem;
}

/* About Page */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.content-image {
    border: 4px solid var(--border-color);
}

/* Legal Pages (Privacy & Terms) */
.legal-page {
    padding-top: 120px; /* IMPORTANT: Prevent overlap with header */
}
.legal-page .container {
    max-width: 800px;
}
.legal-page h3 {
    margin-top: 2.5rem;
}

/* Success Page */
.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* IMPORTANT: Full viewport height */
    text-align: center;
    padding: 40px 0;
}
.success-box {
    background: var(--text-color-light);
    border: 4px solid var(--border-color);
    padding: 4rem;
    max-width: 600px;
}

/* ==========================================================================
   8. Animation Styles
   ========================================================================== */
[data-scroll-animation] {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-scroll-animation].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   9. Media Queries (Responsiveness)
   ========================================================================== */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }

    .content-grid, .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body { font-size: 1rem; }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%; /* Initially hidden */
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.4s ease-in-out;
        gap: 2.5rem;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-menu a {
        font-size: 1.5rem;
    }
    .burger-menu {
        display: block;
    }
    .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);
    }
    
    .event-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .event-item .btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column h4::after {
        margin: 0.5rem auto 0;
    }
    .social-links {
        align-items: center;
    }
}