/* =====================================================================
   HUB-comerciales — Estilos principales
   ===================================================================== */

/* ── Variables globales de color ──────────────────────────────────── */
:root {
    --color-azul:        #041E42;   /* Azul principal Odella */
    --color-azul-medio:  #0a2f64;   /* Azul hover */
    --color-blanco:      #ffffff;
    --color-rojo:        #ff4d4d;
    --color-header-bg:   #041E42;   /* Fondo fijo del header */
    --color-header-text: #ffffff;   /* Texto/iconos del header */
    --color-hub-publico-bg:    #041E42;   /* Fondo páginas públicas de marca */
    --color-hub-comercial-bg:  #ffffff;   /* Fondo páginas comerciales */
    --color-hub-comercial-text: #041E42;  /* Texto en contexto comercial */
}

/* ── Reset / Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%;
    min-height: 100%;
    min-height: 100dvh;
}

body {
    height: 100%;
    min-height: 100%;
    min-height: 100dvh;
    font-family: 'DM Sans', BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #fff;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* Screen reader */
.screen-reader-text {
    clip: rect(1px,1px,1px,1px);
    height: 1px; overflow: hidden;
    position: absolute; white-space: nowrap; width: 1px;
}


/* =====================================================================
   PÁGINA INICIAL / ÁREA COMERCIAL
   ===================================================================== */

.hub-inicio {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}


.hub-inicio__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 540px;
    padding: 40px 24px;
}

/* Logo */
.hub-inicio__logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.hub-inicio__logo {
    width: 260px;
    max-width: 100%;
    height: auto;
    display: block;
}

.hub-inicio__slogan {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.75;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

/* ── Botones de navegación ─────────────────────────────────────────── */

.hub-inicio__botones {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* Botón base — usa --hub-text para adaptarse al color de fondo */
.hub-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 10px;
    background: rgba(128,128,128,0.10);
    border: 1px solid rgba(128,128,128,0.25);
    color: var(--hub-text, #fff);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, transform 0.15s ease;
    text-align: left;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.hub-btn:hover,
.hub-btn:focus-visible {
    background: rgba(128,128,128,0.18);
    transform: translateX(3px);
    outline: 2px solid rgba(128,128,128,0.4);
    outline-offset: 2px;
}

/* Override para fondo oscuro (variable no definida = por defecto blanco) */
.hub-inicio:not(.hub-comercial) .hub-btn {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.18);
    color: #fff;
}

.hub-inicio:not(.hub-comercial) .hub-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    outline-color: rgba(255,255,255,0.5);
}

.hub-btn__label { flex: 1; }

.hub-btn__arrow { opacity: 0.7; display: flex; align-items: center; }
.hub-btn__arrow svg, .hub-btn__arrow img { width: 18px; height: 18px; }

.hub-btn__icono { width: 28px; height: 28px; object-fit: contain; }
.hub-btn__icono-lock { display: flex; align-items: center; }
.hub-btn__icono-home { display: flex; align-items: center; }
.hub-btn__icono-home svg { width: 22px; height: 22px; }

/* Botón comercial (candado) — destaca */
.hub-btn--comercial {
    background: rgba(128,128,128,0.05);
    border-color: rgba(128,128,128,0.30);
    border-style: dashed;
    opacity: 0.9;
}

.hub-btn--comercial:hover,
.hub-btn--comercial:focus-visible {
    background: rgba(128,128,128,0.14);
    border-style: solid;
    opacity: 1;
}

/* Primer botón del catálogo — separación extra del resto */
.hub-inicio__botones .hub-btn--catalogo:first-child {
    margin-bottom: 20px;
}

/* Hub público (fondo oscuro): primer botón en blanco sólido */
.hub-inicio:not(.hub-comercial) .hub-btn--catalogo:first-child {
    background: rgba(255,255,255,0.95);
    border-color: rgba(255,255,255,0.95);
    color: #041e42;
}
.hub-inicio:not(.hub-comercial) .hub-btn--catalogo:first-child:hover {
    background: #ffffff;
}

/* Área comercial (fondo claro): primer botón en azul sólido, igual que Home cliente */
.hub-inicio.hub-comercial .hub-btn--catalogo:first-child {
    background: #041e42;
    /* border-color: #041e42; */
    color: #ffffff;
}
.hub-inicio.hub-comercial .hub-btn--catalogo:first-child:hover {
    background: #041e42c7;
}

/* Botón Home cliente (área comercial) */
.hub-btn--home-cliente {
    background: #041e42;
    /* border-color: #041e429e; */
    color: #ffffff;
    margin-top: 20px;
}

.hub-btn--home-cliente:hover {
    background: #041e42c7;
    transform: translateX(-3px);
}

/* Override explícito para fondo oscuro */
.hub-inicio:not(.hub-comercial) .hub-btn--comercial {
    background: rgb(119 36 36 / 30%);
    border-color: rgba(255,255,255,0.30);
    margin-top: 20px;
}

.hub-inicio:not(.hub-comercial) .hub-btn--comercial:hover {
    background: rgb(255 6 6 / 25%);
    outline-color: rgba(255, 255, 255, 0.5);
}

.hub-inicio:not(.hub-comercial) .hub-btn--home-cliente {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.30);
}

/* Botón Próximamente — deshabilitado, opaco */
.hub-btn--proximamente {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
    border-style: dashed;
    position: relative;
}

.hub-btn__badge-pronto {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Botón PDF — ícono de descarga a la izquierda */
.hub-btn--pdf .hub-btn__icono-pdf {
    display: flex;
    align-items: center;
    opacity: 0.8;
    flex-shrink: 0;
}

/* Mensaje de acceso denegado */
.hub-acceso-error {
    font-size: 14px;
    color: #fca5a5;
    text-align: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    padding: 10px 16px;
    width: 100%;
}

/* ── Legal / pie de página ────────────────────────────────────────── */

.hub-inicio__legal {
    width: 100%;
    padding: 16px 24px 20px;
    text-align: center;
    font-size: 11px;
    line-height: 1.6;
    opacity: 0.5;
    color: inherit;
    pointer-events: auto;
    margin-top: auto;
}

.hub-inicio__legal a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.8;
}

.hub-inicio__legal a:hover {
    opacity: 1;
}

/* ── Top bar del área comercial ───────────────────────────────────── */

.hub-comercial__topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--color-header-bg);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 13px;
    z-index: 100;
    gap: 12px;
    color: var(--color-header-text);
}

/* Aviso central — siempre centrado respecto a la topbar */
.hub-comercial__aviso {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--color-rojo);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    pointer-events: none;
    white-space: nowrap;
}

/* Botones laterales */
.hub-comercial__logout {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.85;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    transition: opacity 0.2s, background 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.hub-comercial__logout:hover {
    opacity: 1;
    background: rgba(255,255,255,1);
}

.hub-comercial__volver {
    background-color: rgba(255, 255, 255, 0.85);
    color: #041e42;
    padding: 15px 20px;
}

/* La topbar hereda el color configurable */
.hub-comercial__topbar {
    color: var(--hub-text, #fff);
}

/* When topbar is present, add padding to inner */
.hub-comercial .hub-inicio__inner {
    padding-top: 80px;
}

/* Topbar solo-aviso en categorías y marcas — fluye antes del header */
.hub-comercial__topbar--aviso {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: auto;
    justify-content: center;
    padding: 8px 20px;
    font-size: 13px;
}

.hub-comercial__topbar--aviso .hub-comercial__aviso {
    font-size: 13px;
    font-weight: 600;
}


/* =====================================================================
   PÁGINA DE CATEGORÍA
   ===================================================================== */

.hub-categoria {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Header unificado — fondo azul Odella fijo en todas las páginas ── */
.hub-cat__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--color-header-bg);
    color: var(--color-header-text);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 64px;
}

/* Botón "Volver atrás" — blanco, con borde, igual en todas las páginas */
.hub-cat__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 15px 20px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.85);
    color: #041e42;
    opacity: 0.9;
    transition: opacity 0.2s, background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.hub-cat__back svg, .hub-cat__back img { width: 16px; height: 16px; }
.hub-cat__back:hover { opacity: 1; background: rgba(255,255,255,1); }

/* Texto de aviso comercial — siempre centrado respecto al header */
.hub-cat__header-aviso {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-rojo);
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

/* Logo Odella centrado en el header */
.hub-cat__titles {
    flex: 1;
    min-width: 120px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Contenedor del logo inline SVG */
.hub-cat__header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: auto;
}

/* SVG inline del logo Odella */
.hub-cat__header-logo svg {
    height: 32px;
    width: auto;
    display: block;
    fill: #ffffff;
}

/* También cubrir paths con fill propio */
.hub-cat__header-logo svg path,
.hub-cat__header-logo svg polygon,
.hub-cat__header-logo svg rect {
    fill: #ffffff;
}

.hub-cat__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-header-text);
}

.hub-cat__subtitle {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 3px;
}

/* Icono home — blanco, mismo tamaño en todas las páginas */
.hub-cat__home {
    display: flex;
    align-items: center;
    color: var(--color-header-text);
    opacity: 0.85;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.hub-cat__home svg, .hub-cat__home img {
    width: 24px;
    height: 24px;
}
.hub-cat__home:hover { opacity: 1; }

/* (hub-cat__marca-logo ya no se usa — logo de marca va en el contenido) */

/* Hero con logo Odella + título — page-categoria */
.hub-cat__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 48px 24px 32px;
    text-align: center;
}

.hub-cat__hero-logo {
    width: 180px;
    max-width: 60vw;
    height: auto;
    display: block;
    opacity: 0.9;
}

.hub-cat__hero-titulo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--color-blanco);
}

.hub-cat__hero-subtitulo {
    font-size: 15px;
    opacity: 0.65;
    margin-top: -4px;
}

/* Grid de logos de marcas — page-categoria */
.hub-cat__marcas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 20px;
    padding: 0 32px 60px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Lista de materiales — botones verticales (page-marca) */
.hub-cat__grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 20px;
    flex: 1;
    width: 100%;
}

.hub-cat__empty {
    text-align: center;
    opacity: 0.6;
    font-size: 16px;
    padding: 60px 0;
    width: 100%;
}

/* Card de marca — hub público (fondo oscuro): borde blanco semitransparente */
.hub-marca-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 110px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 14px;
    padding: 20px 24px;
    text-decoration: none;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    position: relative;
}

.hub-marca-card:hover,
.hub-marca-card:focus-visible {
    background: rgba(255,255,255,0.20);
    border-color: rgba(255,255,255,0.65);
    transform: translateY(-3px);
    outline: none;
}

/* Card de marca — contexto claro (área comercial): fondo claro sobre blanco */
.hub-categoria--claro .hub-marca-card {
    background: rgba(4,30,66,0.07);
    border-color: rgba(4,30,66,0.15);
    color: #041E42;
}

.hub-categoria--claro .hub-marca-card:hover,
.hub-categoria--claro .hub-marca-card:focus-visible {
    background: rgba(4,30,66,0.16);
    border-color: rgba(4,30,66,0.35);
}

/* Logo dentro de card en contexto claro: sin inversión */
.hub-categoria--claro .hub-marca-card__logo {
    filter: none;
}

/* Nombre de marca en contexto claro */
.hub-categoria--claro .hub-marca-card__nombre {
    color: #041E42;
}

.hub-marca-card--pronto {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.hub-marca-card__logo {
    width: 140px;
    height: 60px;
    max-width: 140px;
    max-height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.hub-marca-card__nombre {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.hub-marca-card__badge {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.15);
    padding: 2px 7px;
    border-radius: 20px;
}

/* Ítem de marca — usa --hub-text para adaptarse al color de fondo */
.hub-marca-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 540px;
    background: rgba(128,128,128,0.08);
    border: 1px solid rgba(128,128,128,0.20);
    border-radius: 12px;
    padding: 16px 20px;
    transition: background 0.2s, border-color 0.2s;
    position: relative;
    text-align: left;
    cursor: pointer;
    color: var(--hub-text, #fff);
    font-size: 15px;
    font-weight: 500;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    text-decoration: none;
}

.hub-marca-item:hover,
.hub-marca-item:focus-visible {
    background: rgba(128,128,128,0.16);
    border-color: rgba(128,128,128,0.40);
    outline: none;
}

/* Los ítems de marca siempre heredan --hub-text del contenedor */

.hub-marca-item--pronto {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

/* Item destacado — fondo azul Odella */
.hub-marca-item--destacado {
    background: #041E42;
    border-color: #041E42;
    color: #ffffff;
}

.hub-marca-item--destacado:hover,
.hub-marca-item--destacado:focus-visible {
    background: #0a2f64;
    border-color: #0a2f64;
    color: #ffffff;
}

/* En fondo oscuro (hub público) el destacado va en blanco */
.hub-categoria--oscuro .hub-marca-item--destacado {
    background: rgba(255,255,255,0.90);
    border-color: rgba(255,255,255,0.90);
    color: #041E42;
}

.hub-categoria--oscuro .hub-marca-item--destacado:hover {
    background: #ffffff;
    border-color: #ffffff;
}

.hub-marca-item__logo {
    max-width: 80px;
    max-height: 36px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.hub-marca-item__nombre {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}

.hub-marca-item__badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.15);
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: auto;
}

/* Overlay de descarga en brochures */
.hub-marca-item__overlay {
    margin-left: auto;
    opacity: 0.6;
    color: currentColor;
    flex-shrink: 0;
}

/* Wrapper item + botón compartir */
.hub-marca-item-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 540px;
}

.hub-marca-item-wrap .hub-marca-item {
    flex: 1;
    max-width: none;
}

/* Botón compartir */
.hub-share-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(128,128,128,0.08);
    border: 1px solid rgba(128,128,128,0.20);
    border-radius: 10px;
    color: currentColor;
    opacity: 0.7;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    position: relative;
}

.hub-share-btn:hover { background: rgba(128,128,128,0.18); opacity: 1; }

/* Popup del link compartible */
.hub-share-popup {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: hub-fadein 0.15s ease;
}

.hub-share-popup[hidden] { display: none; }

.hub-share-popup__box {
    background: #fff;
    color: #111;
    border-radius: 14px;
    padding: 28px 24px 24px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: hub-slidein 0.18s ease;
}

.hub-share-popup__titulo {
    font-size: 16px;
    font-weight: 700;
    color: #041E42;
    margin-bottom: 6px;
}

.hub-share-popup__subtitulo {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.hub-share-popup__input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    background: #f8f9fa;
    margin-bottom: 12px;
}

.hub-share-popup__acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hub-share-popup__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.hub-share-popup__btn--copiar {
    background: #041E42;
    color: #fff;
    flex: 1;
}
.hub-share-popup__btn--copiar:hover { background: #0a2f64; }

.hub-share-popup__btn--cerrar {
    background: #f0f0f0;
    color: #333;
}
.hub-share-popup__btn--cerrar:hover { background: #e0e0e0; }

.hub-share-popup__btn--revocar {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    margin-left: auto;
}
.hub-share-popup__btn--revocar:hover { background: #fee2e2; }

.hub-marca-item--brochure:hover .hub-marca-item__overlay {
    opacity: 1;
}

.hub-marca-item--link > svg {
    margin-left: auto;
    opacity: 0.6;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.hub-marca-item__icono-play {
    display: flex;
    align-items: center;
    opacity: 0.8;
    flex-shrink: 0;
    color: currentColor;
}


/* =====================================================================
   MODAL (Login + PDF)
   ===================================================================== */

.hub-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: hub-fadein 0.18s ease;
}

.hub-modal-overlay[hidden] { display: none; }

@keyframes hub-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.hub-modal {
    background: #fff;
    color: #111;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 36px 32px 32px;
    position: relative;
    animation: hub-slidein 0.2s ease;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

@keyframes hub-slidein {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

.hub-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    color: #888;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.hub-modal__close:hover { color: #333; background: #f0f0f0; }

.hub-modal__header {
    text-align: center;
    margin-bottom: 28px;
}

.hub-modal__lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #041E42;
    margin-bottom: 12px;
}

.hub-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: #041E42;
    margin-bottom: 6px;
}

.hub-modal__subtitle {
    font-size: 14px;
    color: #666;
}

/* Form */
.hub-modal__form { display: flex; flex-direction: column; gap: 18px; }

.hub-form-group { display: flex; flex-direction: column; gap: 6px; }

.hub-form-label { font-size: 13px; font-weight: 600; color: #333; }

.hub-form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #111;
    transition: border-color 0.2s;
    background: #fafafa;
}

.hub-form-input:focus {
    outline: none;
    border-color: #041E42;
    background: #fff;
}

.hub-form-pass-wrap {
    position: relative;
}

.hub-form-pass-wrap .hub-form-input {
    padding-right: 44px;
}

.hub-form-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.hub-form-toggle-pass:hover { color: #333; }

/* Error message */
.hub-form-error {
    font-size: 13px;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px 12px;
}

.hub-form-error[hidden] { display: none; }

/* Submit button */
.hub-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: #041E42;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
    margin-top: 4px;
}

.hub-btn-submit:hover { background: #0a2f64; }
.hub-btn-submit:active { transform: scale(0.98); }

/* Spinner */
@keyframes hub-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.hub-spinner { animation: hub-spin 0.8s linear infinite; }
.hub-btn-submit__spinner[hidden] { display: none; }

/* PDF modal — visor fullscreen */
.hub-modal-overlay--pdf {
    padding: 0;
    align-items: stretch;
}

.hub-modal--pdf {
    max-width: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
}

.hub-modal-pdf__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #041E42;
    flex-shrink: 0;
    gap: 12px;
}

.hub-modal-pdf__nombre {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-modal-pdf__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hub-btn-pdf-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.hub-btn-pdf-download:hover { background: rgba(255,255,255,0.25); }

.hub-modal-pdf__close {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    padding: 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.hub-modal-pdf__close:hover { color: #fff; background: rgba(255,255,255,0.15); }

.hub-modal-pdf__iframe {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: none;
    background: #f0f0f0;
    overflow: hidden;
}

/* object para móvil — scroll nativo del PDF */
.hub-modal-pdf__iframe--mobile {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

.hub-modal-pdf__fallback {
    color: #fff;
    font-size: 15px;
    text-align: center;
    padding: 24px;
}

.hub-modal-pdf__fallback a {
    color: #7dd3fc;
    text-decoration: underline;
}


/* =====================================================================
   PÁGINA DE MARCA (single-hub_marca)
   ===================================================================== */

/* Logo de la marca — en el contenido, no en el header */
.hub-marca__logo-wrap {
    display: flex;
    justify-content: center;
    padding: 32px 24px 8px;
}

.hub-marca__logo {
    max-width: 260px;
    width: 260px;
    height: 80px;
    object-fit: contain;
    filter: none;
}

/* No aplicar filtro al logo de marca — cada logo debe tener los colores correctos para su fondo */

.hub-marca__content {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

/* Sección genérica */
.hub-seccion {
    padding: 40px 0;
    border-bottom: 1px solid rgba(128,128,128,0.15);
}

.hub-seccion:last-child { border-bottom: none; }

.hub-seccion__titulo {
    font-size: 13px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 24px;
}

/* ── Videos ─────────────────────────────────────────────────────────── */

.hub-video__player-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.hub-video__player,
.hub-video__iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    object-fit: cover;
}

.hub-video__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.hub-video__thumb {
    flex-shrink: 0;
    width: 120px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
    padding: 0;
}

.hub-video__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hub-video__thumb-label {
    font-size: 11px;
    color: #fff;
    padding: 6px;
    text-align: center;
    line-height: 1.3;
}

.hub-video__thumb--active,
.hub-video__thumb:hover {
    border-color: rgba(255,255,255,0.7);
}

/* ── Casos Antes y Después / Materiales de Marketing ────────────────── */

.hub-casos__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.hub-caso__item {
    position: relative;
    width: 180px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
}

.hub-caso__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.hub-caso__doc-icon {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.hub-caso__label {
    font-size: 12px;
    font-weight: 500;
    padding: 8px 10px 4px;
    line-height: 1.3;
    flex: 1;
}

.hub-caso__download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: none;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.hub-caso__download:hover { background: rgba(255,255,255,0.18); }

/* Botón imagen para abrir lightbox */
.hub-caso__img-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    position: relative;
}

.hub-caso__img-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.2s;
}

.hub-caso__img-btn:hover::after {
    background: rgba(0,0,0,0.2);
}

/* =====================================================================
   LIGHTBOX DE IMÁGENES
   ===================================================================== */

.hub-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    animation: hub-fadein 0.2s ease;
}

.hub-lightbox[hidden] { display: none; }

.hub-lightbox__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(100vw - 160px);
    max-height: 100vh;
    padding: 60px 0 24px;
}

.hub-lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 8px;
    display: block;
    animation: hub-slidein 0.2s ease;
}

.hub-lightbox__footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.hub-lightbox__label {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 500;
}

.hub-lightbox__download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    padding: 7px 14px;
    text-decoration: none;
    transition: background 0.2s;
}

.hub-lightbox__download:hover { background: rgba(255,255,255,0.22); }

.hub-lightbox__counter {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    margin-top: 8px;
}

.hub-lightbox__close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    z-index: 2001;
}

.hub-lightbox__close:hover { background: rgba(255,255,255,0.22); color: #fff; }

.hub-lightbox__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    z-index: 2001;
}

.hub-lightbox__nav:hover { background: rgba(255,255,255,0.2); color: #fff; }
.hub-lightbox__nav[hidden] { display: none; }

.hub-lightbox__nav--prev { left: 20px; }
.hub-lightbox__nav--next { right: 20px; }

@media (max-width: 600px) {
    .hub-lightbox__inner { max-width: calc(100vw - 80px); padding: 50px 0 80px; }
    .hub-lightbox__nav--prev { left: 8px; }
    .hub-lightbox__nav--next { right: 8px; }
    .hub-lightbox__nav { width: 40px; height: 40px; }
}

.hub-caso__download:hover { background: rgba(255,255,255,0.18); }

.hub-caso__footer {
    display: flex;
    align-items: center;
}

.hub-caso__footer .hub-caso__download { flex: 1; }

.hub-caso__footer .hub-share-btn {
    width: 36px;
    height: 36px;
    border-radius: 0;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}

/* =====================================================================
   SUBMARCAS — grid dentro de single-hub_marca
   ===================================================================== */

/* Mismo layout que hub-cat__marcas */
.hub-submarcas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 20px;
    padding: 32px 0 60px;
    width: 100%;
}

/* Contexto claro (área comercial): logo sin inversión, borde azul */
.hub-categoria--claro .hub-submarca-card {
    background: rgba(4,30,66,0.07);
    border-color: rgba(4,30,66,0.22);
}

.hub-categoria--claro .hub-submarca-card:hover,
.hub-categoria--claro .hub-submarca-card:focus-visible {
    background: rgba(4,30,66,0.14);
    border-color: rgba(4,30,66,0.45);
}

.hub-categoria--claro .hub-submarca-card .hub-marca-card__logo {
    filter: none;
}

.hub-categoria--claro .hub-submarca-card .hub-marca-card__nombre {
    color: #041E42;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 600px) {
    .hub-inicio__inner { 
        padding: 0px 16px 20px; 
        gap: 28px; 
        padding-top: 25px;
    }
    .hub-inicio__logo { max-width: 220px; }

    .hub-cat__header {
        padding: 10px 14px;
        flex-wrap: wrap;
        min-height: auto;
        gap: 8px;
    }

    /* En mobile el aviso sale del absolute y ocupa su propia fila */
    .hub-cat__header-aviso {
        position: static;
        transform: none;
        white-space: normal;
        font-size: 11px;
        text-align: center;
        width: 100%;
        order: 10;
        padding: 4px 0 2px;
        pointer-events: none;
    }

    .hub-cat__titles {
        flex: 1;
    }
    .hub-cat__title  { font-size: 18px; }
    .hub-cat__back span { display: none; }

    .hub-cat__hero { padding: 32px 16px 20px; gap: 10px; }
    .hub-cat__hero-logo { width: 140px; }
    .hub-cat__hero-titulo { font-size: 20px; }

    .hub-cat__marcas {
        gap: 14px;
        padding: 0 16px 40px;
    }
    .hub-marca-card {
        width: 47%;
        height: 80px;
        padding: 14px 16px;
    }
    .hub-marca-card__logo { max-width: 100px; max-height: 44px; }

    .hub-cat__grid {
        gap: 10px;
        padding: 20px 16px 40px;
    }

    .hub-modal { padding: 28px 20px 24px; }

    .hub-comercial__topbar { padding: 8px 14px; }

    /* Aviso en topbar mobile: fluye a la derecha del botón, texto pequeño en 2 líneas */
    .hub-comercial__topbar:not(.hub-comercial__topbar--aviso) .hub-comercial__aviso {
        position: static;
        transform: none;
        white-space: normal;
        font-size: 11px;
        font-weight: 600;
        text-align: right;
        flex: 1;
        line-height: 1.3;
    }

    .hub-marca__content { padding: 20px 16px 60px; }
    .hub-seccion { padding: 28px 0; }
    .hub-caso__item { width: calc(50% - 8px); }
    .hub-video__thumb { width: 90px; height: 52px; }
    .hub-submarcas { gap: 14px; padding: 20px 0 40px; }
}

@media (min-width: 600px) {
    .hub-caso__item { width: 180px; }
}

@media (min-width: 900px) {
    .hub-inicio__inner { max-width: 480px; }
    .hub-cat__grid { gap: 14px; padding: 20px 48px 20px; }
}
