/* =====================================================================
   Bio 351 · AICC — Asesorías Integrales y Capacitación
   Base: bio del 319 (una sola capa, 2026-09-19), con la identidad de AICC
   (2026-10-21): navy #07182F, azul institucional #164A8A, dorado #D9A928
   solo como acento (líneas, estrellas, brillo de la portada), fondo #F5F7FA.
   Montserrat para títulos e Inter para el texto (se piden desde el <head>).
   El logo de AICC es apaisado: va en una placa blanca ancha, no cuadrada.

   Mecanica que el JS espera y no se puede tocar:
   - .modal / .popup-overlay / .video-modal parten en display:none y el JS
     les pone display:flex inline.
   - El carrusel mueve .bio-carrusel-track con translateX(-n*100%): una
     lamina por vista.
   - El riel muestra u oculta sus flechas con display inline (grid / none).
   - El acordeon anima max-height inline sobre .faq-answer.
   ===================================================================== */

:root {
    --ink: #07182F;
    --brand: #164A8A;
    --brand-dark: #0F3768;
    --brand-soft: #EAF1F9;
    --gold: #D9A928;
    --text: #243444;
    --muted: #5B6B7B;
    --bg: #F5F7FA;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --line: #e1e8f0;
    --line-strong: #cfdae7;
    --whatsapp: #15803d;          /* #25d366 con texto blanco no llega a 3:1 */
    --danger: #b42318;
    --star: #D9A928;

    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;

    --shadow-xs: 0 1px 2px rgba(7, 24, 47, .06);
    --shadow-sm: 0 1px 2px rgba(7, 24, 47, .04), 0 8px 24px rgba(7, 24, 47, .06);
    --shadow-md: 0 2px 6px rgba(7, 24, 47, .05), 0 18px 44px rgba(7, 24, 47, .10);
    --shadow-lg: 0 30px 80px rgba(4, 15, 30, .28);

    --font-display: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', 'Open Sans', system-ui, -apple-system, sans-serif;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    min-height: 100vh;
    padding: clamp(14px, 4vw, 40px) 14px 24px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    isolation: isolate;
}

/* Fondo: dos luces suaves, azul arriba y dorada abajo. Si el panel carga
   una imagen de fondo, el <style> del template reemplaza esta capa. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(900px 520px at 50% -160px, rgba(22, 74, 138, .16), transparent 70%),
        radial-gradient(620px 420px at 100% 100%, rgba(217, 169, 40, .12), transparent 70%),
        radial-gradient(520px 380px at 0% 70%, rgba(22, 74, 138, .07), transparent 70%),
        var(--bg);
    pointer-events: none;
}

img { max-width: 100%; }
button, input { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(22, 74, 138, .45); outline-offset: 3px; }

.container { width: min(100%, 640px); margin: 0 auto; }

/* ---------------------------------------------------------------------
   Perfil
   --------------------------------------------------------------------- */
.profile {
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
    padding: 0 clamp(20px, 5vw, 36px) 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    text-align: center;
}

/* Portada navy con un brillo dorado abajo, como la curva dorada del logo */
.profile-cover {
    height: 148px;
    margin: 0 calc(clamp(20px, 5vw, 36px) * -1);
    background:
        radial-gradient(circle at 50% 118%, rgba(217, 169, 40, .42), transparent 46%),
        repeating-conic-gradient(from -90deg at 50% 118%, rgba(255, 255, 255, .04) 0deg 2deg, transparent 2deg 14deg),
        linear-gradient(140deg, #0b2036 0%, var(--ink) 38%, var(--brand) 100%);
}

.top-buttons {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.corner-button {
    min-height: 38px;
    padding: 8px 15px 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.corner-button i { font-size: .8rem; }
.corner-button:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .45); transform: translateY(-1px); }
.subscribe-btn i { color: #f1d58f; }

/* Cuadrado redondeado y no circulo: el logo es cuadrado con la palabra
   "contraelestres" de borde a borde, y un circulo le corta las puntas. */
.profile-img {
    position: relative;
    display: block;
    width: 210px;
    height: 104px;
    margin: -52px auto 0;
    padding: 12px 18px;
    object-fit: contain;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line), 0 14px 32px rgba(7, 24, 47, .18);
}

.profile h1 {
    margin: 18px 0 8px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.profile-bio {
    max-width: 46ch;
    margin: 0 auto 20px;
    color: var(--muted);
    font-family: 'Inter', 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
    font-size: .98rem;
    line-height: 1.65;
}
.profile-bio > * + * { margin-top: 6px; }
.profile-bio:empty { display: none; }
.profile-bio a { color: var(--brand); }

.social-icons { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.social-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--brand);
    font-size: 1.05rem;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.social-icon:hover { border-color: var(--brand); background: var(--brand); color: #fff; transform: translateY(-2px); }
.social-icon[title="Hablar por WhatsApp"] { color: var(--whatsapp); }
.social-icon[title="Hablar por WhatsApp"]:hover { border-color: var(--whatsapp); background: var(--whatsapp); color: #fff; }

/* ---------------------------------------------------------------------
   Enlaces
   --------------------------------------------------------------------- */
.links { display: grid; gap: 10px; margin-bottom: 16px; }

.link-card {
    position: relative;
    width: 100%;
    min-height: 74px;
    padding: 15px 66px 15px 20px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: transform .22s var(--ease), box-shadow .22s ease, border-color .22s ease;
}
.link-card::after {
    content: '\f061';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: .8rem;
    transform: translateY(-50%);
    transition: background .22s ease, color .22s ease, transform .22s var(--ease);
}
.link-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.link-card:hover::after { background: var(--brand); color: #fff; transform: translate(3px, -50%); }
.link-card:active { transform: translateY(0); }

.link-text { display: block; min-width: 0; width: 100%; }
.link-title {
    color: inherit;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.005em;
}
.link-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.link-subtitle:empty { display: none; }
.bio-link-icono { margin-right: 9px; opacity: .9; }

/* El primer enlace es la accion principal: va en tinta, como la portada */
.link-card:first-child {
    min-height: 82px;
    border-color: transparent;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .10), transparent 55%),
        linear-gradient(135deg, var(--ink), var(--brand));
    color: #fff;
    box-shadow: 0 14px 30px rgba(7, 24, 47, .22);
}
.link-card:first-child .link-subtitle { color: rgba(255, 255, 255, .78); }
.link-card:first-child::after { background: rgba(255, 255, 255, .14); color: #fff; }
.link-card:first-child:hover { box-shadow: 0 18px 38px rgba(7, 24, 47, .28); }
.link-card:first-child:hover::after { background: var(--gold); color: var(--ink); }

/* Diseno por enlace elegido en el panel: el color llega en --link-color
   y el estilo como clase. Gana siempre sobre el aspecto de la plantilla. */
.link-card.bio-link--relleno {
    background: var(--link-color, var(--brand)) !important;
    border-color: var(--link-color, var(--brand)) !important;
    color: #fff !important;
}
.link-card.bio-link--borde {
    background: var(--surface) !important;
    border: 2px solid var(--link-color, var(--brand)) !important;
    color: var(--link-color, var(--brand)) !important;
    box-shadow: var(--shadow-xs) !important;
}
.link-card.bio-link--suave {
    background: rgba(22, 74, 138, .10) !important;
    background: color-mix(in srgb, var(--link-color, var(--brand)) 12%, #fff) !important;
    border: 1px solid var(--link-color, var(--brand)) !important;
    color: var(--link-color, var(--brand)) !important;
    box-shadow: var(--shadow-xs) !important;
}
/* El texto interno hereda el color del boton */
.link-card[class*="bio-link--"] h2,
.link-card[class*="bio-link--"] h3,
.link-card[class*="bio-link--"] p,
.link-card[class*="bio-link--"] span { color: inherit !important; }
.link-card[class*="bio-link--"] .link-subtitle { opacity: .82; }
.link-card[class*="bio-link--"]::after {
    background: rgba(127, 127, 127, .16);
    background: color-mix(in srgb, currentColor 14%, transparent);
    color: inherit;
}
.link-card[class*="bio-link--"]:hover::after { background: var(--link-color, var(--brand)); color: #fff; }
.link-card.bio-link--relleno:hover::after { background: #fff; color: var(--link-color, var(--brand)); }

/* Alineacion del texto, enlace por enlace */
.link-card.bio-link-txt--izquierda { text-align: left !important; justify-content: flex-start !important; }
.link-card.bio-link-txt--centro { padding-left: 66px; text-align: center !important; justify-content: center !important; }
.link-card.bio-link-txt--derecha { text-align: right !important; justify-content: flex-end !important; }

/* ---------------------------------------------------------------------
   Bloques: todos comparten la misma tarjeta y el mismo encabezado
   --------------------------------------------------------------------- */
.locations-section,
.bio-testimonios,
.bio-contenidos,
.bio-videos,
.bio-productos,
.bio-faq {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 16px 0;
    padding: clamp(22px, 5vw, 30px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.locations-header,
.bio-component-header { margin: 0 0 20px; text-align: left; }

.bio-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
    color: var(--brand);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    line-height: 1;
    text-transform: uppercase;
}
.bio-eyebrow::before { content: ''; width: 20px; height: 2px; border-radius: 2px; background: var(--gold); }

.locations-header h2,
.bio-component-header h2 {
    margin: 0 0 6px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 4.6vw, 1.7rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.015em;
}
.locations-header p,
.bio-component-header p {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.55;
}
.bio-component-header p b { color: var(--text); font-weight: 700; }

/* Descripcion larga que sale del editor del panel */
.bio-bloque-descripcion {
    margin: -4px 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.65;
}
.bio-bloque-descripcion > *:last-child { margin-bottom: 0; }
.bio-bloque-descripcion p { margin: 0 0 8px; }
.bio-bloque-descripcion ul,
.bio-bloque-descripcion ol { margin: 0 0 8px; padding-left: 18px; }
.bio-bloque-descripcion li { margin-bottom: 4px; }
.bio-bloque-descripcion strong { color: var(--text); font-weight: 700; }
.bio-bloque-descripcion a { color: var(--brand-dark); }

/* Tarjeta interior comun: novedades, productos y videos */
.bio-contenidos .blog-card,
.bio-productos .producto-card,
.bio-videos .video-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition: transform .24s var(--ease), box-shadow .24s ease, border-color .24s ease;
}
.bio-contenidos .blog-card:hover,
.bio-productos .producto-card:hover,
.bio-videos .video-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

/* Boton secundario comun: leer, ver producto, enlace del video */
.bio-contenidos .blog-card__link,
.producto-card__cta,
.bio-videos .video-card__link {
    min-height: 42px;
    padding: 10px 14px 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
.bio-contenidos .blog-card__link i,
.producto-card__cta i,
.bio-videos .video-card__link i { font-size: .75rem; transition: transform .2s ease; }
.bio-contenidos .blog-card__link:hover,
.producto-card__cta:hover,
.bio-videos .video-card__link:hover { background: var(--brand); color: #fff; }
.bio-contenidos .blog-card__link:hover i,
.producto-card__cta:hover i,
.bio-videos .video-card__link:hover i { transform: translateX(3px); }

/* ---------------------------------------------------------------------
   Riel horizontal (novedades, productos, videos)
   --------------------------------------------------------------------- */
.bio-riel-wrap { position: relative; margin: 0 -4px; }
.bio-riel {
    display: flex;
    gap: 12px;
    padding: 4px 4px 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.bio-riel::-webkit-scrollbar { display: none; }
.bio-riel > article {
    flex: 0 0 calc(50% - 6px);
    min-width: calc(50% - 6px);
    scroll-snap-align: start;
}
.bio-riel > article:only-child { flex-basis: 100%; min-width: 100%; }

.bio-riel-btn {
    position: absolute;
    top: 92px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: var(--ink);
    font-size: .8rem;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(7, 24, 47, .16);
    transform: translateY(-50%);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.bio-riel-btn:hover,
.bio-riel-btn:focus-visible { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-50%) scale(1.06); }
.bio-riel-btn.prev { left: -2px; }
.bio-riel-btn.next { right: -2px; }
.bio-productos .bio-riel-btn { top: 110px; }

/* ---------------------------------------------------------------------
   Novedades
   --------------------------------------------------------------------- */
.blog-card__image-link { display: block; color: inherit; text-decoration: none; }
.bio-contenidos .blog-card__image {
    position: relative;
    height: 176px;
    overflow: hidden;
    background: var(--brand-soft);
}
.bio-contenidos .blog-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}
.bio-contenidos .blog-card:hover .blog-card__image img { transform: scale(1.04); }
.bio-contenidos .blog-card__image--vacia {
    display: grid;
    place-items: center;
    color: #9fb4cf;
    background: linear-gradient(140deg, var(--surface-2), var(--brand-soft));
    font-size: 2rem;
}
.blog-card__fecha {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 1;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    font-size: .72rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(7, 24, 47, .14);
}
.blog-card__fecha i { color: var(--brand); }

.bio-contenidos .blog-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
}
.bio-contenidos .blog-card__title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 6px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.bio-contenidos .blog-card__title a { color: inherit; text-decoration: none; transition: color .2s ease; }
.bio-contenidos .blog-card:hover .blog-card__title a { color: var(--brand); }
.bio-contenidos .blog-card__excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.bio-contenidos .blog-card__link { margin-top: auto; }

/* ---------------------------------------------------------------------
   Productos
   --------------------------------------------------------------------- */
.producto-card__media-link { display: block; color: inherit; text-decoration: none; }
.producto-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--surface-2);
}
.producto-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}
.bio-productos .producto-card:hover .producto-card__media img { transform: scale(1.04); }
.producto-card__media--vacia {
    display: grid;
    place-items: center;
    color: #9fb4cf;
    background: linear-gradient(140deg, var(--surface-2), var(--brand-soft));
    font-size: 2rem;
}
.producto-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .01em;
}
.bio-productos .producto-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 16px 4px;
}
.bio-productos .producto-card__title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 5px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.bio-productos .producto-card__title a { color: inherit; text-decoration: none; transition: color .2s ease; }
.bio-productos .producto-card:hover .producto-card__title a { color: var(--brand); }
.producto-card__bajada {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.producto-card__precios {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}
.bio-productos .producto-card__precio { color: var(--ink); font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.bio-productos .producto-card__antes { color: var(--muted); font-size: .84rem; font-weight: 500; text-decoration: line-through; }
.producto-card__cta { margin: 12px 16px 16px; }

/* ---------------------------------------------------------------------
   Videos
   --------------------------------------------------------------------- */
.video-card__media,
.video-card__media--play {
    position: relative;
    display: block;
    width: 100%;
    /* 16:9: si se resetea el padding, la tarjeta colapsa */
    padding: 56.25% 0 0;
    overflow: hidden;
    border: 0;
    background: var(--ink);
    font: inherit;
}
.video-card__media--play { cursor: pointer; }
.video-card__media video,
.video-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .5s var(--ease);
}
.video-card__media--play:hover img,
.video-card__media--play:hover video { transform: scale(1.04); }
.video-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    padding-left: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    font-size: 1rem;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
    transform: translate(-50%, -50%);
    transition: transform .22s var(--ease), background .22s ease;
}
.video-card__media--play:hover .video-card__play { background: var(--gold); transform: translate(-50%, -50%) scale(1.08); }

.video-card__body { flex: 1; display: flex; flex-direction: column; padding: 15px 16px 16px; }
.bio-videos .video-card__title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 5px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.bio-videos .video-card__bajada {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 6px;
    color: var(--text);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.bio-videos .video-card__text {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.bio-videos .video-card__link { margin-top: auto; }
.bio-videos .video-card__body > * + .video-card__link { margin-top: 14px; }
.bio-videos .video-card:only-child .video-card__title { font-size: 1.15rem; -webkit-line-clamp: 3; }
.bio-videos .video-card:only-child .video-card__text { -webkit-line-clamp: 5; }

/* Popup: solo el video sobre fondo oscuro, entero (contain) */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    padding: 18px;
    align-items: center;
    justify-content: center;
    background: rgba(6, 16, 30, .86);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.video-modal .video-modal-content {
    position: relative;
    width: min(1000px, 100%);
    max-height: none;
    padding: 0;
    overflow: visible;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
}
.video-modal .close-modal {
    position: fixed;
    top: 16px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1.5rem;
}
.video-modal .close-modal:hover { background: #fff; color: var(--ink); }
.video-modal-player { overflow: hidden; border-radius: 14px; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.video-modal-player video { display: block; width: 100%; max-height: min(80vh, 720px); object-fit: contain; background: #000; }

/* ---------------------------------------------------------------------
   Opiniones (carrusel de una lamina)
   --------------------------------------------------------------------- */
.bio-testimonios-resumen {
    margin-top: 14px;
    padding: 7px 14px 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
}
.bio-testimonios-resumen__nota { color: var(--ink); font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1; }
.bio-testimonios-resumen__estrellas { color: var(--star); font-size: .72rem; letter-spacing: 1px; }
.bio-testimonios-resumen__detalle span { display: block; color: var(--muted); font-size: .74rem; white-space: nowrap; }

.bio-testimonios-carrusel { position: relative; }
.bio-testimonios-viewport {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}
.bio-testimonios-track { display: flex; transition: transform .55s var(--ease); will-change: transform; }
.bio-testimonios .testimonial-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 100%;
    width: 100%;
    padding: clamp(20px, 4.5vw, 28px);
}
.testimonial-card__comilla {
    position: absolute;
    top: 16px;
    right: 20px;
    color: var(--gold);
    opacity: .35;
    font-size: 2rem;
    line-height: 1;
    pointer-events: none;
}
.bio-testimonios .testimonial-card__rating { margin-bottom: 10px; color: var(--star); font-size: .82rem; letter-spacing: 2px; }
.bio-testimonios .testimonial-card__text {
    margin-bottom: 18px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.6;
}
.bio-testimonios .testimonial-card__text p + p { margin-top: 8px; }
.bio-testimonios .testimonial-card__author {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-top: 1px solid var(--line);
}
.bio-testimonios .testimonial-card__author img,
.bio-testimonios .testimonial-card__avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(7, 24, 47, .14);
}
.bio-testimonios .testimonial-card__avatar {
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}
.bio-testimonios .testimonial-card__avatar--inicial { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; text-transform: uppercase; }
.testimonial-card__author-datos { min-width: 0; }
.bio-testimonios .testimonial-card__author h3 { color: var(--ink); font-size: .92rem; font-weight: 700; line-height: 1.3; }
.bio-testimonios .testimonial-card__author p { margin-top: 1px; color: var(--muted); font-size: .78rem; }

.bio-carrusel-controles { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.bio-carrusel-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    font-size: .78rem;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.bio-carrusel-btn:hover,
.bio-carrusel-btn:focus-visible,
.bio-carrusel-pause[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
.bio-carrusel-dots { display: flex; align-items: center; gap: 6px; }
.bio-carrusel-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--line-strong);
    cursor: pointer;
    transition: width .25s ease, background .25s ease;
}
.bio-carrusel-dot.is-active { width: 22px; background: var(--brand); }

/* ---------------------------------------------------------------------
   Preguntas frecuentes
   --------------------------------------------------------------------- */
.faq-accordion { display: flex; flex-direction: column; gap: 8px; }
.bio-faq .faq-item {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.bio-faq .faq-item.active { border-color: var(--line-strong); background: var(--surface-2); box-shadow: var(--shadow-xs); }
.bio-faq .faq-question {
    width: 100%;
    padding: 15px 16px 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.bio-faq .faq-question h3 { color: var(--ink); font-size: .95rem; font-weight: 700; line-height: 1.4; }
.bio-faq .faq-question i {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: .72rem;
    transition: transform .3s var(--ease), background .25s ease, color .25s ease;
}
.bio-faq .faq-item.active .faq-question i { transform: rotate(180deg); background: var(--brand); color: #fff; }
.bio-faq .faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 18px;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.65;
    transition: max-height .3s ease, padding .3s ease;
}
.bio-faq .faq-item.active .faq-answer { padding: 0 18px 16px; }
.bio-faq .faq-answer p + p { margin-top: 8px; }
.bio-faq .faq-answer a { color: var(--brand); }

/* ---------------------------------------------------------------------
   Ubicaciones
   --------------------------------------------------------------------- */
.locations-grid { display: grid; gap: 12px; }
.location-card {
    display: grid;
    grid-template-columns: 38% 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition: border-color .24s ease, box-shadow .24s ease;
}
.location-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.location-card:not(:has(.location-image)) { grid-template-columns: 1fr; }
.location-image { position: relative; min-height: 190px; overflow: hidden; background: var(--brand-soft); }
.location-image img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .5s var(--ease); }
.location-card:hover .location-image img { transform: scale(1.04); }
.location-info { padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; }
.location-info h3 { margin-bottom: 10px; color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; line-height: 1.25; }
.location-details { display: grid; gap: 7px; color: var(--muted); font-size: .88rem; }
.location-details p { display: flex; align-items: flex-start; gap: 10px; line-height: 1.45; }
.location-details i { width: 16px; flex: 0 0 16px; margin-top: 3px; color: var(--brand); text-align: center; }
.location-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.location-link {
    flex: 1 1 140px;
    min-height: 40px;
    padding: 9px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--brand);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.location-link:hover { border-color: var(--brand); background: var(--brand); color: #fff; }
.location-link.whatsapp-link { border-color: transparent; background: var(--whatsapp); color: #fff; }
.location-link.whatsapp-link:hover { background: #116932; }

/* ---------------------------------------------------------------------
   Modales (suscripcion, compartir, mapa)
   --------------------------------------------------------------------- */
.modal,
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 18px;
    align-items: center;
    justify-content: center;
    background: rgba(4, 15, 30, .62);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: bio-fade .2s ease;
}
@keyframes bio-fade { from { opacity: 0; } }
@keyframes bio-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.modal-content,
.popup-content {
    position: relative;
    width: min(100%, 420px);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 30px 28px 26px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    animation: bio-pop .28s var(--ease);
}
.modal-content h2 {
    padding-right: 40px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.modal-content > p { margin: 6px 0 20px; color: var(--muted); font-size: .95rem; }

.close-modal,
.close-popup {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.close-modal:hover,
.close-popup:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }

.form-group { margin-bottom: 10px; }
.form-group input {
    width: 100%;
    min-height: 50px;
    padding: 12px 15px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-group input::placeholder { color: #7b8a9d; }
.form-group input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(22, 74, 138, .14); }

.submit-btn,
.map-action-btn {
    min-height: 48px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: #fff;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.submit-btn:hover,
.map-action-btn:hover { background: var(--brand); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(7, 24, 47, .2); }
#leadBoton { width: 100%; margin-top: 4px; }

.share-modal { text-align: center; }
.share-modal h2 { padding: 0 40px; }
.qr-container {
    margin: 20px 0;
    padding: 20px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 50% 0%, rgba(217, 169, 40, .14), transparent 60%),
        var(--surface-2);
}
.qr-image { padding: 10px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.static-qr { display: block; width: min(176px, 100%); height: auto; }
/* QR dibujado por qrcodejs cuando falta el PNG: solo medidas, nunca display */
.qr-image canvas, .qr-image img { width: 176px; height: 176px; }
.qr-text { margin-top: 12px; color: var(--muted); font-size: .86rem; }
.share-buttons-container { display: flex; gap: 10px; }
.share-buttons-container > * { flex: 1; }
.copy-link-btn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.copy-link-btn:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }

.map-popup { width: min(100%, 820px); padding: 0; overflow: hidden; }
.map-header { position: relative; padding: 18px 64px 18px 22px; background: linear-gradient(135deg, var(--ink), var(--brand)); color: #fff; }
.map-header h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.map-header .close-popup { top: 50%; margin-top: -18px; background: rgba(255, 255, 255, .14); color: #fff; }
.map-header .close-popup:hover { background: #fff; color: var(--ink); }
.map-content { height: min(52vh, 450px); background: var(--surface-2); }
.map-content iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-actions { display: flex; gap: 10px; padding: 14px; }
.map-action-btn { flex: 1; }
.map-action-btn + .map-action-btn { background: var(--whatsapp); }
.map-action-btn + .map-action-btn:hover { background: #116932; }

/* ---------------------------------------------------------------------
   Pie y QR de escritorio
   --------------------------------------------------------------------- */
footer { margin: 22px 0 8px; padding: 16px; text-align: center; color: var(--muted); font-size: .82rem; }
footer strong { color: var(--text); font-weight: 700; }
.footer-credit { margin-top: 4px; font-size: .78rem; }
.footer-credit a { color: var(--brand); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(22, 74, 138, .3); }
.footer-credit a:hover { border-color: var(--brand); }

.desktop-qr { display: none; }
@media (min-width: 1100px) {
    .desktop-qr {
        position: fixed;
        right: clamp(22px, 3vw, 44px);
        bottom: clamp(22px, 3vw, 40px);
        z-index: 50;
        width: 164px;
        padding: 14px 14px 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(255, 255, 255, .92);
        color: var(--ink);
        cursor: pointer;
        box-shadow: var(--shadow-md);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        transition: transform .25s var(--ease), box-shadow .25s ease;
    }
    .desktop-qr:hover { transform: translateY(-4px); box-shadow: 0 24px 55px rgba(7, 24, 47, .18); }
    .desktop-qr img { display: block; width: 132px; height: 132px; padding: 6px; border-radius: 12px; background: #fff; object-fit: contain; }
    .desktop-qr-label { font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
    .desktop-qr-hint { display: flex; align-items: center; gap: 6px; color: var(--brand); font-size: .74rem; font-weight: 700; }
}

/* ---------------------------------------------------------------------
   Movil
   --------------------------------------------------------------------- */
@media (max-width: 600px) {
    body { padding: 10px 10px 20px; }
    .profile-cover { height: 132px; }
    .corner-button { min-height: 36px; padding: 7px 13px 7px 11px; font-size: .78rem; }
    .profile-img { width: 184px; height: 92px; margin-top: -46px; padding: 10px 14px; border-radius: 20px; }
    .bio-riel > article { flex: 0 0 82%; min-width: 82%; }
    .bio-riel > article:only-child { flex-basis: 100%; min-width: 100%; }
    .bio-riel-btn { display: none !important; }
    .location-card { grid-template-columns: 1fr; }
    .location-image { min-height: 170px; }
    .location-info { padding: 16px 16px 18px; }
    .modal-content { padding: 26px 20px 20px; }
    .share-buttons-container,
    .map-actions { flex-direction: column; }
}

/* Una sola tarjeta con espacio: se abre en horizontal en vez de estirarse */
@media (min-width: 601px) {
    .bio-contenidos .blog-card:only-child { display: grid; grid-template-columns: 44% 1fr; }
    .bio-contenidos .blog-card:only-child > :first-child { height: 100%; }
    .bio-contenidos .blog-card:only-child .blog-card__image { height: 100%; min-height: 220px; }
    .bio-contenidos .blog-card:only-child .blog-card__content { padding: 22px; }

    .bio-productos .producto-card:only-child { display: grid; grid-template-columns: 44% 1fr; grid-template-rows: 1fr auto; }
    .bio-productos .producto-card:only-child > :first-child { grid-column: 1; grid-row: 1 / -1; }
    .bio-productos .producto-card:only-child .producto-card__media { aspect-ratio: auto; height: 100%; min-height: 220px; }
    .bio-productos .producto-card:only-child .producto-card__content { grid-column: 2; grid-row: 1; padding: 22px 22px 4px; }
    .bio-productos .producto-card:only-child .producto-card__cta { grid-column: 2; grid-row: 2; margin: 12px 22px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
