/* ========== Home — barra superior, hero y secciones (referencia diseño) ========== */
:root {
    /* Misma franja bajo el hero y sección “Cuidamos tu corazón” (sin salto blanco/gris) */
    --home-section-band: #eef1f4;
}

/* --- Topbar: fondo azul noche, texto e iconos gris corporativo #cdc9ca --- */
.topbar-modern {
    background: rgb(15, 29, 49);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(205, 201, 202, 0.12);
}

/* Barra azul más baja y menos invasiva */
.topbar-modern.topbar-compact {
    font-size: 0.75rem;
    font-weight: 600;
}

.topbar-modern.topbar-compact .tb-item {
    gap: 0.35rem;
}

.topbar-modern.topbar-compact .tb-item i {
    width: 24px;
    height: 24px;
    font-size: 0.68rem;
}

.topbar-modern.topbar-compact .social-circle {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
}

.topbar-modern .tb-link {
    color: #cdc9ca;
    text-decoration: none;
}

.topbar-modern .tb-link:hover {
    color: #fff;
}

.topbar-modern .tb-muted {
    color: #cdc9ca;
    opacity: 0.95;
}

.topbar-modern .tb-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Una fila: contacto (flexible) + redes siempre visibles a la derecha */
.topbar-responsive .topbar-responsive-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.topbar-responsive .tb-contact-marquee {
    flex: 1 1 0%;
    min-width: 0;
}

.topbar-responsive .tb-social-fixed {
    flex: 0 0 auto;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding-left: 0.4rem;
    background: rgb(15, 29, 49);
    position: relative;
    z-index: 2;
}

/* Escritorio amplio: contacto estático en una o varias líneas (sin marquee) */
@media (min-width: 992px) {
    .topbar-responsive .tb-marquee-viewport {
        overflow: visible;
        width: 100%;
    }

    .topbar-responsive .tb-marquee-track {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 0.5rem;
        row-gap: 0.25rem;
        width: 100% !important;
        max-width: none;
        animation: none !important;
        transform: none !important;
    }

    .topbar-responsive .tb-marquee-group[aria-hidden="true"] {
        display: none !important;
    }

    .topbar-responsive .tb-marquee-group:first-child {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 0.5rem;
        row-gap: 0.25rem;
        padding-right: 0;
    }

    .topbar-responsive .tb-sep {
        opacity: 0.65;
        user-select: none;
    }
}

/* Móvil y tablet: teléfono, correo y horario en carril horizontal en bucle; redes fijas a la derecha */
@media (max-width: 991.98px) {
    .topbar-responsive .tb-contact-marquee {
        overflow: hidden;
    }

    .topbar-responsive {
        font-size: 0.7rem;
        letter-spacing: 0.01em;
    }

    .topbar-responsive .tb-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .topbar-responsive .tb-item .tb-link {
        word-break: normal;
        overflow-wrap: normal;
    }

    .topbar-responsive .tb-item i {
        width: 22px;
        height: 22px;
        font-size: 0.62rem;
    }

    .topbar-responsive .tb-sep {
        opacity: 0.55;
        padding: 0 0.15rem;
        flex-shrink: 0;
        user-select: none;
    }

    .topbar-responsive .tb-marquee-viewport {
        overflow: hidden;
        width: 100%;
        min-width: 0;
        /* Solo suavizado a la izquierda; a la derecha el texto no debe “comerse” junto a las redes */
        mask-image: linear-gradient(90deg, transparent, #000 5%, #000 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 100%);
    }

    .topbar-responsive .tb-marquee-track {
        display: flex;
        width: max-content;
        will-change: transform;
        animation: tb-topbar-marquee 28s linear infinite;
    }

    .topbar-responsive .tb-marquee-group {
        display: flex;
        align-items: center;
        column-gap: 0.35rem;
        padding-right: 2rem;
        flex-shrink: 0;
    }

    .topbar-responsive .tb-marquee-group[aria-hidden="true"] {
        pointer-events: none;
        user-select: none;
    }

    .topbar-responsive .tb-social-fixed {
        flex-wrap: nowrap;
        justify-content: flex-end;
        min-width: 5.5rem;
    }

    .topbar-responsive .tb-social-fixed .social-circle {
        width: 26px;
        height: 26px;
        font-size: 0.72rem;
    }

    .topbar-responsive .topbar-responsive-inner {
        gap: 0.35rem !important;
        flex-wrap: nowrap !important;
    }

    .topbar-responsive .tb-marquee-viewport:hover .tb-marquee-track {
        animation-play-state: paused;
    }
}

@keyframes tb-topbar-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .topbar-responsive .tb-marquee-track {
        animation: none !important;
        transform: none !important;
        flex-wrap: wrap;
        width: 100% !important;
        max-width: 100%;
    }

    .topbar-responsive .tb-marquee-group[aria-hidden="true"] {
        display: none !important;
    }

    .topbar-responsive .tb-marquee-viewport {
        mask-image: none;
        -webkit-mask-image: none;
    }
}

.topbar-modern .tb-item i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(205, 201, 202, 0.12);
    color: #cdc9ca;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.topbar-modern .tb-social {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-modern .social-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cdc9ca;
    border: 1px solid rgba(205, 201, 202, 0.45);
    background: transparent;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}

.topbar-modern .social-circle:hover {
    background: rgba(205, 201, 202, 0.15);
    color: #fff;
    border-color: rgba(205, 201, 202, 0.7);
    transform: translateY(-1px);
}

/* (tb-hide-sm retirado del HTML: correo visible también en móvil) */

/* --- Navbar interior estilo referencia --- */
.navbar-cardionet {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 4px 24px rgba(4, 2, 5, 0.06);
    /* Refuerzo sticky: visible al hacer scroll por encima del hero y secciones */
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-cardionet .brand-logo-nav {
    max-height: 52px;
    width: auto;
}

/* Marca textual: Cardio + net en una sola línea (misma fila) */
.brand-wordmark {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

/* Marca visible también en móvil (antes se ocultaba en <400px) */
@media (max-width: 399.98px) {
    .brand-wordmark {
        font-size: 0.92em;
    }

    .brand-w-cardio,
    .brand-w-net {
        font-size: 1.15rem;
    }
}

.brand-w-cardio {
    font-size: 1.38rem;
    color: var(--brand-black);
}

/* “net” en cyan corporativo, sin recuadro */
.brand-w-net {
    font-size: 1.38rem;
    margin-left: 0.06em;
    color: var(--brand-cyan, #009ec5);
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.nav-cardionet-inner {
    background: transparent;
    border-radius: 0;
    padding: 0;
    gap: 0.15rem;
    border: none;
    box-shadow: none;
}

@media (min-width: 992px) {
    .nav-cardionet-inner {
        padding: 0;
    }
}

.navbar-cardionet .navbar-nav .nav-link {
    margin-left: 0 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #4a4d55 !important;
    transition: color 0.2s ease;
    background: transparent !important;
}

.navbar-cardionet .navbar-nav .nav-link:hover {
    color: var(--brand-cyan) !important;
    background: transparent !important;
}

/* Activo: solo texto cyan (sección actual); fondo del ítem sin tinte */
.navbar-cardionet .navbar-nav .nav-link.active {
    color: var(--brand-cyan) !important;
    background: transparent !important;
    box-shadow: none;
}

.navbar-cardionet .dropdown-menu {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 12px 40px rgba(4, 2, 5, 0.12);
    padding: 0.5rem;
}

.navbar-cardionet .dropdown-item {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.navbar-cardionet .dropdown-item:hover,
.navbar-cardionet .dropdown-item:focus {
    background: rgba(0, 158, 197, 0.08);
    color: var(--brand-cyan);
}

.navbar-cardionet .dropdown-item.active,
.navbar-cardionet .dropdown-item:active {
    background: transparent !important;
    color: var(--brand-cyan) !important;
    font-weight: 700;
}

.navbar-cardionet .btn-cta-nav {
    font-weight: 700;
    padding: 0.35rem 1rem;
    line-height: 1.35;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 158, 197, 0.3);
    font-size: 0.8125rem;
}

.navbar-cardionet .btn-cta-nav i {
    font-size: 0.9rem;
}

/* --- Hero: imagen full cover, sin recortes “feos” --- */
.hero-home {
    position: relative;
    margin-bottom: 0;
    /* Franja bajo la tarjeta de stats: blanco para alinear con “Diagnósticos precisos…” (.hero-stats sigue con --home-section-band) */
    background-color: #ffffff;
    padding-bottom: 3rem;
}

.hero-slide {
    position: relative;
    min-height: clamp(420px, 78vh, 720px);
    overflow: hidden;
    background: var(--brand-black);
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Encuadre tipo referencia: equipo / manos en corazón visibles en la franja inferior */
    object-position: center 42%;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(4, 2, 5, 0.92) 0%,
        rgba(4, 2, 5, 0.55) 48%,
        rgba(0, 158, 197, 0.35) 100%
    );
    pointer-events: none;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    min-height: clamp(420px, 78vh, 720px);
    display: flex;
    /* flex-start: si el bloque de texto cambiara un poco de alto, no se “re-centra” y salta como con center */
    align-items: flex-start;
    padding-top: clamp(2.25rem, 8vh, 5rem);
    padding-bottom: 3rem;
}

/* Bloque de texto: alturas mínimas moderadas (menos hueco en slides con poco texto; algo de salto puede notarse) */
.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    min-height: min(17rem, 40vh);
}

.hero-copy .hero-lead {
    flex: 0 0 auto;
}

.hero-copy .hero-actions {
    flex-shrink: 0;
}

.hero-badge {
    display: inline-block;
    /* En .hero-copy (flex column) los hijos se estiran al 100% del ancho; la píldora debe ceñirse al texto */
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 158, 197, 0.95);
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: clamp(1.55rem, 3.8vw, 2.45rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    /* ~2–3 líneas: menos banda vacía que reservar 3 líneas fijas en todas las slides */
    min-height: clamp(5.1rem, 13vw, 7.5rem);
}

.hero-title strong {
    font-weight: 800;
    color: #fff;
}

.hero-title .hero-accent {
    color: #009ec5;
    text-shadow: 0 0 24px rgba(0, 158, 197, 0.45);
}

.hero-lead {
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    max-width: 32rem;
    line-height: 1.5;
    color: #fff;
    /* ~2 líneas típicas; menos espacio gris entre lead y botones en slides cortas */
    min-height: clamp(3.35rem, 8.5vw, 5rem);
    text-shadow: 0 1px 2px rgba(4, 2, 5, 0.35);
}

/* Botones hero: misma fila desde sm, tamaño compacto */
.hero-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem !important;
}

@media (max-width: 575.98px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.hero-actions .btn {
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.45rem 1.1rem;
    white-space: nowrap;
}

/* CTAs: principal = cyan corporativo + pulso; secundario = contorno blanco + pulso suave */
@keyframes hero-cta-pulse-primary {
    0%,
    100% {
        box-shadow:
            0 0 0 0 rgba(0, 158, 197, 0.55),
            0 4px 20px rgba(0, 158, 197, 0.35);
    }
    50% {
        box-shadow:
            0 0 0 14px rgba(0, 158, 197, 0),
            0 6px 26px rgba(0, 100, 130, 0.3);
    }
}

@keyframes hero-cta-pulse-outline {
    0%,
    100% {
        box-shadow:
            0 0 0 0 rgba(255, 255, 255, 0.45),
            0 4px 18px rgba(4, 2, 5, 0.2);
    }
    50% {
        box-shadow:
            0 0 0 12px rgba(255, 255, 255, 0),
            0 6px 22px rgba(4, 2, 5, 0.25);
    }
}

.hero-cta-btn {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(4, 2, 5, 0.2);
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.hero-cta-btn i {
    color: inherit;
}

.hero-cta-btn--primary {
    --hero-cta-cyan: var(--brand-cyan, #009ec5);
    --hero-cta-cyan-dark: var(--primary-dark, #007a99);
    background: var(--hero-cta-cyan) !important;
    border: 2px solid var(--hero-cta-cyan) !important;
    animation: hero-cta-pulse-primary 2.4s ease-in-out infinite;
}

.hero-cta-btn--secondary {
    --hero-cta-border: rgba(255, 255, 255, 0.95);
    background: rgba(4, 2, 5, 0.12) !important;
    border: 2px solid var(--hero-cta-border) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: hero-cta-pulse-outline 2.4s ease-in-out infinite;
}

.hero-cta-btn--primary:hover,
.hero-cta-btn--primary:focus-visible {
    color: #fff !important;
    background: var(--hero-cta-cyan-dark, #007a99) !important;
    border-color: var(--hero-cta-cyan-dark, #007a99) !important;
    text-shadow: none;
    animation: none;
    box-shadow: 0 8px 28px rgba(0, 100, 130, 0.35) !important;
}

.hero-cta-btn--secondary:hover,
.hero-cta-btn--secondary:focus-visible {
    color: var(--brand-black) !important;
    background: #fff !important;
    border-color: #fff !important;
    text-shadow: none;
    animation: none;
    box-shadow: 0 8px 28px rgba(4, 2, 5, 0.18) !important;
}

.hero-cta-btn--primary:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.hero-cta-btn--secondary:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .hero-cta-btn--primary,
    .hero-cta-btn--secondary {
        animation: none !important;
    }
}

/* Hero estático: altura mínima de la franja (antes carousel-inner) */
.hero-home .hero-static {
    min-height: clamp(420px, 78vh, 720px);
}

/* Sin carrusel: no hace falta reservar alturas para alinear slides; el texto gana altura natural */
.hero-copy.hero-copy--static {
    min-height: 0;
}

.hero-copy.hero-copy--static .hero-title {
    min-height: 0;
}

.hero-copy.hero-copy--static .hero-lead {
    min-height: 0;
}

/* Iconos PNG sección “Cuidamos tu vida” → tono cyan corporativo */
.about-feature-icons .feature-box img {
    filter: brightness(0) saturate(100%) invert(55%) sepia(65%) saturate(1800%) hue-rotate(158deg) brightness(0.92) contrast(1.05);
}

/* Franja de estadísticas: ~mitad sobre el hero y mitad debajo (borde en el centro de la tarjeta) */
.hero-stats-wrap {
    position: relative;
    z-index: 5;
    /* Menos tirón hacia arriba que antes: la caja “baja” y queda partida en el límite imagen / contenido */
    margin-top: clamp(-3.75rem, -5vw, -3rem);
    margin-bottom: 0;
    /* Más compacta en horizontal: no a todo el ancho del .container */
    max-width: min(40rem, calc(100% - 1.25rem));
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    background: var(--home-section-band);
    border-radius: 1.25rem;
    /* Sombra un poco más marcada para que la tarjeta se distinga del mismo tono de fondo */
    box-shadow: 0 14px 40px rgba(4, 2, 5, 0.08), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.hero-stats .row > [class*="col-"] {
    text-align: center;
    padding-left: clamp(0.4rem, 2.5vw, 0.85rem);
    padding-right: clamp(0.4rem, 2.5vw, 0.85rem);
}

.hero-stat-num {
    font-size: clamp(1.45rem, 3.2vw, 2rem);
    font-weight: 800;
    color: rgb(4, 2, 5);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* Solo el carácter + en cyan corporativo (20+ y 250K+) */
.hero-stat-num .hero-stat-suffix,
.hero-stat-num .js-hero-counter .hero-stat-suffix {
    color: rgb(0, 158, 197) !important;
    font-weight: 800;
}

.hero-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
    margin-top: 0.35rem;
    display: block;
}

@media (min-width: 768px) {
    .hero-stats .border-end-md {
        border-right: 1px solid rgba(0, 0, 0, 0.06);
    }
}

@media (max-width: 767.98px) {
    .hero-stats .col-md-4:not(:last-child) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .hero-slide-content {
        padding-bottom: 4rem;
    }

    .hero-stats-wrap {
        margin-top: clamp(-3rem, -6vw, -2.25rem);
    }
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-black) 0%, #009ec5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Bloque “Diagnósticos precisos…” — fondo blanco (tarjetas usan .feature-pill global) */
.section-diagnostico-dark {
    background: #fff;
    color: var(--brand-black);
}

/* “que salvan vidas” en cyan sólido (sin degradado) */
.diagnostico-salvan-vidas {
    color: var(--brand-cyan, #009ec5);
    font-weight: 800;
}

.features-visual-banner {
    background: var(--brand-cyan, #009ec5);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

/* CTA al pie de la sección (sobre fondo blanco) */
.section-cta-strip--in-dark {
    border: 1px solid rgba(4, 2, 5, 0.06);
    box-shadow: 0 12px 40px rgba(4, 2, 5, 0.1);
}

/* --- About: imagen con proporción estable --- */
.about-photo-wrap {
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(4, 2, 5, 0.12);
}

.about-badge-years {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(4, 2, 5, 0.15);
}

/* --- Features: iconos en círculo uniforme (Font Awesome) --- */
.feature-pill {
    background: #fff;
    border: 1px solid rgba(4, 2, 5, 0.06);
    border-radius: 1.15rem;
    padding: 1.5rem 1rem;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 8px 28px rgba(4, 2, 5, 0.05);
}

.feature-pill:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(4, 2, 5, 0.1);
    border-color: rgba(0, 158, 197, 0.25);
}

.feature-pill-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(0, 158, 197, 0.12), rgba(205, 201, 202, 0.25));
    color: var(--brand-cyan);
    font-size: 1.35rem;
}

.feature-pill h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--brand-black);
}

/* Imagen lateral features */
.features-visual-card {
    border-radius: 1.25rem;
    overflow: hidden;
    min-height: 380px;
    position: relative;
    box-shadow: 0 20px 50px rgba(4, 2, 5, 0.12);
    background: #e9ecef;
}

.features-visual-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* CTA intermedia */
.section-cta-strip {
    background: linear-gradient(135deg, var(--brand-black) 0%, #0a1628 40%, var(--brand-cyan) 100%);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    color: #fff;
    box-shadow: 0 16px 48px rgba(4, 2, 5, 0.15);
}

/* Equipo: fotos uniformes, sin recortes raros */
.team-card-modern {
    border-radius: 1.15rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 36px rgba(4, 2, 5, 0.08);
    transition: transform 0.25s, box-shadow 0.25s;
}

.team-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(4, 2, 5, 0.12);
}

.team-card-modern .team-img-wrap {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #e9ecef;
}

.team-card-modern .team-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.team-card-modern .team-body {
    padding: 1.25rem 1rem 1.5rem;
    text-align: center;
}

.team-card-modern .team-body h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.team-card-modern .team-body span {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Tooltip: comentario que aparece al pasar el cursor sobre la foto */
.team-card-modern .team-img-wrap {
    position: relative;
}

.team-card-modern .team-tooltip {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(4, 2, 5, 0.72) 0%, rgba(4, 2, 5, 0.92) 100%);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.55;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
    cursor: pointer;
}

.team-card-modern .team-tooltip::-webkit-scrollbar {
    width: 5px;
}

.team-card-modern .team-tooltip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
}

.team-card-modern .team-tooltip strong {
    display: block;
    font-size: 0.85rem;
    color: #6ed7ee;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.team-card-modern .team-tooltip p {
    margin: 0;
}

.team-card-modern .team-tooltip--center {
    align-items: center;
    text-align: center;
}

.team-card-modern .team-tooltip--center p {
    width: 100%;
}

.team-card-modern:hover .team-tooltip {
    opacity: 1;
    visibility: visible;
}

/* --- Bloque Quiénes somos (about) --- */
.section-title {
    font-size: clamp(1.65rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.3;
    text-align: left;
    color: var(--brand-black);
    margin-bottom: 1.5rem;
    position: relative;
}

.section-title-accent {
    color: var(--brand-cyan, #009ec5);
    font-weight: inherit;
}

.section-title::after {
    content: "";
    display: block;
    width: 120px;
    height: 5px;
    background: #009ec5;
    border-radius: 3px;
    margin-top: 12px;
}

.info-subtitle {
    font-size: 1.1rem;
    color: #009ec5;
    font-weight: 600;
    margin-bottom: 2rem;
}

.feature-box {
    background: #fff;
    border-radius: 12px;
    padding: 1.15rem 1.25rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 3.75rem;
    transition: all 0.3s ease-in-out;
    border: 1px solid rgba(4, 2, 5, 0.06);
}

.feature-box img {
    width: 42px;
    height: 42px;
    margin-right: 15px;
    object-fit: contain;
}

.feature-box h5 {
    margin: 0;
    font-weight: 600;
    color: var(--brand-black);
    font-size: 0.95rem;
}

.feature-box:hover {
    background: #fff;
    box-shadow: 0 10px 28px rgba(4, 2, 5, 0.1);
    transform: translateY(-3px);
    border-color: rgba(0, 158, 197, 0.2);
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #3a3a40;
    background: #fff;
    border: 1px solid rgba(4, 2, 5, 0.06);
    padding: 1.5rem 1.8rem;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(4, 2, 5, 0.06);
    transition: transform 0.3s ease;
}

.about-text:hover {
    transform: translateY(-3px);
}

/* “Cardionet” en caja de texto: misma caja óptica que el párrafo */
.about-text .about-brand-name {
    font-weight: 700;
    color: var(--brand-black);
    font-size: inherit;
    line-height: inherit;
    letter-spacing: normal;
}

.about-text .about-brand-cardio {
    font-size: 1em;
    font-weight: 700;
    color: var(--brand-black);
}

.about-text .about-brand-net {
    font-size: 1em;
    font-weight: 700;
    color: var(--brand-cyan, #009ec5);
}

.about-text .about-service-term {
    color: var(--brand-cyan, #009ec5);
    font-weight: 700;
}

.about-text strong {
    color: var(--brand-black);
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .about-photo-wrap {
        min-height: 280px !important;
    }
}

/* Insignia 20 años: esquina superior izquierda, compacta en móvil */
.about-badge-years {
    z-index: 2;
    margin: 0.65rem 0 0 0.65rem !important;
    max-width: min(11rem, calc(100% - 1.25rem));
}

.about-badge-years-inner {
    min-width: 5.5rem;
}

.about-badge-years-num {
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    font-variant-numeric: tabular-nums;
}

.about-badge-years-line {
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.about-badge-years-sub {
    font-size: 0.65rem;
    line-height: 1.2;
}

@media (max-width: 575.98px) {
    .about-badge-years {
        margin: 0.5rem 0 0 0.5rem !important;
        max-width: min(9.5rem, calc(100% - 1rem));
    }

    .about-badge-years-inner {
        padding: 0.5rem 0.65rem !important;
        min-width: 0;
    }

    .about-badge-years-num {
        font-size: 1.5rem;
    }
}

/* About: imagen y texto alineados en altura (desktop); foto con cover estable */
.about-photo-frame {
    min-height: min(480px, 70vh);
}

.about-photo-img {
    object-fit: cover;
    object-position: center;
}

@media (min-width: 992px) {
    .about-section-row.align-items-lg-stretch {
        align-items: stretch !important;
    }

    .about-photo-col {
        display: flex;
        flex-direction: column;
    }

    .about-photo-col .about-photo-frame {
        flex: 1 1 auto;
        min-height: 100%;
    }

    .about-text-stack {
        justify-content: space-between;
        gap: 0;
    }
}

/* Appointment / beneficios (home) */
.mark-soft {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.05em 0.35em;
    border-radius: 0.5rem;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.benefit-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

.icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 0.75rem;
}

.icon-wrap i {
    font-size: 26px;
    color: #fff;
}

/* ========== Navbar y layout: móvil / tablet (sin conflictos con plantilla antigua) ========== */
html {
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 991.98px) {
    .navbar-cardionet .navbar-brand {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 3.25rem);
    }

    .navbar-cardionet .nav-cardionet-inner {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 0.35rem 0;
        flex-wrap: wrap;
        row-gap: 0.2rem;
        box-sizing: border-box;
    }

    /* Menú desplegable: sin “caja” blanca ni sombra; integrado al fondo del navbar */
    .navbar-cardionet .navbar-collapse {
        max-height: min(85vh, 34rem);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        background: transparent;
        box-shadow: none;
        border: none;
        padding-top: 0.25rem;
    }

    .navbar-cardionet .navbar-nav {
        width: 100%;
    }

    .navbar-cardionet .navbar-nav .nav-link,
    .navbar-cardionet .navbar-nav .dropdown-toggle {
        width: 100%;
        text-align: left;
        border-radius: 0.75rem !important;
        white-space: normal;
        box-sizing: border-box;
    }

    .navbar-cardionet .nav-item.dropdown {
        width: 100%;
    }

    .navbar-cardionet .dropdown-menu {
        width: 100%;
        min-width: 0;
        margin-top: 0.15rem !important;
        position: static !important;
        transform: none !important;
        float: none;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 0 0 0.65rem !important;
    }

    .navbar-cardionet .dropdown-item {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        border-radius: 0.5rem;
        border-left: 3px solid transparent;
    }

    .navbar-cardionet .dropdown-item:hover,
    .navbar-cardionet .dropdown-item:focus {
        border-left-color: var(--brand-cyan, #009ec5);
        background: rgba(0, 158, 197, 0.06) !important;
    }

    .navbar-cardionet .d-flex.ms-lg-3 {
        width: 100%;
        margin-left: 0 !important;
    }

    .navbar-cardionet .btn-cta-nav {
        width: 100%;
        justify-content: center;
    }
}

/* Hero y contenido: menos altura mínima forzada en pantallas muy bajas */
@media (max-width: 575.98px) {
    /* Evita bloque demasiado alto + imagen “gigante”; ratio más contenido */
    .hero-slide {
        min-height: min(52vh, 420px);
        max-height: 78vh;
    }

    .hero-slide-content {
        min-height: min(52vh, 420px);
        max-height: 78vh;
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
        padding-top: clamp(1.25rem, 5vh, 3rem);
        padding-bottom: 2rem;
        box-sizing: border-box;
    }

    .hero-home .hero-static {
        min-height: min(52vh, 420px);
        max-height: 78vh;
    }

    .hero-slide-bg {
        object-fit: cover;
        object-position: center 38%;
        width: 100%;
        height: 100%;
        max-width: 100%;
    }

    .hero-copy:not(.hero-copy--static) {
        min-height: min(17rem, 44vh);
    }

    .hero-copy:not(.hero-copy--static) .hero-lead {
        min-height: clamp(4rem, 22vw, 5.75rem);
    }

    .hero-copy:not(.hero-copy--static) .hero-title {
        min-height: clamp(6.75rem, 40vw, 9.5rem);
    }

    .hero-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .hero-actions .btn {
        white-space: normal;
        text-align: center;
        justify-content: center;
    }

    .section-cta-strip {
        padding: 1.5rem 1.15rem;
        border-radius: 1rem;
    }

    .container-xxl.py-5 > .container {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }
}

/* --- About + Servicios especializados: misma franja de fondo --- */
.section-about-home,
.section-servicios-especializados {
    background: var(--home-section-band);
}

/* --- Servicios especializados (reemplaza bloque antiguo “Nuestros Servicios”) --- */

.servicios-especializados-title {
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 800;
    color: var(--brand-black);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.servicios-especializados-title::after,
.equipo-medico-title::after {
    content: "";
    display: block;
    width: 3.5rem;
    height: 4px;
    background: var(--brand-cyan, #009ec5);
    border-radius: 2px;
    margin: 0.85rem auto 0;
}

.servicios-especializados-lead {
    font-size: 1.02rem;
    line-height: 1.65;
}

.servicio-card {
    background: #fff;
    border-radius: 14px;
    padding: 2rem 1.75rem;
    box-shadow: 0 8px 28px rgba(4, 2, 5, 0.06);
    border: 1px solid rgba(4, 2, 5, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    text-align: center;
}

.servicio-card:hover {
    box-shadow: 0 14px 40px rgba(4, 2, 5, 0.1);
    transform: translateY(-3px);
}

.servicio-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 158, 197, 0.12);
    color: var(--brand-cyan, #009ec5);
    font-size: 1.2rem;
    margin: 0 auto 1.2rem;
}

.servicio-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-black);
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.servicio-card-text {
    font-size: 0.92rem;
    color: #5c5f66;
    margin: 0;
    line-height: 1.55;
}

/* Home (index): contiene desbordes sin poner overflow-x en body (respeta sticky del navbar) */
.site-home .topbar-modern,
.site-home .navbar-cardionet,
.site-home .hero-home {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
}

.site-home .tb-contact-marquee,
.site-home .hero-actions {
    min-width: 0;
}
