/* ==========================================================================
   Tema «Ruta» (Configuración > Apariencia > Tema)
   Cambia la estructura (menú, portada, títulos, tarjetas, botones). Los colores y la
   tipografía siguen viniendo del admin. --theme-accent es la versión CLARA del color
   de marca para resaltar palabras sobre fotos oscuras.
   ========================================================================== */
:root {
    --theme-accent: #ff6b73;
    --theme-ink: rgba(2, 12, 38, .92);
}

/* ----- Banners: la imagen sube hasta el borde de arriba (el menú va encima) ----- */
.theme-ruta .hero-banner,
.theme-ruta .page-banner { margin-top: 0; }
.theme-ruta .page-banner { padding-top: var(--header-height); box-sizing: border-box; }
.theme-ruta .page-title { font-weight: 700; letter-spacing: .02em; }

/* ----- Menú ----- */
.theme-ruta .site-header { transition: background .35s ease, box-shadow .35s ease; }
.theme-ruta .main-nav a { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.theme-ruta .main-nav a::after { height: 2px; background: var(--theme-accent); }
.theme-ruta .logo img { border-radius: 10px; }

@media (min-width: 768px) {
    .theme-ruta .site-header:not(.scrolled):not(.solid) {
        background: linear-gradient(to bottom, rgba(2, 12, 38, .65), rgba(2, 12, 38, 0)) !important;
        background-color: transparent !important;
        box-shadow: none;
    }
    .theme-ruta .site-header:not(.scrolled):not(.solid) .nav-menu a,
    .theme-ruta .site-header:not(.scrolled):not(.solid) .logo-text,
    .theme-ruta .site-header:not(.scrolled):not(.solid) .search-toggle { color: #fff !important; }
    .theme-ruta .site-header:not(.scrolled):not(.solid) .nav-menu a.active { color: var(--theme-accent) !important; }
    /* el logo es una imagen con fondo blanco: sobre la foto va como una placa blanca */
    .theme-ruta .site-header:not(.scrolled):not(.solid) .logo img { background: #fff; padding: 4px 10px; box-shadow: 0 6px 22px rgba(0, 0, 0, .35); }
    .theme-ruta .site-header.scrolled {
        background-color: rgba(255, 255, 255, .92) !important;
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
}

/* ----- Portada: titular abajo a la izquierda sobre un degradado, la foto manda ----- */
.theme-ruta #hero-banner-custom .overlay {
    display: block !important;
    opacity: 1 !important;
    background:
        linear-gradient(0deg, rgba(2, 12, 38, .92) 0%, rgba(2, 12, 38, .6) 30%, rgba(2, 12, 38, 0) 62%),
        linear-gradient(180deg, rgba(2, 12, 38, .35) 0%, rgba(2, 12, 38, 0) 22%) !important;
}
.theme-ruta .hero-slide .container {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    height: 100%;
    padding-bottom: 96px;
    box-sizing: border-box;
}
.theme-ruta .hero-slide .banner-content {
    width: auto;
    max-width: 780px;
    height: auto;
    align-items: flex-start;
    text-align: left;
}
.theme-ruta .hero-slide .banner-content::before {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    margin-bottom: 1.3rem;
    background: var(--theme-accent);
}
/* titular: la línea principal en blanco y la palabra destacada en el acento claro (sin cursiva extendida) */
.theme-ruta .hero-slide .banner-title-stack { font-family: inherit; }
.theme-ruta .hero-slide .banner-title-stack .tl {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.theme-ruta .hero-slide .banner-title-stack .tl-main {
    font-size: clamp(2.2rem, 5.6vw, 4.6rem);
    font-weight: 800;
    font-style: normal;
    letter-spacing: -.01em;
    line-height: 1.04;
    text-transform: none;
}
.theme-ruta .hero-slide .banner-title-stack .hl { color: var(--theme-accent); }
.theme-ruta .hero-slide .banner-subtitle { max-width: 34rem; margin-top: .8rem; font-size: 1.1rem; opacity: .92; }
.theme-ruta .hero-pagination { bottom: 30px; }

@media (max-width: 767px) {
    .theme-ruta .hero-slide .container { padding-top: calc(var(--th-header-h, 90px) + 8px); padding-bottom: 56px; }
    .theme-ruta .hero-slide .banner-content { flex: 1 1 100%; width: 100%; max-width: none; }
    .theme-ruta .hero-slide .banner-title-stack .tl-main { font-size: clamp(1.9rem, 9vw, 2.6rem); }
    .theme-ruta .hero-banner, .theme-ruta #hero-banner-custom { min-height: calc(var(--th-header-h, 90px) + 420px); }
}

/* ----- Títulos de sección con filete de acento ----- */
.theme-ruta .section-title { font-weight: 800; letter-spacing: -.005em; }
.theme-ruta .section-header .section-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    margin: .8rem auto 0;
    background: var(--color-secondary, #ec0110);
    border-radius: 2px;
}

/* ----- Bienvenida: texto y foto centrados verticalmente entre sí ----- */
.theme-ruta .welcome-grid { align-items: center; }
.theme-ruta .welcome-text { align-self: center; }
.theme-ruta .welcome-image { align-self: center; overflow: hidden; border-radius: 16px; box-shadow: 0 24px 60px rgba(2, 12, 38, .22); }
.theme-ruta .welcome-image > p,
.theme-ruta .welcome-image picture { display: block; width: 100%; margin: 0; }
.theme-ruta .welcome-image img { display: block; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px !important; transition: transform .7s ease; }
.theme-ruta .welcome-image:hover img { transform: scale(1.05); }

/* ----- Servicios: tarjetas redondeadas que se elevan ----- */
.theme-ruta .services-grid .service-card.svc-photo-card {
    border-radius: 16px;
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease;
}
.theme-ruta .services-grid .service-card.svc-photo-card:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(2, 12, 38, .28); }

/* ----- Botones: rectos, en mayúsculas y con espaciado ----- */
.theme-ruta .btn-primary,
.theme-ruta .cta-section .btn-primary {
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

/* ----- Llamado a la acción y pie ----- */
.theme-ruta .cta-section { position: relative; overflow: hidden; }
.theme-ruta .cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 45%);
    pointer-events: none;
}
.theme-ruta .site-footer { border-top: 4px solid var(--color-secondary, #ec0110); }

/* ----- Video vertical en la bienvenida ----- */
.theme-ruta .welcome-image video { display: block; width: 100%; height: 100%; min-height: 420px; object-fit: cover; border-radius: 16px; background: #0b1426; }
.theme-ruta .welcome-image > p { margin: 0; }
@media (max-width: 900px) {
    .theme-ruta .welcome-image video { height: auto; min-height: 0; max-height: 78vh; aspect-ratio: 9 / 16; }
}

/* ----- Video del banner: tarjeta vertical a la derecha en PC, a pantalla completa en celular ----- */
@media (min-width: 768px) {
    .theme-ruta .hero-slide .slide-video {
        top: calc(var(--header-height) + 28px);
        left: auto;
        right: max(5%, calc((100vw - 1200px) / 2));
        width: auto;
        height: calc(100% - var(--header-height) - 28px - 120px);
        border-radius: 16px;
        box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
        z-index: 2;
    }
    .theme-ruta .hero-slide:has(.slide-video) .banner-content { max-width: 52%; }
}

/* ----- Quiénes somos: propuesta de valor en 3 + 3 tarjetas ----- */
.theme-ruta .values-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.theme-ruta .value-item { border-radius: 16px; display: flex; flex-direction: column; align-items: center; }
.theme-ruta .value-item:nth-child(3n+1) { background: #f0f4ff; }
.theme-ruta .value-item:nth-child(3n+2) { background: #fff4f2; }
.theme-ruta .value-item:nth-child(3n+3) { background: #f0f7ff; }
@media (max-width: 900px) { .theme-ruta .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .theme-ruta .values-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Quiénes somos: menos espacio entre bloques y franjas a todo el ancho
   ========================================================================== */
.theme-ruta { overflow-x: clip; }
.theme-ruta .content-section { padding: 48px 0 20px; }
.theme-ruta .content-grid { margin-bottom: 0; gap: 3rem; align-items: center; }
.theme-ruta .content-image picture { display: block; }
.theme-ruta .content-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; box-shadow: 0 24px 60px rgba(2, 12, 38, .2); }
.theme-ruta .mvv-section { padding: 48px 0; }
.theme-ruta .mvv-grid { margin-top: 0; gap: 28px; }
.theme-ruta .mvv-card { padding: 32px 28px; border-radius: 16px; }
.theme-ruta .values-block { margin-top: 44px; }
.theme-ruta .custom-section { margin-bottom: 0; }
.theme-ruta .custom-section:has(.rt-band),
.theme-ruta .custom-section:has(.rt-cover) { padding: 0; background: transparent; }

/* Franja oscura (propuesta de valor) */
.rt-band, .rt-cover { width: 100vw; margin-left: calc(-50vw + 50%); box-sizing: border-box; }
.rt-band {
    position: relative;
    overflow: hidden;
    padding: 84px 6%;
    color: #fff;
    background: linear-gradient(135deg, #031a4d 0%, #012770 55%, #0a3a9a 100%);
}
.rt-band::before {
    content: '';
    position: absolute;
    right: -140px;
    bottom: -220px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 1, 16, .3), rgba(236, 1, 16, 0) 66%);
    pointer-events: none;
}
.rt-inner { position: relative; max-width: 1160px; margin: 0 auto; }
.rt-eyebrow { display: block; margin-bottom: .9rem; text-align: center; font-size: .76rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--theme-accent); }
.rt-h2 { margin: 0 0 .9rem; text-align: center; color: #fff; font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.8rem) !important; line-height: 1.15; }
.rt-h2 em { font-style: normal; color: var(--theme-accent); }
.rt-lead { max-width: 760px; margin: 0 auto 3.2rem; text-align: center !important; color: rgba(255, 255, 255, .88); font-size: 1.08rem; line-height: 1.8; }
.rt-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.rt-steps li { position: relative; padding: 26px 4px 6px 0; border-top: 1px solid rgba(255, 255, 255, .24); }
.rt-steps li::before { content: ''; position: absolute; top: -2px; left: 0; width: 46px; height: 3px; background: var(--theme-accent); }
.rt-num { display: block; margin-bottom: .5rem; font-size: 2.7rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: rgba(255, 255, 255, .16); }
.rt-steps h4 { margin: 0 0 .5rem; color: #fff; font-size: 1.15rem; font-weight: 700; }
.rt-steps p { margin: 0 0 2rem; text-align: left; color: rgba(255, 255, 255, .8); font-size: .98rem; line-height: 1.7; }

/* Cobertura: foto de la flota de fondo con el mensaje al centro */
.rt-cover { position: relative; padding: 96px 6%; text-align: center; color: #fff; background-size: cover; background-position: center; }
.rt-cover::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 12, 38, .8), rgba(2, 12, 38, .62) 45%, rgba(2, 12, 38, .88)); }
.rt-cover .rt-inner { max-width: 820px; }
.rt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0 0 1.6rem; }
.rt-chips span { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rt-chips span::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--theme-accent); }
.rt-note { margin: 0 0 2rem; text-align: center !important; color: rgba(255, 255, 255, .9); }
.rt-btn { display: inline-block; padding: 1rem 2.2rem; border-radius: 4px; background: #c4000d; color: #fff !important; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; transition: background .25s, color .25s; }
.rt-btn:hover { background: #fff; color: #012770 !important; }

@media (max-width: 900px) {
    .theme-ruta .content-grid { gap: 1.6rem; }
    .rt-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .rt-band { padding: 56px 7%; }
    .rt-cover { padding: 64px 7%; }
    .rt-steps { grid-template-columns: 1fr; }
    .rt-lead { margin-bottom: 2.2rem; }
}

/* ----- Servicios: foto con título; la descripción se ve al ampliar la foto ----- */
.theme-ruta .svc-caption { padding-top: 3.4rem; }
.theme-ruta .svc-name { font-size: 1.2rem !important; }

/* ==========================================================================
   Reglas generales de UX (guía ui-ux-pro-max): foco visible, áreas táctiles de 44 px,
   movimiento reducido, contraste mínimo 4.5:1, líneas de texto cómodas
   ========================================================================== */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height, 80px) + 12px); }
.theme-ruta :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid #7DB3FF; outline-offset: 3px; border-radius: 4px; }
.theme-ruta .site-header:not(.scrolled):not(.solid) :is(a, button):focus-visible { outline-color: #ff6b73; }
.theme-ruta :is(button, [role="button"], .btn) { cursor: pointer; min-height: 44px; }
.theme-ruta :is(button, .btn):active { transform: scale(.98); }
.theme-ruta :is(button, .btn):disabled { opacity: .6; cursor: not-allowed; }
.theme-ruta .main-nav a { padding-block: .6rem; }
.theme-ruta .hero-bullet { position: relative; }
.theme-ruta .hero-bullet::after { content: ''; position: absolute; inset: -14px -8px; }
.theme-ruta .form-group :is(input, select) { font-size: 16px; min-height: 48px; }
.theme-ruta .form-group textarea { font-size: 16px; }
.theme-ruta :is(.wysiwyg-content, .welcome-text, .content-text) p { max-width: 72ch; }
.theme-ruta :is(.value-item p, .mvv-content, .section-subtitle, .lead-text) { color: #4b5563; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .theme-ruta *, .theme-ruta *::before, .theme-ruta *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .theme-ruta #hero-banner-custom .slide-image { animation: none !important; }
    .theme-ruta .whatsapp-float { animation: none !important; }
}
