/* ══════════════════════════════════════════════════════
   baw.css — estilos compartidos (variables, menú, lightbox)
   ══════════════════════════════════════════════════════ */

/* ── CSS variables ─────────────────────────────────────────────────────── */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --accent: #10b981;
    --section-bg: #111827;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
}

/* ── Hamburger menu ──────────────────────────────────────────────────────── */
.menu-wrap {
    position: relative;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    cursor: pointer;
    line-height: 0;
    transition: background 0.15s;
    /* override generic button styles */
    font-weight: inherit;
    transform: none !important;
}

.menu-btn:hover  { background: rgba(255, 255, 255, 0.14); }
.menu-btn:active { transform: scale(0.96) !important; }

.menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    z-index: 5000;
    overflow: hidden;
}

.menu-dropdown.open { display: block; }

.menu-section-label {
    padding: 0.55rem 1.2rem 0.3rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.2rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.12s;
}

.menu-item:hover { background: rgba(255, 255, 255, 0.06); }
.menu-item svg   { flex-shrink: 0; opacity: 0.7; }

.menu-item.menu-item-active {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.08);
}

.menu-item.menu-item-login {
    color: var(--accent);
}

.menu-item.menu-item-login svg { opacity: 0.85; }

.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}

/* ── Posición fija del menú ──────────────────────────────────────────────── */

/* Desktop (≥1025px): esquina superior derecha */
@media (min-width: 1025px) {
    .menu-wrap {
        position: fixed;
        top: 0.85rem;
        right: 1.5rem;
        z-index: 3000;
    }
}

/* Mobile index (≤1024px): junto al botón de acoplar pestañas */
@media (max-width: 1024px) {
    body:not(.gallery-page) .menu-wrap {
        position: fixed;
        top: 0.62rem;
        right: 4rem;   /* a la izquierda del botón toggle (~2rem ancho + 1.5rem padding) */
        z-index: 2500;
    }
}

/* Mobile gallery (≤1024px): esquina superior derecha */
@media (max-width: 1024px) {
    body.gallery-page .menu-wrap {
        position: fixed;
        top: 0.75rem;
        right: 1rem;
        z-index: 3000;
    }
}

/* ── Lightbox (compartido entre index y gallery) ─────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.lightbox-close:hover { opacity: 1; }
