/* ===========================
   VARIABLES CSS
=========================== */
:root {
    --color-bg-primary:    #0b1a24;
    --color-bg-secondary:  #0f2530;
    --color-text-primary:  #f5e9d5;
    --color-text-secondary:#d8cfc2;
    --color-teal:          #1a5f7a;
    --color-purple:        #6a2fa0;
    --transition-ease:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===========================
   RESET Y ESTILOS BASE
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===========================
   ANIMACIÓN FLOATBREATH
=========================== */
@keyframes floatBreath {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.04);
        filter: brightness(1.03);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===========================
   BASE: MÓVIL PEQUEÑO (<480px)
   - Mobile First: Todo optimizado para móvil
=========================== */

html {
    overflow-x: clip;
}

body {
    font-family: "Georgia", serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    overflow-x: clip;
}

/* ===========================
   PREHEADER - MÓVIL PEQUEÑO
   Centrado, columna, solo teléfono y dirección
=========================== */
.site-header {
    position: relative;
}

.preheader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 12px;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(1px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1rem; /* AJUSTE: Tamaño texto preheader móvil */
    font-weight: 700;
    color: var(--color-text-primary);
    z-index: 20;
    text-align: center;
}

.preheader-title {
    display: none; /* Oculto en móvil pequeño */
}

.preheader-item {
    font-size: 0.8rem; /* AJUSTE: Tamaño items preheader */
}

.site-header:not(:has([class*="hero-banner"])) .preheader {
    position: relative;
    background: rgba(15, 39, 48, 1);
}

/* ===========================
   HERO - MÓVIL PEQUEÑO
   Cara centrada, texto no tapa cara, CTA above the fold
=========================== */
.hero-banner {
    position: relative;
    width: 100%;
    min-height: 95vh; /* AJUSTE: Altura mínima hero móvil (barras sistema) */
    background-image: url("images/doctorcruces.jpg");
    background-size: cover;
    background-position: center; /* AJUSTE: Posición cara (center = centrada) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 30px 10px 50px; /* AJUSTE: Padding hero móvil */
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 35%,
        rgba(0, 0, 0, 0.72) 70%,
        rgba(0, 0, 0, 0.93) 100%
    );
}

/* Gradient deporte móvil: oscuro hacia abajo para legibilidad del texto */
.hero-banner-deporte .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.6) 75%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

.hero-text {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0px; /* AJUSTE: Espacio entre elementos hero */
    color: var(--color-text-primary);
}

.hero-text h1 {
    font-size: clamp(1.2rem, 4vw, 3.8rem);
    line-height: 1.1;
    font-weight: 700;
}

.hero-description {
    /* AJUSTE: Tamaño descripción móvil */
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    margin: 2px 5px 18px;
    text-align: left;
    line-height: 1.4rem;
}

.cta-button {
    background-color: var(--color-bg-secondary);
    border-radius: 6px;
    padding: 14px 40px; /* AJUSTE: Padding botón móvil */
    text-decoration: none;
    color: #ffffff;
    text-align: center;
    font-size: 1rem; /* AJUSTE: Tamaño texto botón móvil */
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    margin-top: 12px; /* AJUSTE: Margen superior botón */
    display: inline-block;
}

.cta-button.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    background-color: var(--color-teal);
}
/* ===========================
   ANCLAS - MÓVIL PEQUEÑO
   2 columnas, font-size reducido
=========================== */

.menu-navegacion {
    width: 100%;
    max-width: 900px;
}

.menu-navegacion h2 {
    color: var(--color-text-primary);
    font-size: 1.5rem; /* AJUSTE: Tamaño título menú anclas móvil */
    font-weight: bold;
    margin-bottom: 2rem; /* AJUSTE: Margen inferior título menú anclas móvil */
    text-align: center; /* AJUSTE: Centrar título menú anclas móvil */
}
.anclas-section {
    position: relative;
    width: 100%;
    padding: 50px 15px; /* AJUSTE: Padding sección anclas móvil */
    display: flex;
    justify-content: center;
}

.anclas-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

.ancla-card {
    background-color: var(--color-bg-secondary);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    border-radius: 8px;
    border-left: 3px solid var(--color-teal);
    padding: 18px 20px;
    min-height: 64px;
    text-decoration: none;
    color: var(--color-text-primary);
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 0.6s ease-out,
        transform 0.32s ease-out,
        box-shadow 0.32s ease-out,
        background-color 0.2s ease-out;
}

.ancla-card::after {
    content: "›";
    margin-left: auto;
    font-size: 1.5rem;
    color: var(--color-teal);
    line-height: 1;
}

.ancla-card-icon {
    font-size: 1.2rem;
    color: var(--color-teal);
    min-width: 22px;
    text-align: center;
}

.ancla-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.ancla-card:nth-child(1).visible {
    transition-delay: 0.05s;
}
.ancla-card:nth-child(2).visible {
    transition-delay: 0.1s;
}
.ancla-card:nth-child(3).visible {
    transition-delay: 0.15s;
}
.ancla-card:nth-child(4).visible {
    transition-delay: 0.2s;
}
.ancla-card:nth-child(5).visible {
    transition-delay: 0.25s;
}
.ancla-card:nth-child(6).visible {
    transition-delay: 0.3s;
}

.ancla-card:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
    background-color: #163544;
}

.cta-card {
    background-color: var(--color-purple);
}

.cta-card:hover {
    background-color: #163544;
}

.card-title {
    display: block;
}

.card p {
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    grid-column: 2;
}

/* ===========================
   SERVICIOS, TRATAMIENTO- MÓVIL PEQUEÑO
   2 columnas, font-size reducido
=========================== */

.section {
    padding: 25px 15px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.section-header {
    margin-bottom: 30px;
    justify-content: center;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: auto;
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.card {
    background-color: rgba(255, 255, 255, 0.04);
    padding: 10px 12px;
    border-radius: 10px;
    border-left: 3px solid var(--color-teal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    filter: blur(6px);
    transition:
        opacity 0.8s var(--transition-ease),
        transform 0.8s var(--transition-ease),
        filter 0.8s var(--transition-ease);
    display: grid;
    grid-template-columns: 26px 1fr;
    column-gap: 10px;
    row-gap: 3px;
    align-items: start;
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
}

a.card::after {
    content: "Saber más ›";
    grid-column: 2;
    justify-self: end;
    align-self: end;
    margin-top: 2px;
    font-size: 0.7rem;
    color: #a0c4d8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    background-color: rgba(26, 95, 122, 0.3);
}

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

.card-icon {
    font-size: 1.2rem;
    color: var(--color-teal);
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
}

.card-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-text-secondary);
    margin-bottom: 0;
    line-height: 1.3;
    grid-column: 2;
}

.servicio-subtitle {
    font-size: 0.95rem; /* AJUSTE: Tamaño subtítulo servicios móvil */
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 65ch;
    margin: 0 auto;
}

.servicios-lista {
    list-style: none;
    padding: 0;
    margin: 0 auto 20px;
    max-width: 65ch;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.servicios-lista li {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    padding: 12px 16px 12px 20px;
    border-left: 3px solid var(--color-teal);
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.servicios-lista li:nth-child(odd) {
    transform: translateX(-80px);
}

.servicios-lista li:nth-child(even) {
    transform: translateX(80px);
}

.servicios-lista li.visible {
    opacity: 1;
    transform: translateX(0);
}

.servicios-lista li:nth-child(1).visible { transition-delay: 0.05s; }
.servicios-lista li:nth-child(2).visible { transition-delay: 0.2s; }
.servicios-lista li:nth-child(3).visible { transition-delay: 0.35s; }
.servicios-lista li:nth-child(4).visible { transition-delay: 0.5s; }

.card.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.card:nth-child(1).visible {
    transition-delay: 0.05s;
}
.card:nth-child(2).visible {
    transition-delay: 0.1s;
}
.card:nth-child(3).visible {
    transition-delay: 0.15s;
}
.card:nth-child(4).visible {
    transition-delay: 0.2s;
}
.card:nth-child(5).visible {
    transition-delay: 0.25s;
}
.card:nth-child(6).visible {
    transition-delay: 0.3s;
}

.card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    background-color: rgba(26, 95, 122, 0.3);
}

.cta-servicios {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px auto 20px;
    background-color: #165167;
    color: #ffffff;
    padding: 16px 40px; /* AJUSTE: Padding CTA servicios móvil */
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem; /* AJUSTE: Tamaño CTA servicios móvil */
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s var(--transition-ease);
    max-width: 260px;
}

.cta-servicios.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-servicios:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
    background-color: #2a7f9a;
}

.volver-wrapper {
    text-align: center;
    margin-top: 25px;
}

.volver-enlace {
    display: inline-block;
    margin: 10px 8px;
    color: var(--color-teal);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.volver-enlace:hover {
    color: #2a7f9a;
}

/* ===========================
   TARJETAS SECCIONES LEGALES
=========================== */
.legal-card {
    background-color: rgba(255, 255, 255, 0.04);
    padding: 28px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--color-teal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(6px);
    transition:
        opacity 0.8s var(--transition-ease),
        transform 0.8s var(--transition-ease),
        filter 0.8s var(--transition-ease);
    display: flex;
    flex-direction: column;
}

/* Breadcrumb en esquina inferior derecha de cada card de especialidad */
.legal-card .breadcrumb {
    order: 99;
    align-self: flex-end;
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 1rem;
}

.legal-card.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.legal-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    background-color: rgba(26, 95, 122, 0.2);
}

.legal-card-header {
    margin-bottom: 16px;
    border-bottom: 2px solid rgba(26, 95, 122, 0.3);
    padding-bottom: 12px;
    text-align: center;
}

.legal-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    letter-spacing: 0.5px;
    scroll-margin-top: 150px;
}

.legal-card p {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
    text-align: left;
}

.legal-card strong {
    color: var(--color-text-primary);
}

/* BREADCRUMBS */
.breadcrumb {
    margin-bottom: 14px;
}
.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 6px;
    font-size: 0.95rem;
    line-height: 1;
}
.breadcrumb li {
    display: flex;
    align-items: center;
    line-height: 1;
}
.breadcrumb li + li::before {
    content: "›";
    margin-right: 6px;
    color: #b7e3f1;
    font-weight: 900;
    font-size: 1.2rem;
    line-height: 1;
}
.breadcrumb a {
    color: #b7e3f1;
    text-decoration: underline;
    font-weight: bold;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.breadcrumb a:hover {
    color: #ffffff;
}
.breadcrumb li:last-child {
    color: var(--color-text-secondary);
    opacity: 0.8;
}

/* Breadcrumb al final de bloque trayectoria */
.trayectoria-item .breadcrumb {
    margin-top: 20px;
    margin-bottom: 0;
}

/* Breadcrumb inferior de navegación */
.breadcrumb--bottom {
    margin: 30px 20px 10px;
}

/* Breadcrumb en cards de especialidades: móvil */
@media (max-width: 767px) {
    .legal-card .breadcrumb ol {
        font-size: 1rem;
        gap: 0 8px;
    }
    .legal-card .breadcrumb li + li::before {
        font-size: 1rem;
        margin-right: 4px;
    }
    .legal-card .breadcrumb li:not(:last-child) {
        white-space: nowrap;
    }
}


.volver-enlace {
    display: inline-block;
    color: var(--color-text-primary);
    font-size: 1.2em; /* AJUSTE: Tamaño enlace volver móvil */
    font-weight: 400;
    text-decoration: none;
    transition: color 0.3s ease;
}

.volver-enlace:hover {
    color: #2a7f9a;
}

/* ================================
TRAYECTORIA MOVIL PEQUEÑO

=============================== */
.trayectoria-section {
    padding: 30px 15px;
    max-width: 100%;
    margin: auto;
}

.trayectoria-grid-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.trayectoria-content {
    z-index: 2;
}

.trayectoria-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: center;
    color: var(--color-text-primary);
}


.trayectoria-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Tarjetas */
.trayectoria-item {
    background-color: rgba(255, 255, 255, 0.04);
    padding: 24px 22px;
    border-radius: 10px;
    border-left: 3px solid var(--color-teal);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(20px);
    filter: blur(6px);
    transition:
        opacity 0.8s var(--transition-ease),
        transform 0.8s var(--transition-ease),
        filter 0.8s var(--transition-ease);
}

.trayectoria-item.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.trayectoria-item:hover {
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.55);
    background-color: rgba(26, 95, 122, 0.2);
}

/* Animación escalonada */
.trayectoria-item:nth-child(1).visible {
    transition-delay: 0.05s;
}
.trayectoria-item:nth-child(2).visible {
    transition-delay: 0.1s;
}
.trayectoria-item:nth-child(3).visible {
    transition-delay: 0.15s;
}
.trayectoria-item:nth-child(4).visible {
    transition-delay: 0.2s;
}
.trayectoria-item:nth-child(5).visible {
    transition-delay: 0.25s;
}
.trayectoria-item:nth-child(6).visible {
    transition-delay: 0.3s;
}

/* Subtítulos */
.trayectoria-subtitle {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-text-primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(26, 95, 122, 0.4);
}

/* Párrafos */
.trayectoria-item p {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    max-width: 72ch;
}

.trayectoria-item p:last-of-type {
    margin-bottom: 0;
}

/* Botón flotante volver arriba */
.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-teal);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}
.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.scroll-top-btn:hover {
    background-color: #2a7f9a;
}

/* Listas */
.trayectoria-item ul {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.trayectoria-item li {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1px;
    padding-left: 15px;
    position: relative;
}

.trayectoria-item li::before {
    position: absolute;
    left: 0;
    color: var(--color-teal);
}

.trayectoria-item li:last-child {
    margin-bottom: 0;
}

/* Enlaces */
.enlace-destacado {
    color: #b7e3f1;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.enlace-destacado:hover {
    opacity: 0.7;
}

/* Orden móvil - imágenes intercaladas entre tarjetas (sólo deporte.html) */
.trayectoria-grid--deporte .trayectoria-item:nth-child(1) {
    order: 1;
}
.trayectoria-grid--deporte .trayectoria-item:nth-child(2) {
    order: 3;
}
.trayectoria-grid--deporte .trayectoria-item:nth-child(3) {
    order: 5;
}
.trayectoria-bg-mobile--medallas {
    order: 4;  /* medallas.jpg - después de tarjeta 2 */
}
.trayectoria-bg-mobile--socorrista {
    order: 2;  /* después de tarjeta 1 */
}
.trayectoria-bg-mobile--pionero {
    order: 6;  /* después de tarjeta 3 */
    aspect-ratio: 4 / 3; /* AJUSTE: más ancho, menos alto que el 3/4 por defecto */
}
.trayectoria-grid--deporte .trayectoria-item:nth-child(4) {
    order: 7;
}
.trayectoria-bg-mobile--bici {
    order: 8;
}
.trayectoria-grid--deporte .trayectoria-item:nth-child(5) {
    order: 9;
}
.trayectoria-bg-mobile--oldman {
    order: 10;  /* oldman.jpg - después de tarjeta 5 */
}
.trayectoria-grid--deporte .trayectoria-item:nth-child(6) {
    order: 11;
}

/* Imagen móvil/tablet - visible por debajo de 900px */
.trayectoria-bg-mobile {
    display: block;
}

.trayectoria-bg-desktop {
    display: none;
}

.trayectoria-bg {
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
    margin: 10px 0;
    overflow: hidden;
}

.trayectoria-bg-inner {
    width: 100%;
    height: 100%;
    background-image: url("images/despacho_recortada.jpg");
    background-size: cover;
    background-position: center 35%;
    border-radius: 10px;
    animation: floatBreath 9s ease-in-out infinite;
}

.trayectoria-bg-inner--deporte {
    background-image: url("images/oldman.jpg");
    background-size: cover;
    background-position: center top; /* AJUSTE móvil: top = cabeza visible */
    border-radius: 15px; /* AJUSTE: redondeo esquinas */
}

.trayectoria-bg-inner--bici {
    background-image: url("images/bici.jpg");
    background-size: cover;
    background-position: center center; /* AJUSTE: posición bici.jpg */
}

.trayectoria-bg-inner--socorrista {
    background-image: url("images/socorrista.jpg");
    background-size: cover;
    background-position: center center; /* AJUSTE: posición socorrista.jpg */
}

.trayectoria-bg-inner--medallas {
    background-image: url("images/medallas.jpg");
    background-size: cover;
    background-position: center center; /* AJUSTE: posición medallas.jpg */
}

.trayectoria-bg-inner--pionero {
    background-image: url("images/pionero.jpg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center; /* AJUSTE: posición pionero.jpg */
}

.trayectoria-bg-inner--drcruces {
    background-image: url("images/drcruces.jpg");
    background-size: cover;
    background-position: center center;
}

.trayectoria-bg-inner--escuchar2 {
    background-image: url("images/escuchar2.jpg");
    background-size: cover;
    background-position: center center;
}

.trayectoria-bg-inner--royal-infirmary {
    background-image: url("images/royal_infirmary.jpg");
    background-size: cover;
    background-position: center center;
}

.trayectoria-bg-inner--libro {
    background-image: url("images/libro.jpg");
    background-size: cover;
    background-position: center center;
    border-radius: 18px;
}

.trayectoria-bg-inner--hospital-vargas {
    background-image: url("images/hospital_vargas_caracas.jpg");
    background-size: cover;
    background-position: center center;
}

.trayectoria-bg-inner--student {
    background-image: url("images/student.jpg");
    background-size: cover;
    background-position: center center;
}

/* Deporte sticky desktop: anclar abajo para ver los pies */
@media (min-width: 900px) {
    .trayectoria-bg-inner--deporte {
        background-position: center bottom; /* AJUSTE desktop: bottom = pies visibles */
    }
}

.trayectoria-bg-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.trayectoria-bg:hover {
    filter: brightness(1.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
}

/* ===========================
   TRAYECTORIA: IMAGEN 500px → 900px
   background-position ajusta qué parte de la imagen queda centrada
   cuando el contenedor se ensancha y recorta más arriba/abajo.
   Modifica el % vertical hasta que la cara quede centrada a ojo.
=========================== */

@media (min-width: 500px) {
    .trayectoria-bg {
        max-height: 420px;
    }
    .trayectoria-bg-inner {
        background-position: center 30%; /* AJUSTE: sube si la cara queda cortada abajo */
    }
    .trayectoria-bg-inner--deporte {
        background-position: center top; /* deporte: cabeza visible */
    }
}

@media (min-width: 650px) {
    .trayectoria-bg {
        max-height: 450px;
    }
    .trayectoria-bg-inner {
        background-position: center 25%; /* AJUSTE: sube si la cara queda cortada abajo */
    }
    .trayectoria-bg-inner--deporte {
        background-position: center top; /* deporte: cabeza visible */
    }
}

@media (min-width: 800px) {
    .trayectoria-bg {
        max-height: 480px;
    }
    .trayectoria-bg-inner {
        background-position: center 20%; /* AJUSTE: sube si la cara queda cortada abajo */
    }
    .trayectoria-bg-inner--deporte {
        background-position: center top; /* deporte: cabeza visible */
    }
}

/* ===========================
   LLEGAR-CONTACTO.HTML - MÓVIL PEQUEÑO (<480px)
   Mobile First: Optimizado para móvil pequeño
=========================== */

/* HERO - FOTO CONSULTA TRANSPARENTE */
.hero-banner-medico {
    background-image: url("images/medico_paciente.jpg");
    background-position:  46%   !important; /* AJUSTE móvil: centra al doctor */
}

/* HERO - VIDEO DEPORTE */
.hero-banner-deporte {
    background-image: none;
    background-color: var(--color-bg-secondary);
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    object-position: center;
}

/* Imagen hero móvil: cubre el hero, visible solo en móvil */
.hero-img-mobile {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center; /* AJUSTE: center center muestra figura completa */
    z-index: 0;
    display: block;
}

/* Deporte móvil: texto más pequeño y pegado al fondo */
.hero-banner-deporte {
    padding-bottom: 8px; /* AJUSTE: reduce margen inferior para bajar el texto */
}
.hero-banner-enfermedades .hero-text h1 {
    font-size: 1.3rem; /* AJUSTE: título enfermedades móvil */
}
.hero-banner-deporte .hero-description {
    font-size: 0.8rem; /* AJUSTE: descripción deporte móvil */
    line-height: 1.1rem;
    margin-bottom: 6px;
}

/* Vídeo: oculto en móvil, visible desde 768px */
.hero-video--landscape {
    display: none;
    opacity: 0;
    transition: none;
}

@media (min-width: 768px) {
    .hero-video--landscape {
        display: block;
    }
    .hero-img-mobile {
        display: none;
    }
}

.hero-banner-contacto {
    position: relative;
    width: 100%;
    background-image: url("images/puertacasa.jpg");
    background-size: cover;
    background-position: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 30px 10px 25px;
}

.hero-banner-contacto .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.7) 80%,
        rgba(0, 0, 0, 1) 100% /* asfalto: negro total abajo */
    );
}
/* LEGAL: foto hero (doble clase = mayor especificidad que .hero-banner en media queries) */
.hero-banner.hero-banner-legal {
    background-image: url("images/hero_legal.webp");
    background-position:  80% ;
}

/* LEGAL: overlay oscuro desde abajo en todos los anchos */
.hero-banner-legal .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.6) 75%,
        rgba(0, 0, 0, 1) 100%
    );
}

/* LEGAL: texto centrado abajo en todos los anchos */
.hero-banner-legal .hero-text {
    position: absolute;
    bottom: 50px;
    left: 50%;
    top: auto;
    right: auto;
    transform: translateX(-50%);
    width: 80%;
    max-width: 700px;
    text-align: center;
    align-items: center;
}
.hero-banner-legal .hero-text h1 {
    font-size: 2.5rem; /* AJUSTE: tamaño título legal móvil */
}
.hero-banner-legal .hero-description p {
    font-size: 1.4rem; /* AJUSTE: tamaño descripción legal móvil */
}

.hero-text-contacto .contacto-list {
    list-style: none;
    padding-left: 0;
}

.hero-text-contacto .contacto-list li {
    color: var(--color-text-primary) !important;
    font-size: 1rem;
    margin-bottom: 8px;
}

.hero-text-contacto {
    position: relative;
    z-index: 20;
    text-align: center;
    padding: 0 15px;
}

.hero-text-contacto .title {
    color: var(--color-text-primary) !important;
    font-size: 1.4rem; /* AJUSTE: tamaño h1 hero contacto móvil pequeño */
    margin-bottom: 15px;
}

/* ===========================
   SECCIÓN CÓMO LLEGAR - MÓVIL PEQUEÑO
=========================== */
.como-llegar-section {
    padding: 25px 15px;
    max-width: 100%;
    margin: 0 auto;
}

.como-llegar-header {
    margin-bottom: 25px;
}

.como-llegar-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--color-text-primary);
    text-align: center;
}

.como-llegar-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    text-align: center;
}

/* MAPA */
.mapa-container {
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    position: relative;
}

.mapa-click-overlay {
    display: none;
}

.mapa-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mapa-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

/* desktop: iframe visible, imagen oculta */
@media (min-width: 1024px) {
    .mapa-container {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
        border-radius: 14px;
        border: 2px solid rgba(26, 95, 122, 0.5);
        box-shadow:
            0 0 0 4px rgba(26, 95, 122, 0.15),
            0 12px 36px rgba(0, 0, 0, 0.6);
    }
    .mapa-imagen {
        display: none;
    }
    .mapa-iframe {
        display: block;
    }
    .mapa-click-overlay {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 10;
        cursor: pointer;
    }
    .mapa-direccion-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    .mapa-lado {
        flex: unset;
        width: 100%;
    }
    .mapa-direccion-wrapper .info-card {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 20px;
        max-width: 480px;
        margin: 0 auto;
        padding: 20px 28px;
        opacity: 1;
        transform: none;
        filter: none;
    }
    .mapa-direccion-wrapper .info-icon {
        font-size: 2.4rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .mapa-direccion-wrapper .info-title {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }
    .mapa-direccion-wrapper .info-text {
        font-size: 1.1rem;
    }
    .hero-banner-contacto {
        background-image: url("images/apaisada.png");
        min-height: 600px;
    }
    .hero-banner-contacto .hero-overlay {
        background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 35%,
            rgba(0, 0, 0, 0.55) 65%,
            rgba(0, 0, 0, 0.75) 100%
        );
    }
    .hero-text-contacto {
        position: absolute;
        right: 60px;
        bottom: 40px;
        top: auto;
        transform: none;
        width: 35%;
        text-align: center;
        margin-bottom: 0;
    }
    .hero-text-contacto .title {
        font-size: 2rem;
        padding-bottom: 20px;
    }
    .hero-text-contacto .contacto-list li {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    #transporte .cards-grid,
    #pasos .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 1023px) {
    .mapa-direccion-wrapper {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .mapa-lado {
        width: 100%;
    }
}

.mapa-boton-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.mapa-boton {
    display: inline-block;
    background-color: var(--color-teal);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s;
}

.mapa-boton:hover {
    background-color: #134d63;
}

/* TARJETA DIRECCIÓN */
.info-card {
    background-color: rgba(255, 255, 255, 0.04);
    padding: 20px 16px;
    border-radius: 10px;
    border-left: 3px solid var(--color-teal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(6px);
    transition:
        opacity 0.8s var(--transition-ease),
        transform 0.8s var(--transition-ease),
        filter 0.8s var(--transition-ease);
}

.info-card.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.info-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    background-color: rgba(26, 95, 122, 0.3);
}

.info-icon {
    font-size: 1.8rem;
    color: var(--color-teal);
    margin-bottom: 10px;
}

.info-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.info-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* TRANSPORTE */
.transporte-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-text-primary);
    margin-bottom: 15px;
    text-align: center;
}

.transporte-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.transporte-card {
    background-color: rgba(255, 255, 255, 0.04);
    padding: 18px 14px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(6px);
    transition:
        opacity 0.8s var(--transition-ease),
        transform 0.8s var(--transition-ease),
        filter 0.8s var(--transition-ease);
}

.transporte-card.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.transporte-card:nth-child(1).visible {
    transition-delay: 0.05s;
}
.transporte-card:nth-child(2).visible {
    transition-delay: 0.1s;
}
.transporte-card:nth-child(3).visible {
    transition-delay: 0.15s;
}

.transporte-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    background-color: rgba(75, 31, 117, 0.3);
}

.transporte-icon {
    font-size: 1.6rem;
    color: var(--color-purple);
    margin-bottom: 10px;
}

.transporte-nombre {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.transporte-descripcion {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ===========================
   LLEGAR_CONTACTO — cards en 1 columna hasta 1023px
=========================== */
@media (max-width: 1023px) {
    #transporte .cards-grid,
    #pasos .cards-grid {
        grid-template-columns: 1fr;
    }
}

#pasos .card {
    position: relative;
    padding-top: 12px;
}
#pasos .paso-numero {
    position: absolute;
    top: 4px;
    right: 10px;
    margin: 0;
    width: 30px;
    height: 30px;
    font-size: 1rem;
}
#pasos .card-title,
#pasos .card p {
    grid-column: 1 / -1;
}

/* _____________________________________________________ */

/* ===========================
   PASOS - MÓVIL PEQUEÑO
=========================== */

.paso {
    background-color: rgba(255, 255, 255, 0.04);
    padding: 20px 16px;
    border-radius: 10px;
    border-left: 3px solid var(--color-purple);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(6px);
    transition:
        opacity 0.8s var(--transition-ease),
        transform 0.8s var(--transition-ease),
        filter 0.8s var(--transition-ease);
}

.paso.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.paso:nth-child(1).visible {
    transition-delay: 0.05s;
}
.paso:nth-child(3).visible {
    transition-delay: 0.15s;
}
.paso:nth-child(5).visible {
    transition-delay: 0.25s;
}

.paso:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    background-color: rgba(75, 31, 117, 0.3);
}

.paso-numero {
    width: 40px;
    height: 40px;
    background-color: var(--color-teal);
    color: var(--color-text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 auto 12px;
}

.paso-titulo {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.paso-descripcion {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* CONECTOR ENTRE PASOS */
.paso-conector {
    width: 3px;
    height: 25px;
    background-color: var(--color-text-primary);
    opacity: 0.5;
}
/* ===========================
   FOOTER - MÓVIL PEQUEÑO
=========================== */
footer {
    background-color: var(--color-bg-secondary);
    padding: 35px 15px 20px; /* AJUSTE: Padding footer móvil */
    margin-top: 40px;
}

.footer-container {
    max-width: 100%;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px; /* AJUSTE: Gap footer móvil */
    margin-bottom: 25px;
    text-align: center;
}

.footer-section h3 {
    font-size: 1rem; /* AJUSTE: Tamaño títulos footer móvil */
    margin-bottom: 12px;
    color: var(--color-text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem; /* AJUSTE: Tamaño enlaces footer móvil */
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--color-teal);
}

.footer-redes {
    display: flex;
    justify-content: center;
    gap: 12px; /* AJUSTE: Gap redes footer móvil */
    margin-top: 15px;
}

.footer-redes a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px; /* AJUSTE: Tamaño iconos redes móvil */
    height: 42px;
    background-color: rgba(26, 95, 122, 0.2);
    border-radius: 50%;
    color: var(--color-text-primary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.footer-redes a:hover {
    background-color: var(--color-teal);
    color: var(--color-text-primary);
    transform: scale(1.1);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(245, 233, 213, 0.1);
    text-align: left;
}

.footer-bottom p {
    font-size: 0.8rem; /* AJUSTE: Tamaño texto footer bottom móvil */
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px; /* AJUSTE: gap móvil pequeño */
}

.footer-legal a {
    color: #707070;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--color-text-secondary);
}


/* HERO MÉDICO-PACIENTE base (< 400px) */
.hero-banner-medico .hero-description {
    margin-bottom: 8px;
}
.hero-banner-medico {
    padding-bottom: 10px; /* AJUSTE: baja el texto en móvil pequeño */
}
.hero-banner-medico .hero-text h1 {
    font-size: 2rem; /* AJUSTE: título médico-paciente móvil pequeño */
}
.hero-banner-medico .hero-description p {
    font-size: 1.2rem; /* AJUSTE: descripción médico-paciente móvil pequeño */
}
/* Gradiente médico: oscurece abajo, esquina superior derecha e izquierda */
.hero-banner-medico .hero-overlay {
    background:
        linear-gradient(to bottom,      rgba(0,0,0,0) 0%,  rgba(0,0,0,0) 30%, rgba(0,0,0,0.5) 55%, rgba(0,0,0,1) 100%),
        linear-gradient(to bottom right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 45%),
        linear-gradient(to bottom left,  rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 45%);
}

/*
=======================================000000000000000000000000000000
FIN DE ESTILOS MOVIL MAS PEQUEÑO 320PX
========================================00000000000000000000000000000000 */
/* 
=======================================
Centrado de .footer-bottom en min-width 400px
========================================= */

@media (min-width: 400px) {
    .footer-bottom {
        text-align: center;
    }
    .hero-banner-medico .hero-text {
        width: 90%; /* AJUSTE: anchura texto hero médico-paciente desde 400px */
        max-width: 90%;
    }
    .hero-banner-medico .hero-text h1 {
        font-size: 2rem; /* AJUSTE: título médico-paciente 400px+ */
    }
    .hero-banner-medico .hero-description p {
        font-size: 1.2rem; /* AJUSTE: descripción médico-paciente 400px+ */
    }
}

/* MÓVIL GRANDE (480-599px) */
@media (min-width: 480px) and (max-width: 599px) {
    .hero-banner {
        background-position: center;
    }
}

/* MÓVIL GRANDE Y TABLET PORTRAIT (480-767px) */
@media (min-width: 480px) and (max-width: 767px) {
    /* PREHEADER */
    .preheader {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 50px;
        padding: 20px 30px;
        backdrop-filter: blur(4px);
    }
    .preheader-title {
        font-size: 1.1rem;
    }
    .preheader-item {
        font-size: 1rem;
        white-space: nowrap;
    }
    .site-header:not(:has([class*="hero-banner"])) .preheader {
        position: relative;
        background: rgba(15, 39, 48, 1);
    }

    /* HERO TEXT */
    .hero-text {
        position: absolute;
        display: flex;
        top: auto;
        bottom: 10px; /* AJUSTE: distancia desde el borde inferior del hero */
        left: 50%;
        transform: translateX(-50%);
        width: 90%; /* AJUSTE: anchura del bloque de texto */
        max-width: 100%;
        text-align: center;
        align-items: center;
        z-index: 20;
        overflow: visible;
        font-size: 0.95rem; /* AJUSTE: tamaño texto hero móvil grande */
    }

    .hero-banner-medico .hero-text {
        bottom: 14px; /* AJUSTE: baja texto médico-paciente en móvil */
    }

    /* HERO CONTACTO 480-767px */
    .hero-banner-contacto {
        min-height: 520px;
    }
    .hero-banner-contacto .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 55%,
            rgba(0, 0, 0, 0.7) 80%,
            rgba(0, 0, 0, 1) 100%
        );
    }
    .hero-text-contacto {
        margin-bottom: -20px;
    }
    .hero-text-contacto .title {
        font-size: 1.6rem;
        padding-bottom: 4px;
    }
    .hero-text-contacto .contacto-list li {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    /* ANCLAS Y CARDS */
    .ancla-card {
        padding: 20px 22px;
    }
    .card-title {
        font-size: 1.2rem;
    }

    /* LLEGAR_CONTACTO: tamaños legibles 480-767px */
    .section-title {
        font-size: 1.8rem;
    }
    .card p {
        font-size: 0.9rem;
    }
    .como-llegar-title {
        font-size: 1.8rem;
    }
    .como-llegar-subtitle {
        font-size: 1.1rem;
    }
    .volver-enlace {
        font-size: 1.1rem;
    }
    .mapa-boton {
        font-size: 1.1rem;
        padding: 16px 32px;
    }
    .info-title {
        font-size: 1.3rem;
    }
    .info-text {
        font-size: 1.1rem;
    }

    .footer-bottom {
        text-align: center;
    }

}

/* TABLET PEQUEÑA (600-767px) - XIAOMI AQUÍ */

@media (min-width: 600px) and (max-width: 767px) {
    .hero-banner {
        background-position: center;
    }

    /* PREHEADER: sin título, items en fila */
    .preheader {
        flex-direction: row;
        justify-content: space-around;
        padding: 10px 20px;
    }
    .preheader-title {
        display: none;
    }
    .preheader-item {
        font-size: 1.1rem;
        white-space: nowrap;
    }

    /* HERO MÉDICO-PACIENTE: texto más grande hasta 767px */
    .hero-banner-medico .hero-text h1 {
        font-size: 2.4rem; /* AJUSTE: título médico-paciente móvil */
        line-height: 1.25;
    }
    .hero-banner-medico .hero-description p {
        font-size: 1.5rem; /* AJUSTE: descripción médico-paciente móvil */
    }

    /* HERO CONTACTO 600-767px */
    .hero-banner-contacto {
        min-height: unset;
        aspect-ratio: 1204/1600;
        background-size: 100% auto;
        background-position: top center;
        justify-content: flex-end;
        padding-bottom: 30px;
    }
    .hero-banner-contacto .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 55%,
            rgba(0, 0, 0, 0.7) 80%,
            rgba(0, 0, 0, 1) 100%
        );
    }
    .hero-text-contacto {
        margin-bottom: 0;
    }
    .hero-text-contacto .title {
        font-size: 1.5rem;
        padding-bottom: 6px;
    }
    .hero-text-contacto .contacto-list li {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .legal-card p {
        font-size: 1.05rem;
    }
} /* ← cierre del bloque 600-767px */


/* ===========================
   RESPONSIVE solo para HERO: PANTALLAS ANCHAS desde tablet 768 hasta
    comienzo de pantalla de portatil: 1020px
   Estilos COMPARTIDOS: grids, trayectoria, secciones
   Aplica a portátil Y desktop
   =========================== */

@media (min-width: 768px) and (max-width: 1020px) {
    .preheader {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 25px 20px;
    }
    .preheader-title {
        display: block;
        font-size: 1rem;
    }
    .preheader-item {
        font-size: 0.8rem;
    }

    .hero-banner {
        position: relative;
        width: 100%;
        min-height: 100vh;
        background-image: url("images/doctorcruces.jpg");
        background-size: cover;
        background-position: center; /* AJUSTE: Posición cara (center = centrada) */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        padding: 30px 10px 25px;
    }

    .hero-banner-medico {
        background-image: url("images/medico_paciente.jpg");
    }
    .hero-banner-medico .hero-text h1 {
        font-size: 2.5rem; /* AJUSTE: título médico-paciente 768px */
    }
    .hero-banner-medico .hero-description p {
        font-size: 1.4rem; /* AJUSTE: descripción médico-paciente 768px */
    }

    .hero-banner-deporte {
        background-image: none;
    }

    .hero-text {
        position: absolute;
        bottom: 5px; /* AJUSTE: distancia desde el borde inferior del hero */
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        z-index: 20;
        color: var(--color-text-primary);
    }

    .cta-button {
        opacity: 1;
        transform: translateY(0);
        padding: 20px 100px; /* AJUSTE: Padding botón tablet */
        font-size: 1.3rem; /* AJUSTE: Tamaño texto botón tablet */
    }

    .hero-description {
        font-size: 1.5rem;
        line-height: 2.3rem;
    }

    /* HERO CONTACTO 768-1020px */
    .hero-banner-contacto {
        min-height: 500px;
    }
    .hero-banner-contacto .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 58%,
            rgba(0, 0, 0, 0.85) 78%,
            rgba(0, 0, 0, 1) 100%
        );
    }
    .hero-text-contacto {
        margin-bottom: 5px;
    }
    .hero-text-contacto .title {
        font-size: 2rem;
    }
    .hero-text-contacto .contacto-list li {
        font-size: 1.4rem;
    }
    .como-llegar-subtitle {
        font-size: 1.3rem;
    }

    .legal-card p {
        font-size: 1.05rem;
    }
}

/* ===========================
   RESPONSIVE: PANTALLAS ANCHAS desde 900px
   Estilos COMPARTIDOS: grids, trayectoria, secciones
   Aplica a portátil Y desktop
   =========================== */
@media (min-width: 900px) {
    /*Desde portátil en adelante, estilos compartidos para portátil y desktop*/
    .preheader {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 40px;
    }
    .preheader-title {
        display: block;
        font-size: 1.5rem;
    }
    .preheader-item {
        font-size: 1rem;
    }

    .hero-banner {
        position: relative;
        width: 100%;
        min-height: 85vh; /* AJUSTE: Altura mínima hero móvil (barras sistema) */
        background-image: url("images/doctorcruces.jpg");
        background-size: cover;
        background-position: 25%; /* AJUSTE: Posición cara (center = centrada) */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        padding: 30px 10px 25px; /* AJUSTE: Padding hero móvil */
    }

    .hero-banner-medico {
        background-image: url("images/medico_paciente.jpg");
        background-position: center 80%; /* AJUSTE: evita recorte cabeza en pantallas anchas */
    }

    .hero-banner-deporte {
        background-image: none;
    }

    .hero-overlay {
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0) 40%,
            rgba(0, 0, 0, 0) 80%,
            rgba(0, 0, 0, 0) 100%
        );
    }

    .hero-text {
        position: relative;
        z-index: 20;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2px; /* AJUSTE: Espacio entre elementos hero */
        color: var(--color-text-primary);
    }

    .hero-text h1 {
        font-weight: 700;
    }

    .hero-description {
        /* AJUSTE: Tamaño descripción móvil */
        font-weight: 200;
        font-size: 1rem;
        color: var(--color-text-primary);
        margin: 4px 5px 0px;
        text-align: center;
    }

    .cta-button {
        background-color: var(--color-bg-secondary);
        border-radius: 6px;
        padding: 14px 10px; /* AJUSTE: Padding botón móvil */
        text-decoration: none;
        color: #ffffff;
        text-align: center;
        font-size: 1.1rem; /* AJUSTE: Tamaño texto botón portátil 900px+ */
        font-weight: 700;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
        margin-top: 12px; /* AJUSTE: Margen superior botón */
        display: inline-block;
    }

    .cta-button.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .cta-button:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
        background-color: var(--color-teal);
    }

    /* Anclas: 2 columnas desde 900px */
    .anclas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* Cards servicios/tratamientos: 2 columnas desde 900px */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Secciones: margen lateral y ancho máximo */
    .section {
        padding: 40px 30px;
        max-width: 960px;
        margin: 0 auto;
    }

    .card-title {
        font-size: 1.2rem;
        font-weight: 400;
    }

    /* TARJETAS LEGALES desde 900px */
    .legal-card {
        padding: 32px 28px;
        margin-bottom: 80px;
    }

    .legal-card-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .legal-card h2 {
        font-size: 1.8rem;
    }

    .legal-card p {
        font-size: 1rem;
        line-height: 1.9;
        padding-bottom: 1rem;
    }
    /* TRAYECTORIA: grid 2fr | 1fr */
    .trayectoria-section {
        padding: 50px 40px;
    }

    .trayectoria-grid-wrapper {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 50px;
        align-items: start;
    }

    .trayectoria-bg-mobile {
        display: none;
    }

    .trayectoria-bg-desktop {
        display: block;
        position: sticky;
        top: 40px;
        align-self: start;
        width: 100%;
        height: 85vh; /* AJUSTE: alto imagen sticky desktop */
        max-height: none;
        min-height: unset;
        margin: 0;
    }    .como-llegar-subtitle {
        font-size: 1.3rem;
    }
}

/* ===========================
   RESPONSIVE: PORTÁTIL 900px – 1439px
   Hero exclusivo para portátil
   =========================== */
@media (min-width: 900px) and (max-width: 1439px) {
    .hero-banner {
        background-position: 20%; /* AJUSTE: posición foto doctor */
        height: 100vh; /* AJUSTE: altura hero portátil */
        align-items: center;
        padding: 80px 50px 60px;
    }

    .hero-banner-medico {
        background-position: center 40%; /* AJUSTE: posición foto médico-paciente portátil */
    }

    .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 40%,
            rgba(0, 0, 0, 0.6) 75%,
            rgba(0, 0, 0, 0.85) 100%
        );
    }

    /* Gradient deporte: texto a la izquierda, claro a la izquierda */
    .hero-banner-deporte .hero-overlay {
        background: linear-gradient(
            to right,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0) 35%,
            rgba(255, 255, 255, 0) 65%,
            rgba(255, 255, 255, 0) 100%
        ); /* AJUSTE: valores del gradient deporte portátil */
    }

    /* Texto a la derecha abajo en portátil */
    .hero-text {
        position: absolute;
        bottom: 50px; /* AJUSTE: distancia desde el borde inferior */
        right: 60px; /* AJUSTE: distancia desde el borde derecho */
        left: auto;
        top: auto;
        transform: none;
        width: 45%; /* AJUSTE: anchura bloque texto */
        max-width: 520px; /* AJUSTE: máximo */
        text-align: left;
        align-items: flex-start;
    }

    .hero-description {
        font-size: 1.1rem;
        line-height: 1.7rem;
        font-weight: 700;
        text-align: left;
        margin-top: 20px;
    }

    /* Médico-paciente: descripción portátil 900-1439px */
    .hero-banner-medico .hero-description p {
        font-size: 1.5rem;
        line-height: 1.5;
        letter-spacing: 0.01em;
        font-weight: 300;
    }
    .hero-banner-medico .hero-text {
        gap: 14px;
        max-width: 80%;
    }

    /* Legal: texto más grande en pantallas desde 900px */
    .hero-banner-legal .hero-text h1 {
        font-size: 3.5rem; /* AJUSTE: tamaño título legal portátil+ */
    }
    .hero-banner-legal .hero-description p {
        font-size: 1.4rem; /* AJUSTE: tamaño descripción legal portátil+ */
    }

    .cta-button {
        width: 300px;
        padding: 20px 0;
        font-size: 1.5rem;
    }
}

/* Posición cara hero < 1024px: override */
@media (max-width: 1023px) {
    .hero-banner {
        background-position: 25%; /* AJUSTE: sube % si la cara queda a la izquierda, baja si queda a la derecha */
    }
}

@media (max-width: 767px) {
    #tratamiento .card-title {
        font-size: 1rem;
        font-weight: 400;
    }

    .legal-card h2 {
        font-size: 1.3rem;
        font-weight: 500;
    }
}

/* ===========================
   RESPONSIVE: DESKTOP desde 1440px
   Hero exclusivo para monitor de escritorio
   =========================== */
@media (min-width: 1440px) {
    .preheader-item {
        font-size: 1.2rem;
    }

    .hero-banner {
        background-position: top 15%; /* AJUSTE: mueve figura izq/dcha */
        height: 95vh; /* AJUSTE: altura hero desktop */
        align-items: center;
        padding: 80px 50px 60px;
    }

    .hero-overlay {
        background: linear-gradient(
            to left,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.5) 20%,
            rgba(0, 0, 0, 0) 70%,
            rgba(0, 0, 0, 0) 100%
        );
    }

    /* Texto anclado a la derecha en pantalla grande */
    .hero-text {
        position: absolute;
        right: 80px; /* AJUSTE: margen desde el borde derecho */
        left: auto;
        bottom: 80px; /* AJUSTE: distancia desde el borde inferior */
        top: auto;
        transform: none;
        width: 40%; /* AJUSTE: anchura bloque texto */
        max-width: 520px; /* AJUSTE: máximo */
        text-align: center;
    }

    .hero-description {
        font-size: 1.1rem;
        text-align: center;
        margin-top: 20px;
        margin-bottom: 15px;
    }
    .hero-description p {
        margin-bottom: 15px;
        font-size: 2rem;
    }
    .cta-button {
        width: 400px;
        padding: 20px 0;
        font-size: 1.5rem;
    }

    /* HERO MÉDICO-PACIENTE 1440px+ */
    .hero-banner-medico {
        background-position: center 40%; /* AJUSTE: baja % si se recorta la cabeza */
    }
    .hero-banner-medico .hero-text {
        right: 80px; /* AJUSTE: margen desde el borde derecho */
        width: 40%; /* AJUSTE: anchura bloque texto */
        max-width: 520px; /* AJUSTE: máximo */
        bottom: 80px; /* AJUSTE: distancia desde el borde inferior */
    }

     .hero-banner-medico .hero-overlay {
        background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 40%,
            rgba(0, 0, 0, 0.7) 70%,
            rgba(0, 0, 0, 1) 100%
        );
    }
    .hero-banner-medico .hero-text h1 {
        font-size: 4rem; /* AJUSTE: tamaño título médico-paciente desktop grande */
    }
    .hero-banner-medico .hero-description p {
        font-size: 1.8rem;
        line-height: 1.9rem;
        letter-spacing: 0.015em;
        font-weight: 300;
    }
    .hero-banner-medico .hero-description p:first-child {
        padding-bottom: 1.5rem;
    }
    .hero-banner-medico .hero-text {
        gap: 20px;
    }

    /* HERO CONTACTO 1440px+ */
    .hero-banner-contacto {
        min-height: 650px;
    }
    .hero-banner-contacto .hero-overlay {
        background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 40%,
            rgba(0, 0, 0, 0.5) 70%,
            rgba(0, 0, 0, 1) 100%
        );
    }
    .hero-text-contacto {
        position: absolute;
        right: 80px;
        bottom: 50px;
        top: auto;
        transform: none;
        width: 32%;
        text-align: center;
        margin-bottom: 0;
    }
    .hero-text-contacto .title {
        font-size: 2.2rem;
        padding-bottom: 20px;
    }
    .hero-text-contacto .contacto-list li {
        font-size: 1.3rem;
        margin-bottom: 14px;
    }
    .como-llegar-subtitle {
        font-size: 1.3rem;
    }
    .card {
        padding: 14px 16px;
        column-gap: 14px;
        row-gap: 5px;
    }
    .card-icon {
        font-size: 1.4rem;
    }
    .card-title {
        font-size: 1.05rem;
        font-weight: 400;
    }
    .card p {
        font-size: 0.9rem;
    }
    .paso-numero {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }
    .section {
        max-width: 1200px;
        padding: 50px 40px;
    }
    #transporte .cards-grid,
    #pasos .cards-grid {
        gap: 36px;
    }
}

/* ===========================
   FOOTER: 2 COLUMNAS a partir de 768px
   Izquierda (2fr): Dr. Cruces + Enlaces Rápidos
   Derecha (1fr):   Contacto + Sígueme
=========================== */
@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr;
        gap: 40px 20px; /* AJUSTE: gap vertical horizontal */
        text-align: center;
    }

    .footer-section:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }
    .footer-section:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }
    .footer-section:nth-child(3) {
        grid-column: 2;
        grid-row: 1;
    }
    .footer-section:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
    }

    .footer-redes {
        justify-content: center;
    }
    .footer-bottom {
        text-align: center;
    }
    .footer-legal {
        gap: 20px 20px;
    }
}

/* ===========================
   FOOTER: 3 COLUMNAS a partir de 1010px
   Col 1: Dr. Cruces | Col 2: Enlaces Rápidos | Col 3: Contacto + Sígueme
=========================== */
@media (min-width: 1010px) {
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr; /* AJUSTE: proporciones de las 3 columnas */
        gap: 0 40px; /* AJUSTE: gap horizontal entre columnas */
    }

    .footer-section:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }
    .footer-section:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }
    .footer-section:nth-child(3) {
        grid-column: 3;
        grid-row: 1;
    }

    .footer-section:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        margin-top: 40px; /* AJUSTE: distancia vertical respecto a Enlaces Rápidos */
        text-align: center;
    }
}
