:root {
    --color-primary: #1b7a72;
    --color-primary-dark: #125650;
    --color-accent: #ffc93c;
    --color-accent-dark: #e8b32a;
    --color-secondary: #125650;
    --color-bg: #eaf6f4;
    --color-text: #1f2430;
    --color-text-muted: #6b7280;
    --radius: 14px;
    --radius-sm: 8px;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }

html, body {
    margin: 0;
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* .site-footer (más abajo en este archivo) tiene margin-top: auto a
   propósito: empuja el footer al fondo del viewport en páginas cortas
   (ej. "pago confirmado" con pocas entradas) en vez de dejarlo pegado al
   contenido con un hueco de fondo menta debajo. Es siempre el último hijo
   directo de <body> (ver _footer.php), así que absorbe el espacio libre
   sin tener que envolver el resto del contenido en un wrapper. */

a { color: inherit; }

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

.wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header — réplica del de Rifas (franja degradada, panel blanco con el logo
   "sangrando" a la izquierda, arco con filo en degradé, menú a la derecha) */

.site-header {
    background: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary));
    position: sticky;
    top: 0;
    z-index: 40;
    --hdr-pad: 0.8rem;
    overflow-x: hidden;
    overflow-x: clip;
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.wrap.site-header-inner {
    padding-top: var(--hdr-pad);
    padding-bottom: var(--hdr-pad);
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    max-width: 1140px;
    margin: 0 auto;
}
@media (min-width: 1400px) {
    .wrap.site-header-inner { max-width: 1320px; }
}

.site-header-logo {
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-style: italic;
    font-size: 1.15rem;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.9rem;
}
.site-header-logo .marca-producto {
    color: var(--color-accent);
    font-style: normal;
    font-size: 1.3rem;
    margin-left: 0;
}

/* Panel blanco a sangre desde el borde izquierdo de la pantalla, con un arco
   suave a la derecha (filo en degradé con los colores del logo). Necesita
   overflow-x: clip en .site-header por el left: -100vw. */
.site-header-logo-panel {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    padding-right: 2.2rem;
}
.site-header-logo-panel::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: calc(-1 * var(--hdr-pad));
    bottom: calc(-1 * var(--hdr-pad));
    left: -100vw;
    right: 0;
    background: #ffffff;
}
.site-header-logo-panel::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: calc(-1 * var(--hdr-pad));
    bottom: calc(-1 * var(--hdr-pad));
    left: calc(100% - 1px);
    width: 19px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 72' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%239ccfcd'/%3E%3Cstop offset='.28' stop-color='%231b9aa8'/%3E%3Cstop offset='.52' stop-color='%232fa77a'/%3E%3Cstop offset='.78' stop-color='%23e3893a'/%3E%3Cstop offset='1' stop-color='%23f0c419'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 0Q36 36 0 72Z' fill='url(%23g)'/%3E%3Cpath d='M0 0Q28 36 0 72Z' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
.site-header-logo-img { position: relative; display: block; height: 46px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-nav a {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.site-nav a:hover { color: var(--color-accent); text-decoration: none; }

.site-nav a.site-nav-login {
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    color: #fff;
}
.site-nav a.site-nav-login:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
}
.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;
}

.btn-outline {
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Eventos destacados (home) */

.destacados {
    /* padding-top/bottom nomás: es shorthand si usás "padding", y como
       esta clase convive con .wrap en el mismo div, "padding: 36px 0 56px"
       pisaba el padding lateral de .wrap (quedaba en 0) por ir después en
       el archivo. Bug real, encontrado 2026-10-08 con captura de mobile. */
    padding-top: 36px;
    padding-bottom: 56px;
}

.destacados h1 {
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 26px;
    color: var(--color-primary-dark);
    margin: 0 0 4px;
}

.destacados .subtitulo {
    color: var(--color-text-muted);
    margin: 0 0 24px;
}

.grilla-eventos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.tarjeta-evento {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform .15s ease, box-shadow .15s ease;
}

.tarjeta-evento:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.tarjeta-evento .portada {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.tarjeta-evento .contenido {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.tarjeta-evento h3 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 17px;
    margin: 0;
    color: var(--color-text);
}

.tarjeta-evento .fecha {
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
}

.tarjeta-evento .lugar {
    color: var(--color-text-muted);
    font-size: 13px;
}

.tarjeta-evento .ver-mas {
    margin-top: auto;
    padding-top: 10px;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 14px;
}

.lista-vacia {
    text-align: center;
    color: var(--color-text-muted);
    padding: 48px 16px;
}

/* Landing de detalle de evento */

.evento-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    margin: 32px 0 48px;
}

.evento-card .portada {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.evento-card .cuerpo { padding: 24px; }

.evento-card .encabezado {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.evento-card h1 {
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 26px;
    margin: 0;
    color: var(--color-text);
}

.pill-cuenta-regresiva {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.pill-cuenta-regresiva.urgente { background: #c2410c; }

.evento-card hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 16px 0;
}

.evento-card .meta {
    color: var(--color-text-muted);
    font-size: 14px;
    margin: 4px 0;
}

.evento-card .meta strong { color: var(--color-text); }

.evento-card .descripcion {
    margin: 16px 0;
    line-height: 1.6;
    color: var(--color-text);
}

/* Tipos de entrada */

.tipos-entrada {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.tipo-entrada-card {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tipo-entrada-card h4 {
    margin: 0;
    font-size: 16px;
}

.tipo-entrada-card .precio {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-primary);
}

.tipo-entrada-card .cupo {
    font-size: 13px;
    color: var(--color-text-muted);
}

.tipo-entrada-card .cupo.agotado { color: #b02a37; font-weight: 600; }

.barra-cupo {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.barra-cupo div {
    height: 100%;
    background: var(--color-accent);
}

.tipo-entrada-card .btn-comprar {
    margin-top: auto;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
}

.tipo-entrada-card .btn-comprar:hover { background: var(--color-primary-dark); }

.tipo-entrada-card .btn-comprar.deshabilitado {
    background: #d1d5db;
    color: #6b7280;
    pointer-events: none;
}

/* Botón de pagar del checkout */

.btn-pagar {
    margin-top: 24px;
    width: 100%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-pagar:hover { background: var(--color-primary-dark); }

/* Checkout: form genérico */

label { display: block; margin-top: 14px; font-weight: 600; font-size: 14px; color: var(--color-text); }

input, textarea, select {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.error {
    color: #b02a37;
    background: #fdeaea;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.alert-success { background: #e3f6e8; color: #157347; }
.alert-error { background: #fdeaea; color: #b02a37; }

/* Medios de pago (checkout) — portado de Rifas */

.medios-pago-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}

.medio-pago-opcion {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    cursor: pointer;
    background: #fff;
    box-sizing: border-box;
}

.medio-pago-opcion:hover { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); }

/* El input real queda invisible pero funcional (teclado/lectores de
   pantalla); el círculo de la derecha es puramente visual y refleja :checked. */
.medio-pago-opcion input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.medio-logo-box {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
}

.medio-logo-box img { max-height: 34px; max-width: 110px; object-fit: contain; }
.medio-nombre-fallback { font-size: 14px; font-weight: 700; color: var(--color-text); }

.medio-radio-visual {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
    margin-left: auto;
}

.medio-pago-opcion:has(input:checked) { border-color: var(--color-primary); }
.medio-pago-opcion:has(input:checked) .medio-radio-visual {
    border-color: var(--color-primary);
    border-width: 6px;
}

/* Footer — portado de Rifas */

.medios-footer {
    background: #fff;
    padding: 2.5rem 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 48px;
}

.medios-footer h2 {
    font-size: 1.1rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0;
}

.medios-footer h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    margin-top: 0.6rem;
    border-radius: 999px;
}

.medios-carrusel {
    overflow: hidden;
    margin-top: 1.75rem;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.medios-carrusel-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    animation: medios-scroll 22s linear infinite;
}

@media (hover: hover) and (pointer: fine) {
    .medios-carrusel:hover .medios-carrusel-track { animation-play-state: paused; }
}

.medios-carrusel-track img {
    height: 34px;
    max-width: 110px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.85;
}

.medios-carrusel-track .medio-nombre-fallback {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    white-space: nowrap;
}

@keyframes medios-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .medios-carrusel-track { animation: none; }
}

.site-footer {
    background: var(--color-secondary);
    color: #cfd6e0;
    text-align: center;
    padding: 1.25rem 1rem;
    font-size: 0.8rem;
    margin-top: auto;
}

.site-footer p { margin: 0; }

.site-footer-admin {
    display: inline-block;
    margin-top: 0.5rem;
    color: #9fb3af;
    font-size: 0.72rem;
    text-decoration: none;
}

.site-footer-admin:hover { color: #cfd6e0; text-decoration: underline; }

/* Checkout wizard — portado de Rifas (solo el indicador visual de pasos y
   el alternado de paneles; no hay reserva temporal de cupo en Eventos, así
   que acá no hay contador regresivo como el de Rifas). */

.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.wizard-step .num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e5e7eb;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.wizard-step.actual .num { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.wizard-step.actual { color: var(--color-text); }
.wizard-step.hecho .num { background: var(--color-secondary); border-color: var(--color-secondary); color: #fff; }
.wizard-step.hecho .num::after { content: '✓'; }
.wizard-step.hecho .num span { display: none; }

.wizard-line {
    width: 28px;
    height: 2px;
    background: #e5e7eb;
}

.wizard-panel { display: none; }
.wizard-panel.actual { display: block; }

.wizard-barra {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.wizard-barra .btn-pagar,
.wizard-barra .btn-secundario {
    margin-top: 0;
}

.btn-secundario {
    background: #fff;
    color: var(--color-text);
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
}

.btn-secundario:hover { background: #f3f4f6; }

.participante-bloque {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.participante-bloque .encabezado-bloque {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btn-copiar-datos {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.btn-copiar-datos:hover { color: var(--color-primary-dark); }

/* Mobile — este bloque tiene que ser lo último del archivo: a igual
   especificidad, CSS le da la razón a la regla que viene después, así que
   cualquier regla no-mobile agregada más abajo de esto volvería a pisar
   estos overrides (bug real ya encontrado una vez: .menu-toggle quedaba
   permanentemente display:none porque su regla base estaba después de
   este bloque en vez de antes). */

@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        order: 3;
        margin-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        padding-top: 0.5rem;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a {
        padding: 0.7rem 0.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
}

@media (max-width: 640px) {
    .evento-card .encabezado { flex-direction: column; }
}
