html { scroll-behavior: smooth; }
body {
    font-family: 'Montserrat', sans-serif;
    color: #0f172a;
    background: #ffffff;
}

h1, h2, h3, h4, h5, h6,
.section-title {
    font-family: 'Outfit', sans-serif;
}

.hero-bg {
    background:
        radial-gradient(circle at top right, rgba(200,16,46,0.12), transparent 28%),
        radial-gradient(circle at left center, rgba(15,39,71,0.10), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.gradient-card {
    background: linear-gradient(135deg, #0f2747 0%, #ff0000 100%);
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.1;
    font-weight: 800;
    color: #0f2747;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border-radius: 999px;
    padding: .55rem .9rem;
    background: rgba(200,16,46,0.08);
    color: #c8102e;
    font-size: .92rem;
    font-weight: 600;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200,16,46,0.10);
    color: #c8102e;
    font-weight: 800;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* Menú principal: oculto en móvil salvo cuando está abierto */
#main-nav {
    display: none;
}
@media (min-width: 1024px) {
    #main-nav {
        display: flex;
        align-items: center;
        gap: 2rem;
        position: static;
        width: auto;
        max-height: none;
        overflow: visible;
        border: 0;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }
}
@media (max-width: 1023.98px) {
    #site-header.is-nav-open #main-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        z-index: 40;
        max-height: min(70vh, 28rem);
        overflow-y: auto;
        border-bottom: 1px solid rgb(226 232 240 / 0.9);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        padding: 0.75rem 1rem 1rem;
        box-shadow: 0 12px 40px rgba(15, 39, 71, 0.12);
    }
}

/* Accesos: quitar marcador de <details> y flecha al abrir */
.nav-accesos > summary {
    list-style: none;
}
.nav-accesos > summary::-webkit-details-marker {
    display: none;
}
.nav-accesos[open] .nav-accesos-chevron {
    transform: rotate(180deg);
}

.logos-carousel-track {
    width: max-content;
    animation: logos-scroll 28s linear infinite;
}

.logos-carousel-item {
    width: 11rem;
    min-width: 11rem;
}

.logos-carousel-track:hover {
    animation-play-state: paused;
}

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

#logos-clientes {
    scroll-margin-top: 13rem;
}

.resenas-panel {
    margin-top: 3.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 39, 71, 0.1);
    padding: 1.5rem 1.25rem 1.25rem;
}

.resenas-marco {
    position: relative;
}

.resenas-stage {
    display: grid;
    min-height: 16rem;
}

.resenas-slide {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
    gap: 1.5rem 2.25rem;
    align-items: center;
    padding: 0.5rem 3.25rem 0.75rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .45s ease, visibility .45s ease;
}

.resenas-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.resenas-marca {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.resenas-logo-marco,
.resenas-mini-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f7f9fc;
    border: 1px solid #e2e8f0;
}

.resenas-logo-marco {
    width: 7.25rem;
    height: 5.25rem;
    padding: .4rem .55rem;
    border-radius: 1.15rem;
}

.resenas-logo-marco img,
.resenas-mini-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.resenas-empresa {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    font-weight: 800;
    line-height: 1.15;
    color: #0f2747;
}

.resenas-detalle {
    min-width: 0;
    border-left: 3px solid #c8102e;
    padding-left: 1.5rem;
}

.resenas-texto {
    margin: 0;
    color: #334155;
    font-size: 1.05rem;
    line-height: 1.7;
}

.resenas-texto::before {
    content: "“";
    margin-right: .15rem;
    color: #c8102e;
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 0;
}

.resenas-persona {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-top: 1.35rem;
}

.resenas-foto,
.resenas-avatar {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.resenas-foto {
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.18);
}

.resenas-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f2747;
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
}

.resenas-nombre {
    margin: 0;
    color: #0f2747;
    font-weight: 800;
    line-height: 1.2;
}

.resenas-cargo {
    margin: .2rem 0 0;
    color: #64748b;
    font-size: .92rem;
    line-height: 1.3;
}

.resenas-progreso {
    height: 3px;
    margin-top: 1.35rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.resenas-progreso > span {
    display: block;
    width: 0;
    height: 100%;
    background: #c8102e;
}

.resenas-visor.is-playing .resenas-slide.is-active .resenas-progreso > span {
    animation: resenas-avance var(--resenas-duracion, 6.5s) linear forwards;
}

.resenas-visor.is-paused .resenas-progreso > span {
    animation-play-state: paused;
}

@keyframes resenas-avance {
    from { width: 0; }
    to { width: 100%; }
}

.resenas-nav {
    position: absolute;
    top: 42%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #0f2747;
    box-shadow: 0 8px 20px rgba(15, 39, 71, 0.16);
    cursor: pointer;
}

.resenas-nav:hover,
.resenas-nav:focus-visible {
    background: #c8102e;
    color: #fff;
    outline: none;
}

.resenas-prev { left: 0; }
.resenas-next { right: 0; }

.resenas-carril {
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    border-top: 1px solid #e2e8f0;
    scrollbar-width: thin;
}

.resenas-mini {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex: 0 0 auto;
    max-width: 16rem;
    scroll-snap-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    padding: .4rem .9rem .4rem .4rem;
    color: #0f2747;
    cursor: pointer;
    text-align: left;
}

.resenas-mini.is-active {
    border-color: #c8102e;
    background: #fff;
    box-shadow: 0 6px 16px rgba(200, 16, 46, 0.12);
}

.resenas-mini:focus-visible {
    outline: 2px solid #c8102e;
    outline-offset: 2px;
}

.resenas-mini-logo {
    width: 2.5rem;
    height: 2.5rem;
    padding: .2rem;
    border-radius: 999px;
}

.resenas-mini-nombre {
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 800px) {
    #logos-clientes {
        scroll-margin-top: 8.5rem;
    }

    .resenas-slide {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 1.15rem;
    }

    .resenas-detalle {
        border-left: 0;
        border-top: 3px solid #c8102e;
        padding-left: 0;
        padding-top: 1.1rem;
    }

    .resenas-marco {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "stage stage stage"
            "prev espacio next";
        align-items: center;
        column-gap: .75rem;
        row-gap: .35rem;
    }

    .resenas-stage {
        grid-area: stage;
        min-height: 0;
    }

    .resenas-nav {
        position: static;
        top: auto;
        transform: none;
    }

    .resenas-prev { grid-area: prev; }
    .resenas-next { grid-area: next; }
}

@media (prefers-reduced-motion: reduce) {
    .resenas-slide,
    .resenas-progreso > span {
        transition: none;
        animation: none;
    }
}

.hero-banner {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    border: 1px solid #e2e8f0;
    background: #0f2747;
    box-shadow: 0 18px 50px rgba(15, 39, 71, 0.12);
    container-type: inline-size;
}

.hero-banner-viewport {
    position: relative;
    aspect-ratio: 1495 / 936;
}

.hero-banner-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity .55s ease;
    pointer-events: none;
}

.hero-banner-slide.is-active {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

.hero-banner-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.hero-banner-slide figcaption {
    position: absolute;
    left: .9rem;
    bottom: .9rem;
    max-width: calc(100% - 15rem);
    border-radius: 999px;
    background: rgba(15, 39, 71, 0.82);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
    padding: .45rem .8rem;
}

.hero-banner-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f2747;
    box-shadow: 0 8px 20px rgba(15, 39, 71, 0.18);
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-banner-nav:hover,
.hero-banner-nav:focus-visible {
    background: #c8102e;
    color: #fff;
    outline: none;
}

.hero-banner-prev { left: .75rem; }
.hero-banner-next { right: .75rem; }

.hero-banner-dots {
    position: absolute;
    right: 4.75rem;
    bottom: 1.05rem;
    z-index: 2;
    display: flex;
    gap: .4rem;
}

.hero-banner-dot {
    width: .55rem;
    height: .55rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-banner-dot.is-active {
    width: 1.35rem;
    background: #fff;
}

@container (max-width: 480px) {
    .hero-banner-slide figcaption {
        right: .75rem;
        bottom: 2.15rem;
        max-width: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-banner-dots {
        left: .75rem;
        right: auto;
        bottom: .65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-banner-slide {
        transition: none;
    }
}

.metrics-card {
    background: #ffffff;
}

/* Márgenes laterales: aire fijo en móvil/tablet; 80% del ancho en pantalla completa */
.site-shell {
    width: 100%;
    margin-inline: auto;
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
}
@media (min-width: 640px) {
    .site-shell {
        padding-left: max(1.75rem, env(safe-area-inset-left));
        padding-right: max(1.75rem, env(safe-area-inset-right));
    }
}
@media (min-width: 1024px) {
    .site-shell {
        padding-left: max(2.5rem, env(safe-area-inset-left));
        padding-right: max(2.5rem, env(safe-area-inset-right));
    }
}
@media (min-width: 1280px) {
    .site-shell {
        width: clamp(68rem, 80%, 100rem);
        padding-left: 0;
        padding-right: 0;
    }
}

.wsp-float {
    position: fixed;
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: calc(34px + env(safe-area-inset-bottom) + 1rem);
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    height: 3.75rem;
    padding: 0 1.15rem 0 .85rem;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(18, 140, 70, 0.35);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.wsp-float:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(18, 140, 70, 0.42);
}
.wsp-float-icon {
    width: 1.85rem;
    height: 1.85rem;
    flex-shrink: 0;
}
.wsp-float::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
    animation: wsp-pulse 2.4s ease-out infinite;
    pointer-events: none;
}
.wsp-float:hover::before {
    animation: none;
}
@keyframes wsp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@media (max-width: 639.98px) {
    .wsp-float {
        width: 3.75rem;
        padding: 0;
        justify-content: center;
    }
    .wsp-float-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

body {
    padding-bottom: calc(34px + env(safe-area-inset-bottom));
}

.indicadores-barra {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: calc(34px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #0f2747;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.indicadores-barra::-webkit-scrollbar {
    display: none;
}

.indicador {
    padding: 7px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.indicador:last-child {
    border-right: none;
}

.indicador-titulo {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.62);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0;
}

.indicador-valor {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

@media (max-width: 800px) {
    .indicadores-barra {
        justify-content: flex-start;
    }

    .indicador {
        flex: 0 0 auto;
        padding: 0 14px;
    }
}

.blog-card-imagen {
    display: block;
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.blog-articulo-imagen {
    display: block;
    width: 100%;
    max-height: 28rem;
    object-fit: cover;
    border-radius: 1.5rem;
}

.blog-admin-thumb {
    width: 4.5rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 0.75rem;
    background: #f1f5f9;
}

.blog-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.blog-login-card {
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
}

.blog-aviso {
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.blog-aviso-ok {
    background: #ecfdf5;
    color: #047857;
}

.blog-aviso-error {
    background: #fef2f2;
    color: #b91c1c;
}

body.blog-admin-body {
    background: #f8fafc;
}

.blog-admin-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .blog-admin-grid {
        grid-template-columns: 22rem minmax(0, 1fr);
        align-items: start;
    }
}

.blog-tabla-wrap {
    overflow-x: auto;
}

.blog-tabla {
    width: 100%;
    min-width: 40rem;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.blog-tabla th,
.blog-tabla td {
    padding: 0.9rem 1.5rem;
    vertical-align: middle;
}

.blog-tabla th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
}

.blog-tabla td {
    border-top: 1px solid #f1f5f9;
}

.blog-salir {
    display: inline;
}
