/* ==========================================================================
   1. Root Variables & Global Styles
   ========================================================================== */
:root {
    --color-primary: #8A2BE2; /* Un violeta futurista */
    --color-primary-dark: #6A1B9A;
    --color-secondary: #FFC0CB; /* Rosa pastel */
    --color-accent: #00BFFF; /* Azul cielo */
    --color-background: #FDF6FF; /* Un blanco lavanda muy claro */
    --color-light-background: #FFFFFF;
    --color-text: #333333;
    --color-heading: #222222;
    --color-white: #FFFFFF;
    --color-border: #E0E0E0;

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

    --header-height: 80px;
    --border-radius: 12px;
    --box-shadow: 0 8px 24px rgba(149, 157, 165, 0.2);
    --transition-speed: 0.3s ease;
}

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

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

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

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

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

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

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

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

ul {
    list-style: none;
}

/* ==========================================================================
   2. Utility & Layout Classes
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 6rem 0;
}

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

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

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

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

/* Basic Grid System */
.columns {
    display: flex;
    flex-wrap: wrap;
    margin: -1rem;
}

.column {
    padding: 1rem;
    flex: 1;
    min-width: 300px; /* Prevents columns from becoming too narrow */
}

.is-two-thirds {
    flex: 0 0 66.666%;
}

.is-one-third {
    flex: 0 0 33.333%;
}
.is-centered {
    justify-content: center;
}
.is-multiline {
    flex-wrap: wrap;
}

/* ==========================================================================
   3. Global Components (Buttons, Cards, Forms)
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: all var(--transition-speed);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(138, 43, 226, 0.6);
    color: var(--color-white);
    text-decoration: none;
}

/* Cards */
.card {
    background: var(--color-light-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px rgba(149, 157, 165, 0.3);
}

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    transition: transform 0.5s ease;
}

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

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

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    background-color: var(--color-light-background);
    transition: all var(--transition-speed);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

.contact-form label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: #999;
    pointer-events: none;
    transition: all var(--transition-speed);
}

.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: 15px;
    font-size: 0.8rem;
    color: var(--color-primary);
    background: var(--color-light-background);
    padding: 0 5px;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}
.site-header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.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;
    color: var(--color-primary);
    text-decoration: none;
}

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

.nav-link {
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    position: relative;
}

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

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

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

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

/* ==========================================================================
   5. Page Sections
   ========================================================================== */

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

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

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

.hero-title {
    color: var(--color-white);
    font-size: 4.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Workshops Slider */
.slider-container {
    position: relative;
}
.slider {
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.slide {
    flex: 0 0 100%;
    padding: 0 1rem;
    scroll-snap-align: start;
}
.slider-nav {
    text-align: center;
    margin-top: 1.5rem;
}
.slider-nav button {
    background: var(--color-primary);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 0.5rem;
    transition: var(--transition-speed);
}
.slider-nav button:hover {
    background: var(--color-primary-dark);
}

/* Events Section */
.event-list {
    max-width: 800px;
    margin: 0 auto;
}
.event-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-primary);
    background: var(--color-light-background);
}
.event-date {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--color-primary);
}
.event-date .month {
    display: block;
    font-size: 1rem;
    font-weight: 700;
}
.event-date .day {
    display: block;
    font-size: 2.5rem;
    line-height: 1;
}

/* Resources Section */
.resource-list {
    list-style-type: none;
    padding: 0;
    max-width: 700px;
    margin: 0 auto;
}
.resource-list li {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.resource-list li:last-child {
    border-bottom: none;
}
.resource-list a {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}
.resource-list a:hover {
    text-decoration: underline;
}

/* Testimonials Section */
#testimonials {
    position: relative;
    padding: 6rem 0;
    color: var(--color-white);
}

.testimonial-item {
    text-align: center;
    max-width: 750px;
    margin: 0 auto;
}

.testimonial-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem auto;
    border: 4px solid var(--color-white);
}

.testimonial-item blockquote p {
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.testimonial-item footer {
    font-weight: 700;
    font-size: 1rem;
    color: #ddd;
}

/* Partners Section */
.partners-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.partners-logos img {
    max-height: 60px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition-speed);
}
.partners-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.site-footer {
    background-color: var(--color-heading);
    color: #ccc;
    padding: 4rem 0 2rem 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-about, .footer-links, .footer-legal, .footer-social {
    flex: 1;
    min-width: 200px;
}

.site-footer h4 {
    color: var(--color-white);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.site-footer p, .site-footer a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.95rem;
}

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

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

/* ==========================================================================
   7. Specific Pages (Success, Privacy, Terms)
   ========================================================================== */
.success-page, .static-page {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    min-height: 100vh;
    padding: 2rem;
}
.success-content {
    background: var(--color-light-background);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 600px;
}

.static-page-content {
    min-height: 100vh;
    padding: calc(var(--header-height) + 4rem) 0 4rem 0;
}
.static-page-content .container {
    max-width: 800px;
}
.static-page-content h1 {
    margin-bottom: 2rem;
}
.static-page-content h2 {
    margin-top: 2rem;
}

/* ==========================================================================
   8. Barba.js & AOS Animations
   ========================================================================== */
.barba-leave-active,
.barba-enter-active {
    transition: opacity .5s ease;
}
.barba-leave-from,
.barba-enter-to {
    opacity: 1;
}
.barba-leave-to,
.barba-enter-from {
    opacity: 0;
}

[data-aos] {
    transition-property: transform, opacity;
}

/* ==========================================================================
   9. Media Queries (Responsive Design)
   ========================================================================== */

@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    .hero-title { font-size: 3.5rem; }
    .column.is-two-thirds, .column.is-one-third {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    h1 { font-size: 2.2rem; }
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1.2rem; }

    .section {
        padding: 4rem 0;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--color-light-background);
        width: 100%;
        height: calc(100vh - var(--header-height));
        text-align: center;
        transition: 0.3s;
        gap: 2rem;
        padding-top: 2rem;
    }

    .nav-menu.active {
        left: 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);
    }

    .columns {
        flex-direction: column;
        margin: 0;
    }
    .column {
        padding: 1rem 0;
    }

    .slide {
        padding: 0;
    }

    .parallax-bg {
        background-attachment: scroll; /* Disable parallax on mobile for performance */
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}