/* style.css */

/* ==========================================================================
   1. CSS Variables & Root Styles
   ========================================================================== */
:root {
    /* Color Palette (Pastel) */
    --color-primary: #4a90e2; /* Soft Blue */
    --color-secondary: #f5a623; /* Muted Orange */
    --color-accent: #b8e986;   /* Pastel Green */
    --color-background-light: #f4f7f9;
    --color-background-dark: #2c3e50;
    --color-text-dark: #34495e;
    --color-text-light: #ffffff;
    --color-text-subtle: #7f8c8d;
    --glass-background: rgba(255, 255, 255, 0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

    /* Typography */
    --font-heading: 'Archivo Black', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Spacing & Layout */
    --header-height: 80px;
    --container-width: 1200px;
    --section-padding: 6rem 0;
    --card-border-radius: 15px;
    --btn-border-radius: 8px;

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

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

#page-wrapper {
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   3. Typography & Utility Classes
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-secondary); }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
    position: relative;
}

.section-light {
    background-color: #eef3f6;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    color: #222222;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    color: var(--color-text-subtle);
}

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.header.scrolled {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
    border-bottom: var(--glass-border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: bold;
}
.header.scrolled .navbar-brand {
    color: var(--color-text-dark);
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar-nav a {
    color: var(--color-text-light);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

.header.scrolled .navbar-nav a {
    color: var(--color-text-dark);
}
.header .navbar-nav a:hover, .header.scrolled .navbar-nav a:hover {
    color: var(--color-secondary);
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width var(--transition-smooth);
}

.navbar-nav a:hover::after {
    width: 100%;
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}
.burger-menu span {
    width: 2rem;
    height: 0.25rem;
    background: var(--color-text-light);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}
.header.scrolled .burger-menu span {
    background: var(--color-text-dark);
}

/* ==========================================================================
   5. Global Component Styles
   ========================================================================== */

/* --- Buttons --- */
.btn, button[type="submit"] {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    border-radius: var(--btn-border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: width var(--transition-smooth);
    z-index: -1;
}
.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}
.btn-primary:hover {
    background-color: #3a7bc8;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}
.btn-secondary:hover {
    background-color: #d89115;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(245, 166, 35, 0.3);
}

.btn-text {
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}
.btn-text:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* --- Cards --- */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: white;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    height: 100%;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.glass-card {
    background: var(--glass-background);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--card-border-radius);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--color-text-dark);
}

.card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    overflow: hidden;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}
.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-content h3 {
    margin-top: 0;
}
.card-content p {
    flex-grow: 1;
}

.columns-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ==========================================================================
   6. Section-Specific Styles
   ========================================================================== */

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-title {
    color: var(--color-text-light);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
}
.hero-subtitle {
    color: var(--color-text-light);
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    opacity: 0.9;
}

/* --- Insights Section --- */
.insights-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}
.toggle-switch-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    background: #e0e5ec;
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: inset 5px 5px 10px #bec3c9, inset -5px -5px 10px #ffffff;
}
.switch {
    position: relative;
}
.switch input {
    display: none;
}
.switch .slider {
    display: block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-text-subtle);
    transition: all var(--transition-smooth);
}
.switch input:checked + .slider {
    background: var(--color-primary);
    color: var(--color-text-light);
    box-shadow: 0 3px 15px rgba(74, 144, 226, 0.4);
}
.insight-content {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}
.insight-content.active {
    display: grid;
    animation: fadeIn 0.6s ease-in-out;
}
.insight-media img {
    border-radius: var(--card-border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.insight-text {
    padding: 2.5rem;
    text-align: left;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Events Section (Slider) --- */
.custom-slider-container {
    position: relative;
    padding: 0 3rem;
}
.slider-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding-bottom: 1rem; /* For scrollbar */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.slider-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.slider-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
}
.event-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
    text-align: left;
}
.event-image {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
.event-date {
    font-weight: bold;
    color: var(--color-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}
.slider-controls button {
    pointer-events: all;
    background: var(--color-text-light);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: all var(--transition-fast);
}
.slider-controls button:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}
.slider-prev { margin-left: -20px; }
.slider-next { margin-right: -20px; }


/* --- External Resources Section --- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.resource-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: all var(--transition-smooth);
}
.resource-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.15);
}
.resource-card h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.resource-card p {
    flex-grow: 1;
    font-size: 0.9rem;
    color: var(--color-text-dark);
}
.resource-source {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--color-text-subtle);
    margin-top: 1rem;
    align-self: flex-start;
}

/* --- Careers (CTA) Section --- */
.section-cta {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
    padding: 8rem 0;
    position: relative;
    color: var(--color-text-light);
}
.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(74, 144, 226, 0.8), rgba(44, 62, 80, 0.85));
    z-index: 1;
}
.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}
.cta-title {
    color: var(--color-text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
.cta-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* --- Contact Section --- */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
}
.contact-form {
    padding: 3rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border-radius: var(--btn-border-radius);
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-dark);
    transition: all var(--transition-fast);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}
.contact-form button {
    width: 100%;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.footer {
    background-color: var(--color-background-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-col h4 {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}
.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 0.75rem;
}
.footer-col ul a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
    font-size: 0.9rem;
}
.footer-col ul a:hover {
    color: var(--color-text-light);
    text-decoration: underline;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* ==========================================================================
   8. Modals
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    margin: auto;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideInUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.close-modal {
    color: var(--color-text-dark);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}
@keyframes slideInUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   9. Standalone Pages (Success, Privacy, etc.)
   ========================================================================== */
.page-success, .page-content {
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 4rem;
}

.page-success {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
}
.success-content {
    max-width: 600px;
}
.success-content h1 {
    color: var(--color-primary);
}

.page-content .container {
    max-width: 800px;
}

/* ==========================================================================
   10. Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .insight-content {
        grid-template-columns: 1fr;
    }
    .insight-media {
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }
    .insight-text {
        text-align: center;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 0;
    }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .navbar-nav {
        display: none; /* Hide for burger menu */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--color-background-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform var(--transition-smooth);
    }
    .navbar-nav.active {
        display: flex;
        transform: translateX(0);
    }
    .navbar-nav a {
        color: var(--color-text-light);
        font-size: 1.5rem;
    }
    .burger-menu {
        display: flex;
        z-index: 1001; /* Above mobile menu */
    }

    /* Burger Menu Active State */
    .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);
    }
    .header.scrolled .burger-menu.active span, .burger-menu.active span {
        background: var(--color-text-light);
    }
    
    .slider-slide {
        flex: 0 0 100%;
    }
    .event-card {
        flex-direction: column;
        text-align: center;
    }
    .event-image {
        width: 100%;
        height: 180px;
    }
    .custom-slider-container {
        padding: 0;
    }
    .slider-controls {
        display: none; /* Hide arrows on mobile, rely on swipe */
    }
}