/* ==========================================================================
   1. ROOT VARIABLES
   ========================================================================== */

:root {
    /* Color Palette (Pastel) */
    --primary-color: #a0c4ff;
    --primary-color-dark: #8aaae6;
    --secondary-color: #cdb4db;
    --accent-color: #ffadad;
    --accent-color-dark: #e69c9c;
    --bg-color: #f8f7ff;
    --surface-color: #ffffff;
    --text-color: #333333;
    --heading-color: #222222;
    --white-color: #ffffff;
    --border-color: #e0e0e0;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border-color: rgba(255, 255, 255, 0.4);
    --glass-blur: 10px;

    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    /* Transitions & Animations */
    --transition-smooth: all 0.3s ease-in-out;
    --transition-bouncy: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);

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

/* ==========================================================================
   2. GLOBAL STYLES & RESET
   ========================================================================== */

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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

.main-wrapper {
    width: 100%;
    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--primary-color-dark);
}

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

ul {
    list-style: none;
}

section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

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

/* ==========================================================================
   3. GLOBAL UI COMPONENTS (BUTTONS, CARDS, FORMS)
   ========================================================================== */

/* Buttons */
.cta-button, .cta-button-small, button, input[type='submit'] {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    background-color: var(--accent-color);
    color: var(--white-color);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: var(--transition-bouncy);
    transform-origin: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cta-button:hover, .cta-button-small:hover, button:hover, input[type='submit']:hover {
    background-color: var(--accent-color-dark);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.cta-button-small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: var(--surface-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: var(--transition-bouncy);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.15);
}

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h3 {
    font-size: 1.3rem;
}

/* Glassmorphism Effect */
.glassmorphism {
    background: var(--glass-bg);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-color);
    padding: 2rem;
}

/* Forms */
.contact-form .form-group {
    position: relative;
    margin-bottom: 2rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--glass-border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--heading-color);
    transition: var(--transition-smooth);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(160, 196, 255, 0.5);
}

.contact-form label {
    position: absolute;
    top: 14px;
    left: 14px;
    color: #666;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.contact-form input:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form textarea:focus + label,
.contact-form textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    background-color: #f0f3ff;
    padding: 0 5px;
    color: var(--primary-color);
}

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    padding: 1rem 0;
    background: var(--glass-bg);
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading-color);
}

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

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--heading-color);
    position: relative;
}

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

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--heading-color);
    transition: all 0.3s ease-in-out;
}


/* ==========================================================================
   5. SECTION STYLES
   ========================================================================== */

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white-color);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(20, 20, 40, 0.6), rgba(50, 20, 70, 0.5));
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--white-color);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--white-color);
    opacity: 0.9;
}

/* Process Section */
.curved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.process-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.process-card:nth-child(even) {
    transform: translateY(20px);
}

.process-icon img {
    margin: 0 auto 1.5rem auto;
    width: 80px;
    height: 80px;
}

/* Research Section */
.research-section .parallax-container {
    padding: 0;
}
.research-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.research-image-container {
    flex: 1 1 45%;
}
.research-image-container img {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.research-text {
    flex: 1 1 55%;
}
.section-title-left {
    text-align: left;
    font-size: 2.2rem;
}

/* Workshops & Slider */
.slider-container {
    position: relative;
}
.custom-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.custom-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.slide {
    flex: 0 0 33.33%;
    padding: 1rem;
    scroll-snap-align: center;
}
.slider-nav {
    text-align: center;
    margin-top: 2rem;
}
.slider-nav button {
    background-color: var(--surface-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin: 0 0.5rem;
    font-size: 1.5rem;
    line-height: 45px;
    padding: 0;
}
.slider-nav button:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}
.modal-content {
    width: 90%;
    max-width: 600px;
    animation: bounceIn 0.5s;
}
.close-button {
    color: var(--heading-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Insights Section */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.read-more {
    font-weight: bold;
    color: var(--accent-color);
    margin-top: auto;
    padding-top: 1rem;
}
.read-more:hover {
    color: var(--accent-color-dark);
    text-decoration: underline;
}

/* Events Section */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
.event-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
}
.event-date {
    background: var(--accent-color);
    color: var(--white-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    font-family: var(--font-heading);
    flex-shrink: 0;
}
.event-date .month {
    font-size: 0.9rem;
    font-weight: 500;
}
.event-date .day {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}
.event-details {
    flex-grow: 1;
}
.event-details h3 {
    font-size: 1.2rem;
}
.event-item .cta-button-small {
    margin-left: auto;
    flex-shrink: 0;
}

/* Resources Section */
.resources-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.resource-link {
    padding: 1rem 1.5rem;
    color: var(--heading-color);
    transition: var(--transition-bouncy);
}
.resource-link:hover {
    transform: scale(1.05);
    background: var(--glass-bg);
}

/* Contact Section */
.contact-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    opacity: 0.7;
}
.contact-wrapper {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.contact-form {
    margin-top: 2rem;
    text-align: left;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.footer {
    background-color: #e6e9f5;
    padding: 60px 0 20px 0;
    color: #444;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
    position: relative;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    background-color: var(--primary-color);
    height: 2px;
    width: 50px;
}
.footer-col ul li {
    margin-bottom: 0.8rem;
}
.footer-col ul a {
    color: #555;
    transition: var(--transition-smooth);
}
.footer-col ul a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* ==========================================================================
   7. OTHER PAGES (SUCCESS, PRIVACY, ETC)
   ========================================================================== */
.page-success {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    padding: 2rem;
}

.success-content {
    max-width: 600px;
}

.page-legal {
    padding-top: calc(var(--header-height) + 60px); /* 140px total */
    padding-bottom: 60px;
}

.page-legal h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.page-legal h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}


/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 992px) {
    .section-title { font-size: 2.2rem; }
    .hero-title { font-size: 2.8rem; }
    .research-content { flex-direction: column; }
    .slide { flex: 0 0 50%; }
}

@media (max-width: 768px) {
    :root { --section-padding: 60px 0; }
    .section-title { font-size: 2rem; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--surface-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        gap: 0;
    }
    .nav-menu.active { left: 0; }
    .nav-item { padding: 1.5rem 0; }
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .curved-grid { grid-template-columns: 1fr; }
    .process-card:nth-child(even) { transform: translateY(0); }
    
    .slide { flex: 0 0 100%; }

    .event-item { flex-direction: column; text-align: center; }
    .event-item .cta-button-small { margin-left: 0; margin-top: 1rem; }
}