/* ======================================================
   Dance Festival — Theme Styles
   Change these CSS custom properties to update the
   overall aesthetic every year.
   ====================================================== */

:root {
    /* --- Base Colors --- */
    --color-primary: #ff2d78;        /* Main accent (buttons, highlights) */
    --color-negro: black;
    --color-secondary: #7c3aed;      /* Secondary accent */
    --color-bg-menu: #0a0a1a;        /* Menu background (behind shader) */
    --color-text-menu: #ffffff;      /* Text color on menu */
    --color-text-muted: rgba(100,100,100,0.8);
    --color-overlay-bg: rgba(0,0,0,0.3); /* Overlay on canvas for readability */

    /* --- Typography --- */
    --font-heading: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

    /* --- Layout --- */
    --menu-width: 16.666%;           /* 1/6 of viewport */

    /* ================================================
    /* --- Shader Colors (passed to GLSL) --- 
    --shader-color-1: #ff2d78;
    --shader-color-2: #7c3aed;
    --shader-color-3: #06b6d4;
     --shader-speed: 1.0; 
    ================================================== */

    /* --- Boids Colors (p5.js) --- */
    --boid-color: rgba(255, 255, 255, 0.6);
    --boid-trail: rgba(255, 45, 120, 0.08);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;              /* No vertical scroll on front page */
    font-family: var(--font-body);
    background: #000;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ======================================================
   Burger Menu Button (hidden on desktop)
   ====================================================== */
#burger-btn {
    display: none;                 /* Hidden on desktop */
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    width: 40px;
    height: 34px;
    background: rgba(10, 10, 26, 0.8);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 8px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.3s ease;
}

#burger-btn:hover {
    background: rgba(255, 45, 120, 0.25);
}

#burger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

#burger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#burger-btn.active span:nth-child(2) {
    opacity: 0;
}

#burger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ======================================================
   Menu Overlay (mobile)
   ====================================================== */
#menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 8;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

#menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ======================================================
   Side Menu (1/6 width on desktop)
   ====================================================== */
#side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--menu-width);
    height: 100vh;
    background: var(--color-bg-menu);
    z-index: 10;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* GLSL shader fills the entire menu area */
#shader-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#shader-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    /*opacity: 0.6;*/
}

.menu-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 2rem 1.5rem;
    pointer-events: none;
}

.menu-content * {
    pointer-events: auto;
}

.festival-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.05em;
    color: var(--color-text-menu);
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    margin-bottom: 3rem;
    display: block;
}

.menu-links {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
}

.menu-links > li {
    position: relative;
}

.menu-links > li > a {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.menu-links > li > a:hover,
.menu-links > li > a.active,
.menu-links > li > a.has-dropdown:hover {
    color: var(--color-negro);
    transform: translateX(4px);
}

/* ======================================================
   Dropdown Menu (Previous Editions)
   ====================================================== */
.dropdown {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
    opacity: 0;
    margin-top: 0;
    padding-left: 0.8rem;
}

li:hover > .dropdown,
li.dropdown-open > .dropdown {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.5rem;
}

.dropdown li {
    margin-bottom: 0.4rem;
}

.dropdown li a {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    padding: 0.15rem 0;
}

.dropdown li a:hover {
    color: var(--color-secondary);
    transform: translateX(4px);
}

.has-dropdown::after {
    content: ' ▾';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

li:hover > .has-dropdown::after,
li.dropdown-open > .has-dropdown::after {
    transform: rotate(180deg);
}

.menu-footer {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding-top: 2rem;
}

/* ======================================================
   Main Canvas Area (5/6 width) — Front Page
   ====================================================== */
#canvas-container {
    position: fixed;
    top: 0;
    left: var(--menu-width);
    width: calc(100% - var(--menu-width));
    height: 100vh;
    z-index: 1;
    background: #000;
}

#canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* --- Overlay content on top of the flock --- */
#overlay-content {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    /*background: var(--color-overlay-bg);*
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);*/
    padding: 2rem 3rem;
    border-radius: 12px;
    /*border: 1px solid rgba(255,255,255,0.1);*/
    pointer-events: none;
}
#imagen-home{
    width: 100%;
}

#overlay-content * {
    pointer-events: auto;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 0.5rem;
}

.hero-date {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 45, 120, 0.4);
    cursor: pointer;
}

.cta-button:hover {
    background: var(--color-secondary);
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(124, 58, 237, 0.5);
}

/* ======================================================
   Edition Page — Article content over blurred boids
   ====================================================== */

body.edition-page {
    overflow-y: auto;
    overflow-x: hidden;
}

body.edition-page #side-menu {
    position: fixed;
}

.edition-canvas canvas {
    filter: blur(6px) brightness(0.5) !important;
    -webkit-filter: blur(6px) brightness(0.5) !important;
    transform: scale(1.1);
}

.edition-canvas::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2;
    pointer-events: none;
}

.edition-article {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    color: #fff;
    scroll-behavior: smooth;
}

.edition-article::-webkit-scrollbar {
    width: 6px;
}
.edition-article::-webkit-scrollbar-track {
    background: transparent;
}
.edition-article::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

/* ---- Hero section ---- */
.edition-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 350px;
    overflow: hidden;
}

.edition-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.edition-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 4rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
}

.edition-hero-overlay h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.edition-hero-overlay .edition-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.edition-hero-overlay .edition-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.8);
}

/* ---- Article body ---- */
.edition-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.edition-text {
    margin-bottom: 2rem;
}

.edition-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1.2rem;
    font-weight: 300;
}

/* ---- Figures ---- */
.edition-figure {
    margin: 2.5rem 0;
    text-align: center;
}

.edition-figure img {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    display: block;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.edition-figure figcaption {
    margin-top: 0.7rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    font-style: italic;
}

/* ---- Gallery ---- */
.edition-gallery {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.edition-gallery h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    color: var(--color-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(255,45,120,0.3);
}

/* ---- Footer link ---- */
.edition-footer-link {
    text-align: center;
    margin-top: 3rem;
    padding-bottom: 4rem;
}

/* ======================================================
   Schedule — Tabbed timetable
   ====================================================== */
.schedule-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.schedule-tab {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.schedule-tab:hover {
    background: rgba(255,45,120,0.15);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.schedule-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.schedule-table thead th {
    background: rgba(255,45,120,0.15);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.8rem 0.6rem;
    text-align: left;
    border-bottom: 2px solid var(--color-primary);
}

.schedule-table tbody td {
    padding: 0.65rem 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.75);
    vertical-align: top;
}

.schedule-table .time-col {
    width: 70px;
    min-width: 70px;
}

.schedule-table .time-cell {
    font-weight: 600;
    color: var(--color-primary);
    font-family: var(--font-heading);
    white-space: nowrap;
}

.schedule-table .stage-col {
    min-width: 120px;
}

.schedule-table tbody tr:hover td {
    background: rgba(255,255,255,0.04);
}

.schedule-table tbody tr.highlight-row td {
    background: rgba(255,45,120,0.08);
}

.schedule-table tbody .headliner-cell {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(255,45,120,0.4);
}

.schedule-legend {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 1rem;
}

.schedule-legend p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

.legend-headliner {
    color: var(--color-primary);
    font-weight: 700;
}

/* ======================================================
   Simple Pages — About & Contact (minimal, centered)
   ====================================================== */

/* Hero is smaller than edition pages */
.simple-hero {
    position: relative;
    width: 100%;
    height: 45vh;
    min-height: 280px;
    overflow: hidden;
}

.simple-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.simple-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 4rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    text-align: center;
}

.simple-hero-overlay h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.simple-subtitle {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.75);
}

/* Body — centered, generous spacing, minimal */
.simple-body {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.simple-text {
    margin-bottom: 1.5rem;
}

.simple-text p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: rgba(255,255,255,0.82);
    margin-bottom: 1rem;
    font-weight: 300;
    text-align: center;
}

/* Figure (team photo) */
.simple-figure {
    margin: 2.5rem auto;
    text-align: center;
    max-width: 500px;
}

.simple-figure img {
    width: 100%;
    border-radius: 12px;
    display: block;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.simple-figure figcaption {
    margin-top: 0.7rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    font-style: italic;
}

/* Contact-specific */
.simple-contact-item {
    text-align: center;
    margin: 2rem 0;
}

.contact-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.contact-link {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: color 0.3s ease;
    letter-spacing: 0.05em;
}

.contact-link:hover {
    color: var(--color-secondary);
}

/* Social links */
.simple-socials {
    text-align: center;
    margin: 2rem 0;
}

.social-links {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    transform: scale(1.1);
}

.simple-footer-link {
    text-align: center;
    margin-top: 2rem;
    padding-bottom: 3rem;
}

/* ======================================================
   Lightbox — Fullscreen image viewer
   ====================================================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
    font-family: var(--font-heading);
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--color-primary);
    transform: scale(1.2);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
    font-style: italic;
    text-align: center;
}

.gallery-grid img {
    cursor: pointer;
}

/* ======================================================
   RESPONSIVE — Mobile (< 768px)
   ====================================================== */
@media (max-width: 768px) {
    /* Show burger button */
    #burger-btn {
        display: flex;
    }

    /* Show overlay */
    #menu-overlay {
        display: block;
    }

    /* Side menu slides off-screen to the left */
    #side-menu {
        width: 280px;
        transform: translateX(-100%);
        z-index: 20;
    }

    /* When open, slide in */
    #side-menu.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.5);
    }

    /* Keep shader active on the sidebar */
    #side-menu #shader-container {
        position: absolute;
    }

    /* Front page: canvas takes full screen */
    #canvas-container {
        position: fixed;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* Overlay content: smaller and better positioned */
    #overlay-content {
        bottom: 2rem;
        padding: 1.2rem 1.5rem;
        width: 85%;
        max-width: 500px;
    }

    #imagen-home{
        transform: translateY(-150px);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-date {
        font-size: 0.85rem;
    }

    .cta-button {
        font-size: 0.85rem;
        padding: 0.7rem 1.8rem;
    }

    /* Edition/lineup pages: canvas full width */
    body.edition-page #side-menu {
        position: fixed;
    }

    body.edition-page #canvas-container {
        position: fixed;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .edition-hero {
        height: 40vh;
        min-height: 250px;
    }

    .edition-hero-overlay {
        padding: 2rem 1.5rem;
    }

    .edition-hero-overlay h1 {
        font-size: 1.4rem;
    }

    .edition-body {
        padding: 2rem 1.2rem;
    }

    .edition-text p {
        font-size: 0.95rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid img {
        height: 150px;
    }

    /* Schedule table: make scrollable horizontally */
    .schedule-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .schedule-table {
        min-width: 500px;
    }

    .schedule-table thead th,
    .schedule-table tbody td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }

    .schedule-table .time-col {
        width: 55px;
        min-width: 55px;
    }

    .schedule-table .stage-col {
        min-width: 100px;
    }

    .schedule-tab {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    /* Menu links area — ensure spacing works on mobile */
    .menu-content {
        padding: 1.5rem 1.2rem;
    }

    .festival-title {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }

    .menu-links > li > a {
        font-size: 0.9rem;
    }

    .menu-links {
        gap: 1rem;
    }
}