/* ==========================================================================
   FETRI 2026 · Base del rediseño (tokens, tipografía y estilos base)
   Basado en el sistema gráfico "fetri2026" de TV.
   Todo va bajo html.f26 (solo dominios FETRI: FAA no cambia) y el contenido
   de página bajo html.f26c (todas las rutas menos inscripciones).
   ========================================================================== */

/* Tipografía: Gotham es la de marca (gráficos de TV), pero no tenemos licencia web.
   Montserrat (Google Fonts) es la sustituta más cercana y es la que se ve en todos los equipos.
   Si FETRI aporta los .woff2 de Gotham con licencia web, basta con declarar aquí su @font-face
   y añadir "Gotham" al principio de --f26-font. */

html.f26 {
    /* Paleta fetri2026 */
    --f26-red: #CF122F;
    --f26-red-dk: #A10D24;
    --f26-red-xdk: #7C0A1C;
    --f26-red-soft: #FBE7EA;
    --f26-orange: #E8702A;
    --f26-gold: #FDB913;
    --f26-gold-dk: #D99A00;
    --f26-gold-soft: #FFF4D6;
    --f26-silver: #BFC4CD;
    --f26-bronze: #C8834F;
    --f26-green: #1F9D55;
    /* versiones para texto pequeño y etiquetas sobre blanco (contraste AA): el verde y el dorado de la marca
       se quedan para rellenos e iconos */
    --f26-green-text: #177A42;
    --f26-gold-text: #8A6100;
    --f26-blue: #2F5BEA;

    --f26-ink: #1C1C22;
    --f26-ink-2: #25252D;
    --f26-ink-3: #34343E;
    --f26-mute: #6E6E78;
    --f26-mute-2: #9A9AA4;
    --f26-on-ink-mute: #B9BBC4;

    --f26-bg: #EFF1F4;
    --f26-surface: #FFFFFF;
    --f26-tint: #F2F3F6;
    --f26-tint-2: #E8EAEF;
    --f26-line: #E1E4EA;
    --f26-text: #1C1C22;
    --f26-text-2: #4B4B55;

    /* Degradados y texturas */
    --f26-grad-accent: linear-gradient(90deg, var(--f26-gold), var(--f26-orange) 50%, var(--f26-red));
    --f26-grad-accent-v: linear-gradient(180deg, var(--f26-gold), var(--f26-red));
    --f26-grad-red: linear-gradient(90deg, var(--f26-red), var(--f26-red-dk));
    --f26-grad-podium-1: linear-gradient(180deg, #FDB913, #E8702A);
    --f26-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='90'%3E%3Cg fill='none' stroke='%23fff'%3E%3Cpath d='M-20 100 L70 -10' stroke-opacity='.13'/%3E%3Cpath d='M30 100 L120 -10' stroke-opacity='.06'/%3E%3Cpath d='M150 100 L240 -10' stroke-opacity='.10'/%3E%3Cpath d='M-10 20 L270 80' stroke-opacity='.07'/%3E%3Cpath d='M0 75 L260 5' stroke-opacity='.05'/%3E%3C/g%3E%3C/svg%3E");
    --f26-tex-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='90'%3E%3Cg fill='none' stroke='%231C1C22'%3E%3Cpath d='M-20 100 L70 -10' stroke-opacity='.05'/%3E%3Cpath d='M30 100 L120 -10' stroke-opacity='.025'/%3E%3Cpath d='M150 100 L240 -10' stroke-opacity='.04'/%3E%3Cpath d='M-10 20 L270 80' stroke-opacity='.03'/%3E%3Cpath d='M0 75 L260 5' stroke-opacity='.02'/%3E%3C/g%3E%3C/svg%3E");

    /* Forma */
    --f26-r-xs: 6px;
    --f26-r-sm: 8px;
    --f26-r: 14px;
    --f26-r-lg: 22px;
    --f26-pill: 999px;
    --f26-shadow-1: 0 1px 2px rgba(28, 28, 34, .06), 0 2px 10px rgba(28, 28, 34, .06);
    --f26-shadow-2: 0 4px 14px rgba(28, 28, 34, .12);
    --f26-shadow-3: 0 12px 32px rgba(28, 28, 34, .18);
    --f26-focus: 0 0 0 3px rgba(253, 185, 19, .55);

    /* Tipografía */
    --f26-font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    --f26-fs-xs: 11px;
    --f26-fs-sm: 13px;
    --f26-fs: 15px;
    --f26-fs-md: 17px;
    --f26-fs-lg: 20px;
    --f26-fs-xl: 26px;
    --f26-fs-2xl: 34px;

    /* Medidas de la estructura (barra superior baja: la cabecera no debe comerse la pantalla) */
    --f26-topbar-h: 60px;
    --f26-bottomnav-h: 0px;
    --f26-gutter: 24px;
    /* margen lateral de la barra superior, cabecera de página, patrocinadores y pie (en el móvil algo más
       que el del contenido, para que el logo y los títulos no vayan pegados al borde) */
    --f26-gutter-chrome: var(--f26-gutter);
    --f26-maxw: 1320px;
}

/* Variables de la web anterior reasignadas a la paleta nueva, solo en las páginas rediseñadas
   (inscripciones, pagos y exportaciones conservan las suyas) */
html.f26c {
    --primary-color: var(--f26-red);
    --button-hover-color: var(--f26-red-dk);
    --accent-color: var(--f26-gold);
    --secondary-color: var(--f26-ink);
    --rz-series-1: var(--f26-red);
    --rz-series-2: var(--f26-orange);
    --rz-series-3: var(--f26-gold);
    --rz-series-4: var(--f26-ink-3);
    --rz-series-5: var(--f26-mute);
    --rz-primary: var(--f26-red);
    --rz-primary-light: #E2475F;
    --rz-primary-lighter: rgba(207, 18, 47, .12);
    --rz-primary-dark: var(--f26-red-dk);
    --rz-primary-darker: var(--f26-red-xdk);
    --rz-text-font-family: var(--f26-font);
    --bs-primary: var(--f26-red);
    --bs-primary-rgb: 207, 18, 47;
    --bs-body-font-family: var(--f26-font);
    --bs-body-color: var(--f26-text);
    --bs-body-bg: var(--f26-bg);
    --bs-border-radius: var(--f26-r-sm);
    --bs-link-color: var(--f26-red-dk);
    --bs-link-color-rgb: 161, 13, 36;
    --bs-link-hover-color: var(--f26-red);
}

@media (max-width: 991.98px) {
    html.f26 {
        --f26-topbar-h: 52px;
        --f26-bottomnav-h: 64px;
        --f26-gutter: 16px;
        --f26-fs-xl: 22px;
        --f26-fs-2xl: 26px;
    }
}
/* Móvil: el contenido aprovecha el ancho (tarjetas a 8 px del borde) */
@media (max-width: 575.98px) {
    html.f26 {
        --f26-gutter: 8px;
        --f26-gutter-chrome: 14px;
    }
}

/* ---------- Base de las páginas rediseñadas (html.f26c) ---------- */
html.f26c body {
    background: var(--f26-bg) !important;
}

/* Lo que queda por debajo del pie en páginas cortas (y el rebote del scroll)
   toma el color del pie en lugar de una franja clara. */
html.f26c {
    background: #121216 !important;
}

html.f26c body {
    font-family: var(--f26-font) !important;
    color: var(--f26-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html.f26c body :where(h1, h2, h3, h4, h5, h6, p, a, span, div, li, td, th, button, input, select, textarea, label, small, strong, b) {
    font-family: var(--f26-font);
}

/* La estructura nueva (cabecera, menús, pie) lleva su tipografía en todas las rutas de FETRI */
html.f26 :is(.f26-topbar, .f26-drawer, .f26-bottomnav, .f26-hero, .f26-sponsors, .f26-footer, .f26-modal) {
    font-family: var(--f26-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
html.f26 :is(.f26-topbar, .f26-drawer, .f26-bottomnav, .f26-hero, .f26-sponsors, .f26-footer, .f26-modal) :where(h1, h2, h3, h4, h5, h6, p, a, span, div, li, button, input, small, strong, b) {
    font-family: var(--f26-font);
}

/* Iconos: nunca heredan la tipografía de texto */
html.f26 .fa, html.f26 .fas, html.f26 .far, html.f26 .fa-solid, html.f26 .fa-regular,
html.f26 [class^="fa-"], html.f26 [class*=" fa-"] {
    font-family: "Font Awesome 6 Free" !important;
}
html.f26 .fab, html.f26 .fa-brands { font-family: "Font Awesome 6 Brands" !important; }
html.f26 .bi::before, html.f26 [class^="bi-"]::before, html.f26 [class*=" bi-"]::before { font-family: "bootstrap-icons" !important; }
html.f26 .rzi, html.f26 [class*="rzi-"], html.f26 .rz-menuitem-icon { font-family: var(--rz-icon-font-family, "Material Symbols") !important; }

html.f26c ::selection { background: var(--f26-gold); color: var(--f26-ink); }

html.f26c a { text-underline-offset: 2px; }

html.f26c :focus-visible,
html.f26 :is(.f26-topbar, .f26-drawer, .f26-bottomnav, .f26-hero, .f26-sponsors, .f26-footer) :focus-visible {
    outline: none;
    box-shadow: var(--f26-focus) !important;
}

/* Blazor enfoca el h1 al cambiar de página (FocusOnNavigate): ahí no se pinta anillo de foco */
html.f26 h1[tabindex="-1"]:focus,
html.f26 .f26-hero__title:focus {
    outline: none;
    box-shadow: none !important;
}

/* Cifras de ancho fijo para tiempos, puestos y puntos */
html.f26 .f26-num,
html.f26c .tabular,
html.f26c time {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Zonas seguras del iPhone (muesca e indicador de inicio) con viewport-fit=cover */
html.f26 body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* Hueco para la barra de navegación inferior del móvil */
@media (max-width: 991.98px) {
    html.f26c body {
        padding-bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ---------- Piezas reutilizables nuevas (prefijo f26-) ---------- */
.f26-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--f26-fs-xs);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--f26-mute);
}

.f26-tex { position: relative; isolation: isolate; }
.f26-tex::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--f26-tex);
    border-radius: inherit;
    pointer-events: none;
}

.f26-accent-line { height: 4px; background: var(--f26-grad-accent); }

.f26-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 3px 10px;
    border-radius: var(--f26-r-xs);
    background: var(--f26-tint);
    color: var(--f26-ink);
    font-size: var(--f26-fs-xs);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
}
.f26-chip--gold { background: var(--f26-gold); color: var(--f26-ink); }
.f26-chip--red { background: var(--f26-red); color: #fff; }
.f26-chip--ink { background: var(--f26-ink); color: #fff; }
.f26-chip--ghost { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }

.f26-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
