/* ═══════════════════════════════════════════
   SHARED BASE — base.css
   Plumbing every event page uses: reset, header,
   boletos tab, dropdown, modal, lightbox, footer.
   Event look & layout lives in each event folder.
═══════════════════════════════════════════ */

/* ── Variables ── */
:root {
    --teal:   #00c5cc;
    --orange: #f76f00;
    --black:  #000000;
    --dark:   #0d0d0d;
    --white:  #ffffff;
    --gray:   #888888;
    --red:    #ff0000;
    /* ── Theme hooks: override in each event.css ── */
    --header-bg:          linear-gradient(to bottom, rgba(0,0,0,.85), transparent);
    --header-bg-scrolled: rgba(0, 0, 0, .96);
    --tab-bg:             var(--teal);
    --tickets-bg:         var(--red);
    --tickets-bg-hover:   #c40000;
    --display-font:       'Barlow Condensed', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { background: var(--black); color: var(--white); font-family: 'Open Sans', sans-serif; overflow-x: hidden; }
img   { max-width: 100%; display: block; }
a     { text-decoration: none; color: inherit; }

/* ── Utility ── */
.text-teal   { color: var(--teal); }
.text-orange { color: var(--orange); }
.font-bold   { font-weight: 700; }

/* ═══════════════════════════════════════════
   BOLETOS SIDE TAB
═══════════════════════════════════════════ */

#boletos-container {
    position: fixed;
    left: -240px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    align-items: stretch;
    transition: left 0.35s cubic-bezier(.4, 0, .2, 1);
}

#boletos-container.open { left: 0; }

#boletos-panel {
    position: relative;
    width: 240px;
    background: #111;
    border-right: 3px solid var(--teal);
    padding: 2.5rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 6px 0 24px rgba(0, 0, 0, .7);
}

#boletos-panel .panel-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal);
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 0.75rem;
    margin-bottom: 0.4rem;
}

#panel-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}
#panel-close:hover { color: var(--white); }

#boletos-panel a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--white);
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    writing-mode: initial;
    transform: none;
    letter-spacing: 0;
}
#boletos-panel a:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--black);
}

#boletos-trigger {
    background: var(--tab-bg);
    color: var(--white);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.88rem;
    letter-spacing: 0.25em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    padding: 1.5rem 0.55rem;
    border: none;
    border-radius: 8px 0px 0px 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
#boletos-trigger:hover { opacity: 0.88; }

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */

#site-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--header-bg);
    transition: background 0.3s;
}

#site-header.scrolled {
    background: var(--header-bg-scrolled);
    border-bottom: 1px solid #1a1a1a;
}

.logo img { height: 56px; width: auto; }

#main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.nav-links a {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--teal); }

.nav-links .nav-btn-boletos {
    background: var(--tickets-bg);
    padding: 0.35rem 1.1rem;
    border-radius: 4px;
    color: var(--white) !important;
    transition: background 0.2s !important;
}
.nav-links .nav-btn-boletos:hover { background: var(--tickets-bg-hover); }

.social-icons {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.social-icons a { color: var(--white); font-size: 0.95rem; transition: color 0.2s; }
.social-icons a:hover { color: var(--teal); }

#mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
#mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
}

/* ═══════════════════════════════════════════
   NAV — TICKETS / BOLETOS DROPDOWN
═══════════════════════════════════════════ */

.has-dropdown { position: relative; }

.nav-chevron {
    display: inline-block;
    font-size: 0.65rem;
    margin-left: 0.25rem;
    transition: transform 0.22s ease;
    vertical-align: middle;
}
.has-dropdown.open .nav-chevron { transform: rotate(180deg); }

.nav-dropdown {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    min-width: 210px;
    background: rgba(10, 10, 10, .98);
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    list-style: none;
    padding: 0.4rem 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1100;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .7);
}

.has-dropdown.open .nav-dropdown {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.nav-links .nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.1rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    background: none;
    border-radius: 0;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.nav-links .nav-dropdown a:hover {
    background: var(--teal);
    color: var(--black);
}

.nav-links .nav-dropdown a i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .has-dropdown { width: 100%; }

    .nav-dropdown {
        position: static;
        transform: none !important;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        pointer-events: none;
        background: rgba(255, 255, 255, .06);
        border: none;
        border-radius: 6px;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
        transition: opacity 0.2s, max-height 0.3s ease, padding 0.2s;
    }

    .has-dropdown.open .nav-dropdown {
        opacity: 1;
        max-height: 300px;
        pointer-events: all;
        padding: 0.4rem 0;
        margin-top: 0.4rem;
    }

    .nav-links .nav-btn-boletos {
        width: 100%;
        justify-content: space-between;
    }
}

/* ═══════════════════════════════════════════
   SPEAKER MODAL
═══════════════════════════════════════════ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.modal.active { opacity: 1; pointer-events: all; }

.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); }

.modal-content {
    position: relative;
    z-index: 1;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    max-width: 580px;
    width: 90%;
    padding: 2.5rem 2rem;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--white); }

.modal-body { display: flex; gap: 1.5rem; align-items: flex-start; }

.modal-body img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #333;
}

.modal-info h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

#modal-speaker-title { color: var(--orange); font-size: 0.83rem; font-weight: 600; margin-bottom: 0.2rem; }
#modal-location      { color: var(--teal);   font-size: 0.8rem;  margin-bottom: 0.8rem; }
#modal-bio           { font-size: 0.88rem; line-height: 1.75; color: #bbb; }

/* ═══════════════════════════════════════════
   GALLERY LIGHTBOX
═══════════════════════════════════════════ */

#gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

#gallery-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .93);
    cursor: zoom-out;
}

.lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}

#lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .8);
    display: block;
    transition: opacity 0.12s ease;
}

.lightbox-close {
    position: fixed;
    top: 1.2rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0.25rem;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .2);
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lightbox-btn:hover { background: var(--teal); border-color: var(--teal); color: var(--black); }
.lightbox-btn.prev  { left: 1rem; }
.lightbox-btn.next  { right: 1rem; }

.lightbox-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, .45);
    z-index: 2;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .lightbox-btn      { width: 38px; height: 38px; font-size: 1.5rem; }
    .lightbox-btn.prev { left: 0.4rem; }
    .lightbox-btn.next { right: 0.4rem; }
    .lightbox-close    { top: 0.8rem; right: 0.8rem; font-size: 1.6rem; }
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */

#site-footer {
    background: #080808;
    border-top: 1px solid #1a1a1a;
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    color: #555;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — shared header / modal
═══════════════════════════════════════════ */

@media (max-width: 768px) {
    #site-header  { padding: 0.75rem 1rem; }
    .logo img     { height: 44px; }
    #main-nav     { display: none; }
    #main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0,0,0,.97);
        padding: 1.5rem;
        gap: 1.2rem;
        border-bottom: 1px solid #1a1a1a;
    }
    #mobile-menu-btn { display: flex; }
    .nav-links       { flex-direction: column; align-items: flex-start; gap: 1rem; }

    .modal-body     { flex-direction: column; }
    .modal-body img { width: 80px; height: 80px; }
}

@media (max-width: 480px) {
    #boletos-trigger { font-size: 1rem; padding: 1.2rem 0.45rem; }
}

/* Screen-reader-only text */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══════════════════════════════════════════
   LANGUAGE SWITCHER
═══════════════════════════════════════════ */

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    flex-shrink: 0;
}

.lang-btn {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, .45);
    padding: 0.1rem 1rem;
    transition: color 0.2s;
    line-height: 1;
}
.lang-btn:hover  { color: var(--white); }
.lang-btn.active { color: var(--teal); pointer-events: none; }

.lang-divider {
    color: rgba(255, 255, 255, .18);
    font-size: 0.75rem;
    line-height: 1;
    user-select: none;
}

/* Mobile — place switcher below the ticket dropdown */
@media (max-width: 768px) {
    .lang-switch {
        align-self: flex-start;
        border-color: rgba(255, 255, 255, .12);
        padding: 0.35rem 0.7rem;
        margin: 0 auto;
    }
    .lang-btn { font-size: 1.4rem; }
}
