/* =========================================================
   Jaenwagen — Tema custom (versión funcional)
   Paleta: Navy #1B4E8F + Rojo #C8302A + Blanco/Gris — basada en la fachada del taller
   ========================================================= */

:root {
    --color-primary: #1B4E8F;
    --color-primary-dark: #123566;
    --color-primary-light: #2A6FB8;
    --color-accent: #C8302A;
    --color-accent-dark: #9E2520;

    --color-bg: #FFFFFF;
    --color-bg-soft: #F4F4F4;
    --color-bg-dark: #2B2B2B;

    --color-text: #212121;
    --color-text-soft: #464646;
    --color-text-muted: #6B7280;

    --color-border: #E5E5E5;

    --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --container: 1320px;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow-sm: 0 1px 3px rgba(11, 37, 64, 0.08);
    --shadow: 0 4px 16px rgba(11, 37, 64, 0.1);
    --shadow-lg: 0 12px 32px rgba(11, 37, 64, 0.15);
}

*, *::before, *::after { box-sizing: border-box; }

/* Sin caret en texto normal — sólo en inputs */
* { caret-color: transparent; }
input, textarea, select, [contenteditable="true"] { caret-color: auto; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
    color: var(--color-text);
    overflow-wrap: break-word;
}
h1 { font-size: clamp(1.9rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }

p { margin: 0 0 1rem; color: var(--color-text-soft); overflow-wrap: break-word; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-accent); }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
}

/* ============ Botones ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    font-weight: 700;
}
.btn-primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); color: #fff; }

.btn-secondary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-secondary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.btn-outline-light:hover { background: #fff; color: var(--color-primary); }

.btn-large { padding: 1rem 2rem; font-size: 1rem; }

/* ============ HEADER ============ */
.topbar {
    background: var(--color-primary);
    color: #fff;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--color-accent); }
.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.topbar-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar-item svg { width: 14px; height: 14px; flex-shrink: 0; }

.site-header {
    background: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.site-header > .container {
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.header-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.85rem 0;
    gap: 1.5rem;
    flex-wrap: nowrap;
    min-width: 0;
}

.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.site-logo img { max-height: 60px; width: auto; }

.main-nav {
    flex: 0 1 auto;
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    align-items: center;
}
.main-nav a {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--color-primary);
    border-bottom-color: var(--color-accent);
}

/* Botón "Contacto" del header (junto al teléfono) — sólo visible en desktop */
.btn-contacto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    box-shadow:
        0 4px 12px rgba(200, 48, 42, 0.3),
        0 0 0 4px rgba(200, 48, 42, 0.12);
}
.btn-contacto:hover {
    background: var(--color-accent-dark);
    color: #fff;
    box-shadow:
        0 8px 24px rgba(200, 48, 42, 0.5),
        0 0 0 6px rgba(200, 48, 42, 0.2),
        0 0 30px rgba(200, 48, 42, 0.4);
}

/* ==================== DROPDOWN (menu-item-has-children) ==================== */
.main-nav li.menu-item-has-children { position: relative; }

/* Chevron indicador en el padre */
.main-nav li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: 0.65;
    transition: transform 0.2s ease;
}
.main-nav li.menu-item-has-children:hover > a::after {
    transform: rotate(-135deg) translateY(-2px);
    opacity: 1;
}

/* Sub-menu: oculto por defecto, visible al hover del padre */
.main-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    position: absolute;
    top: 100%;
    left: -0.75rem;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(11, 37, 64, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 200;
}
.main-nav li.menu-item-has-children:hover > .sub-menu,
.main-nav li.menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* Puente invisible entre el item padre y el sub-menu para que no se cierre */
.main-nav li.menu-item-has-children::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}
.main-nav .sub-menu li {
    width: 100%;
    border-bottom: 0;
}
.main-nav .sub-menu a {
    display: block;
    padding: 0.55rem 1.1rem;
    font-size: 0.92rem;
    white-space: nowrap;
    border-bottom: 0;
    color: var(--color-text);
}
.main-nav .sub-menu a:hover,
.main-nav .sub-menu .current-menu-item > a {
    color: var(--color-primary);
    background: var(--color-bg-soft);
    border-bottom: 0;
}

/* Último item del menú ("Contacto") — destacado DENTRO del menú hamburguesa */
.main-nav > ul > li:last-child { border-bottom: 0 !important; }
.main-nav > ul > li:last-child > a {
    background: var(--color-accent);
    color: #fff !important;
    padding: 0.7rem 1.4rem !important;
    border-radius: var(--radius);
    border-bottom: 0 !important;
    font-weight: 700;
    box-shadow:
        0 4px 12px rgba(200, 48, 42, 0.3),
        0 0 0 4px rgba(200, 48, 42, 0.12);
}
.main-nav > ul > li:last-child > a:hover {
    background: var(--color-accent-dark);
    color: #fff !important;
    box-shadow:
        0 8px 24px rgba(200, 48, 42, 0.5),
        0 0 0 6px rgba(200, 48, 42, 0.2),
        0 0 30px rgba(200, 48, 42, 0.4);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 1rem;
}
.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--color-primary);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.92rem;
}
.header-phone:hover { color: var(--color-accent); }
.header-phone-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-toggle {
    display: none;
    background: var(--color-primary);
    color: #fff;
    border: 0;
    width: 42px; height: 42px;
    border-radius: var(--radius-sm);
    font-size: 1.3rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============ Hero ============ */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: #fff;
    padding: 4rem 0;
    background-color: #0B2540;
    background-image:
        linear-gradient(100deg, rgba(11, 37, 64, 0.82) 0%, rgba(11, 37, 64, 0.55) 45%, rgba(11, 37, 64, 0.35) 100%),
        var(--hero-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero h1 { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5); }
.hero-subtitle { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }
.hero-content { max-width: 820px; width: 100%; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--color-accent);
    color: #fff;
    padding: 0.45rem 1.1rem;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    max-width: 100%;
    box-shadow: 0 6px 18px rgba(200, 48, 42, 0.3);
}
.hero-badge svg { flex-shrink: 0; }
.hero h1 { color: #fff; margin-bottom: 1.25rem; }
.hero h1 span {
    color: #E63946;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    letter-spacing: -0.005em;
}
.hero-subtitle {
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    max-width: 680px;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}
.hero-phone-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    min-width: 0;
}
.hero-phone-block small { display: block; font-size: 0.8rem; opacity: 0.8; margin-bottom: 0.15rem; }
.hero-phone-block strong {
    font-size: 1.35rem;
    color: #E63946;
    font-family: var(--font-heading);
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.hero-trust {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    flex-wrap: wrap;
}
.hero-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 500;
}
.hero-trust-item svg { width: 18px; height: 18px; color: var(--color-accent); flex-shrink: 0; }

/* ============ Secciones ============ */
.section { padding: 4rem 0; }
.section-soft { background: var(--color-bg-soft); }
.section-primary { background: var(--color-primary); color: #fff; }
.section-dark { background: var(--color-bg-dark); color: #fff; }
.section-primary h1, .section-primary h2, .section-primary h3,
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-primary p, .section-dark p { color: rgba(255,255,255,0.85); }

.section-header { text-align: center; max-width: 760px; margin: 0 auto 3rem; }
.section-header h2 span { color: var(--color-accent); }
.section-eyebrow {
    display: inline-block;
    color: var(--color-accent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* ============ Grids ============ */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
/* 2x2 fijo: 2 columnas en desktop, 1 columna en móvil */
.grid-2x2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .grid-2x2 { grid-template-columns: 1fr; } }

/* ============ Service cards ============ */
.service-card {
    background: #fff;
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    display: block;
    box-shadow: 0 4px 16px rgba(11, 37, 64, 0.04);
    min-width: 0;
    position: relative;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-primary) 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(27, 78, 143, 0.25);
    color: var(--color-text);
    box-shadow: 0 18px 44px rgba(11, 37, 64, 0.12);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 6px 16px rgba(27, 78, 143, 0.2);
}
.service-card-icon svg { width: 28px; height: 28px; }
.service-card h3 { margin-bottom: 0.6rem; font-size: 1.2rem; }
.service-card p { margin: 0 0 1rem; font-size: 0.95rem; }
.service-card-link {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.service-card-link svg { width: 12px; height: 12px; }

/* ============ Features ============ */
.feature { text-align: center; padding: 0.75rem; min-width: 0; }
.feature-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--color-bg-soft);
    color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: inset 0 0 0 2px rgba(27, 78, 143, 0.12);
}
.feature-icon svg { width: 34px; height: 34px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.feature p { font-size: 0.93rem; margin: 0; }

/* ============ CTA Banner ============ */
.cta-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 4rem 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(200, 48, 42, 0.28) 0%, transparent 65%);
    pointer-events: none;
}
.cta-banner::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.cta-banner > .container { position: relative; z-index: 1; }
.cta-banner h2 { color: #fff; margin-bottom: 1rem; }
.cta-banner p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.9);
    max-width: 680px;
    margin: 0 auto 1.75rem;
}
.cta-schedule {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: rgba(255,255,255,0.95);
}
.cta-schedule strong {
    color: #fff;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.98rem;
}

/* ============ Stats / cifras ============ */
.stats {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 3rem 0;
    color: #fff;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1rem;
    text-align: center;
}
.stat {
    padding: 0.5rem;
    border-right: 1px solid rgba(255,255,255,0.18);
    min-width: 0;
}
.stat:last-child { border-right: 0; }
.stat strong {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
}
.stat span {
    display: block;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
}

/* ============ Innovation list ============ */
.innovation-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}
.innovation-list li {
    position: relative;
    padding: 0.9rem 0 0.9rem 2.25rem;
    border-bottom: 1px solid var(--color-border);
}
.innovation-list li:last-child { border-bottom: 0; }
.innovation-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.2rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(200, 48, 42, 0.2);
}
.innovation-list strong {
    display: block;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}
.innovation-list span {
    display: block;
    color: var(--color-text-soft);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* ============ Award card ============ */
.award-card {
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #FFF5EC 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    min-width: 0;
    overflow: hidden;
}
.award-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
}
.award-card-trophy {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(200, 48, 42, 0.3);
}
.award-card-trophy svg { width: 32px; height: 32px; }
.award-card-year {
    display: inline-block;
    background: var(--color-bg-soft);
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.award-card h3 {
    color: var(--color-text);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}
.award-card p { color: var(--color-text-soft); margin-bottom: 1.25rem; }
.award-card p strong { color: var(--color-primary); }

/* ============ Gallery ============ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1rem;
}
.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--color-bg-soft);
    position: relative;
    cursor: zoom-in;
    box-shadow: 0 6px 18px rgba(11, 37, 64, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(11, 37, 64, 0.45) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(11, 37, 64, 0.18);
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* ============ Hero con formulario al lado ============ */
.hero-with-form { min-height: auto; padding: 5rem 0 4rem; }
.hero-layout {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-with-form .hero-content { max-width: none; }
.hero-with-form .hero-cta { margin-top: 2rem; }

.hero-form-card {
    background: #fff;
    color: var(--color-text);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    min-width: 0;
}
.hero-form-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    color: var(--color-text);
}
.hero-form-card h3 span { color: var(--color-accent); }
.hero-form-sub {
    color: var(--color-text-soft);
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
}
.hero-form-card .jw-form-grid { grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; margin-bottom: 1rem; }
.hero-form-card .jw-field label { font-size: 0.85rem; margin-bottom: 0.35rem; }
.hero-form-card .jw-field input,
.hero-form-card .jw-field textarea { padding: 0.7rem 0.85rem; font-size: 0.9rem; }
.hero-form-card .jw-form-footer { flex-direction: column; align-items: stretch; gap: 1rem; }
.hero-form-card .jw-submit { width: 100%; padding: 0.85rem; }
.hero-form-card .jw-terms-title { font-size: 0.85rem; margin-bottom: 0.35rem; }
.hero-form-card .jw-checkbox { font-size: 0.9rem; }

@media (max-width: 1100px) {
    .hero-layout { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-form-card .jw-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .hero-form-card { padding: 1.5rem; }
    .hero-form-card .jw-form-grid { grid-template-columns: 1fr; }
}

/* ============ Contacto ============ */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem 2rem;
    margin-bottom: 3rem;
}
.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.contact-info-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.contact-info-item strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 0.15rem;
    font-family: var(--font-heading);
}
.contact-info-item p { margin: 0; word-break: break-word; }

.contact-form {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}
.contact-form h2 { margin: 0 0 1.5rem; }

.contact-alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.contact-alert-error { background: #FEECEC; color: #B3261E; border: 1px solid #F4B5B5; }
.contact-alert-ok    { background: #E7F5EA; color: #1E6B32; border: 1px solid #B8E0C2; }

.jw-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.jw-field label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.jw-field input,
.jw-field textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}
.jw-field input::placeholder,
.jw-field textarea::placeholder {
    color: #8a8f99;
}
.jw-field input:focus,
.jw-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 78, 143, 0.15);
}

.jw-form-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 0.5rem;
}
.jw-terms { flex: 1; min-width: 0; }
.jw-terms-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}
.jw-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--color-text-soft);
    cursor: pointer;
}
.jw-checkbox input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
}
.jw-checkbox a { color: var(--color-text); text-decoration: underline; }

.jw-submit {
    background: #0F1419;
    color: #fff;
    border: 0;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.jw-submit:hover { background: var(--color-primary); }

.contact-map { margin-top: 1rem; }
.contact-map h2 { text-align: center; margin-bottom: 1.5rem; }
.contact-map-frame {
    aspect-ratio: 16/8;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}

/* ============ Footer ============ */
.site-footer {
    background: var(--color-bg-dark);
    color: #E5E7EB;
    padding: 3.5rem 0 1.5rem;
}
.site-footer p { color: #D1D5DB; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-col { min-width: 0; }
.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 0.6rem;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 36px; height: 3px;
    background: var(--color-accent);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 0.5rem; color: #D1D5DB; font-size: 0.95rem; }
.footer-col a { color: #E5E7EB; font-size: 0.95rem; word-break: break-word; }
.footer-col a:hover { color: var(--color-accent); }
.footer-logo {
    max-height: 70px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}
.footer-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.footer-social a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.footer-social a:hover { background: var(--color-accent); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }

/* Esconder el botón "Manage consent" que Complianz añade por defecto
   (nuestro .floating-cookies lo reemplaza) */
body > button.cmplz-manage-consent:not(.floating-cookies) { display: none !important; }
#cmplz-manage-consent { display: none !important; }

/* Esconder enlaces TCF/IAB vendors (no los usamos) */
/* Ocultar el link "Gestionar {vendor_count} proveedores" — la variable no se
 * reemplaza correctamente cuando el framework TCF no está configurado, y el
 * sitio no es publisher TCF (no hay anuncios). */
.cmplz-manage-vendors,
a.cmplz-manage-vendors,
.cmplz-link.tcf,
.cmplz-btn.tcf,
.cmplz-btn.cmplz-manage-options.tcf,
a[href="#cmplz-tcf-wrapper"],
a[data-relative_url="#cmplz-tcf-wrapper"],
#cmplz-tcf-wrapper { display: none !important; visibility: hidden !important; }

/* Forzar el banner de cookies a la izquierda (junto al botón flotante) */
.cmplz-cookiebanner,
.cmplz-cookiebanner.cmplz-bottom-left,
.cmplz-cookiebanner.cmplz-bottom-right {
    left: 10px !important;
    right: initial !important;
    bottom: 90px !important; /* deja hueco para el botón circular de cookies */
    top: initial !important;
    transform: initial !important;
}
@media (max-width: 768px) {
    .cmplz-cookiebanner,
    .cmplz-cookiebanner.cmplz-bottom-left,
    .cmplz-cookiebanner.cmplz-bottom-right {
        left: initial !important;
        right: initial !important;
        bottom: 0 !important;
        width: 100% !important;
    }
}

/* Botón flotante "Gestionar cookies" — fijo abajo a la izquierda */
.floating-cookies {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-bg-dark);
    color: #fff;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: background 0.2s ease, transform 0.2s ease;
}
.floating-cookies:hover {
    background: var(--color-primary);
    transform: scale(1.05);
}
.floating-cookies svg { pointer-events: none; }
@media (max-width: 640px) {
    .floating-cookies { bottom: 1rem; left: 1rem; width: 44px; height: 44px; }
    .floating-cookies svg { width: 22px; height: 22px; }
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: #9CA3AF;
}

/* ============ Floating CTA ============ */
.floating-cta {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.floating-btn {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    text-decoration: none;
}
.floating-btn:hover { color: #fff; opacity: 0.9; }
.floating-btn-whatsapp { background: #25D366; }
.floating-btn-phone { background: var(--color-accent); }

/* ============ Page hero (páginas interiores) ============ */
.page-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 5.5rem 0 4.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -40%; right: -10%;
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(200, 48, 42, 0.25) 0%, transparent 65%);
    pointer-events: none;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -40%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
/* Hero con imagen destacada de fondo */
.page-hero-with-image {
    background-color: #0B2540;
    background-image:
        linear-gradient(180deg, rgba(11, 37, 64, 0.45) 0%, rgba(11, 37, 64, 0.2) 40%, rgba(11, 37, 64, 0.55) 100%),
        var(--hero-bg, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 7rem 0 5rem;
    min-height: 420px;
    display: flex;
    align-items: center;
}
.page-hero-with-image::before,
.page-hero-with-image::after { opacity: 0.3; }
.page-hero-with-image h1 {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.page-hero-with-image .page-hero-excerpt {
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    background: rgba(11, 37, 64, 0.35);
    padding: 0.85rem 1.35rem;
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
    display: inline-block;
    max-width: 760px;
}
.page-hero-with-image .breadcrumbs {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: -0.01em;
}
.page-hero-excerpt {
    color: rgba(255,255,255,0.88);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}
.breadcrumbs {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    backdrop-filter: blur(8px);
}
.breadcrumbs a {
    color: #fff;
    text-decoration: none;
}
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs span { color: rgba(255,255,255,0.95); }

.page-content { padding: 5rem 0; max-width: 1280px; margin: 0 auto; }
.page-content .container { padding: 0 1.25rem; }
.page-content > .container > p:first-of-type {
    font-size: 1.18rem;
    line-height: 1.65;
    color: var(--color-text);
    margin-bottom: 2rem;
    max-width: 820px;
}
.page-content p { font-size: 1.03rem; color: var(--color-text-soft); line-height: 1.75; }
.page-content h2 {
    position: relative;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    color: var(--color-text);
    font-size: clamp(1.6rem, 3.2vw, 2.1rem);
    letter-spacing: -0.01em;
}
.page-content h2::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-primary) 100%);
    border-radius: 2px;
    margin-bottom: 1.25rem;
}
.page-content > .container > h2:first-child { margin-top: 0; }
.page-content h3 { margin-top: 1.75rem; color: var(--color-text); font-size: 1.25rem; }
.page-content ul:not(.check-list):not(.innovation-list):not(.info-card-list) {
    color: var(--color-text-soft);
    padding: 1.5rem 1.75rem 1.5rem 2.5rem;
    margin: 1.5rem 0;
    background: var(--color-bg-soft);
    border-radius: var(--radius);
    border-left: 4px solid var(--color-primary);
}
.page-content ul:not(.check-list):not(.innovation-list):not(.info-card-list) li {
    margin-bottom: 0.6rem;
    position: relative;
}
.page-content ul:not(.check-list):not(.innovation-list):not(.info-card-list) li:last-child { margin-bottom: 0; }
.page-content strong { color: var(--color-text); }
.page-content img { border-radius: var(--radius); margin: 1.5rem 0; box-shadow: var(--shadow); max-width: 100%; height: auto; }

/* Lead (párrafo introductorio grande) */
.page-content .lead {
    font-size: 1.2rem;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, rgba(27, 78, 143, 0.04) 0%, rgba(200, 48, 42, 0.04) 100%);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.page-content .lead strong { color: var(--color-primary); }

/* Grid de servicios / features dentro de páginas */
.service-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.25rem;
    margin: 2rem 0 2.5rem;
}
.service-features .feat {
    position: relative;
    background: #fff;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.service-features .feat::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    border-radius: var(--radius) var(--radius) 0 0;
}
.service-features .feat:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.service-features .feat h3 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    color: var(--color-text);
    font-size: 1.1rem;
    font-family: var(--font-heading);
}
.service-features .feat p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Checklist (¿por qué elegirnos?) */
.check-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 0.75rem 2rem;
    margin: 1.5rem 0 2.5rem;
}
.check-list li {
    position: relative;
    padding: 0.25rem 0 0.25rem 2.5rem;
    color: var(--color-text);
    margin-bottom: 0;
    font-size: 0.98rem;
}
.check-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 2px;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(27, 78, 143, 0.25);
}

/* Caja de horario */
.schedule-card {
    position: relative;
    background: linear-gradient(135deg, #fff 0%, var(--color-bg-soft) 100%);
    padding: 1.75rem 2rem 1.75rem 5.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    margin: 2rem 0 2.5rem;
    display: block;
    min-height: 96px;
}
.schedule-card::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 52px; height: 52px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z'/%3E%3C/svg%3E") center / 28px no-repeat,
        linear-gradient(135deg, #1B4E8F 0%, #123566 100%);
    box-shadow: 0 6px 16px rgba(27, 78, 143, 0.28);
}
.schedule-card p {
    margin: 0.2rem 0;
    color: var(--color-text);
    font-size: 0.98rem;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.75rem;
    align-items: baseline;
}
.schedule-card p strong {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 700;
}
@media (max-width: 640px) {
    .schedule-card {
        padding: 5rem 1.4rem 1.4rem 1.4rem;
        min-height: 0;
    }
    .schedule-card::before {
        left: 1.4rem;
        top: 1.4rem;
        transform: none;
        width: 46px; height: 46px;
        background-size: 24px;
    }
    .schedule-card p {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 0.5rem 0;
    }
    .schedule-card p strong {
        display: block;
        margin-bottom: 0.2rem;
    }
}

/* Caja de contacto inline dentro de páginas */
.contact-call {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin: 1.5rem 0 0;
}
.contact-call .btn {
    flex: 1;
    min-width: 220px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

/* Servicios relacionados */
.related-services {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}
.related-services h2 { color: var(--color-primary); font-size: 1.4rem; }
.related-services ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 0.75rem;
    margin: 1rem 0 0;
}
.related-services li { margin: 0; }
.related-services a {
    display: block;
    padding: 0.85rem 1rem;
    background: var(--color-bg-soft);
    border-radius: var(--radius);
    color: var(--color-text);
    font-weight: 600;
    border: 1px solid var(--color-border);
}
.related-services a:hover {
    background: #fff;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ============ Blog grid ============ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1.75rem;
    margin-bottom: 3rem;
}

.post-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.post-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.post-card-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-bg-soft);
    display: block;
    position: relative;
}
.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-thumb-fallback {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    position: relative;
}
.post-card-thumb-fallback::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M5 4v16h14V4H5zm12 14H7V6h10v12z'/%3E%3C/svg%3E") center / 64px no-repeat;
    opacity: 0.3;
}

.post-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
}
.post-meta svg { color: var(--color-primary); }

.post-card h3 {
    font-size: 1.18rem;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}
.post-card h3 a {
    color: var(--color-text);
    text-decoration: none;
}
.post-card h3 a:hover { color: var(--color-primary); }

.post-card-body p {
    font-size: 0.95rem;
    color: var(--color-text-soft);
    margin-bottom: 1rem;
    flex: 1;
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: auto;
    align-self: flex-start;
}
.post-card-link:hover { color: var(--color-accent-dark); gap: 0.55rem; transition: gap 0.2s ease; }

/* Paginación WP */
.nav-links {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.9rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}
.nav-links .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.nav-links .page-numbers:hover:not(.current) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Nosotros (home): imagen a un lado + texto al otro */
.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3.5rem;
    align-items: center;
}
.nosotros-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(11, 37, 64, 0.15);
}
.nosotros-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(27, 78, 143, 0.08) 100%);
    pointer-events: none;
}
.nosotros-image img {
    width: 100%;
    height: 100%;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
}
.nosotros-text .section-eyebrow { display: inline-block; margin-bottom: 0.5rem; }
.nosotros-text h2 { margin-bottom: 1.25rem; }
.nosotros-text p { margin-bottom: 1rem; }

@media (max-width: 960px) {
    .nosotros-grid { grid-template-columns: 1fr; gap: 2rem; }
    .nosotros-image img { aspect-ratio: 16/10; }
}

/* Trust strip (bajo el hero en páginas) */
.trust-strip {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 0;
    margin-top: -1px;
    position: relative;
    z-index: 2;
}
.trust-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.trust-strip-item {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    min-width: 0;
}
.trust-strip-item svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--color-primary);
}
.trust-strip-item strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    color: var(--color-text);
    line-height: 1.2;
    margin-bottom: 0.1rem;
}
.trust-strip-item span {
    font-size: 0.82rem;
    color: var(--color-text-soft);
    display: block;
    line-height: 1.3;
}
@media (max-width: 960px) {
    .trust-strip-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem 1.25rem; }
}
@media (max-width: 480px) {
    .trust-strip-grid { grid-template-columns: 1fr; }
}

/* Grid de servicios dentro del contenido (h2 → tarjetas con icono) */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 1.5rem 0 3rem;
}
.service-grid-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 1.1rem;
    align-items: start;
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 16px rgba(11, 37, 64, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.service-grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(11, 37, 64, 0.1);
    border-color: rgba(27, 78, 143, 0.2);
}
.service-grid-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(27, 78, 143, 0.28);
}
.service-grid-icon svg { width: 24px; height: 24px; }
.service-grid-body h3 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text);
}
.service-grid-body p {
    margin: 0;
    color: var(--color-text-soft);
    font-size: 0.96rem;
    line-height: 1.6;
}
@media (max-width: 820px) {
    .service-grid { grid-template-columns: 1fr; gap: 1rem; }
    .service-grid-item { padding: 1.25rem; }
}

/* Info-cards (Horario + Contacto al final de cada página) */
.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}
.info-card {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(11, 37, 64, 0.06);
}
.info-card-contact {
    background: linear-gradient(135deg, #fff 0%, rgba(27, 78, 143, 0.03) 100%);
    border-color: rgba(27, 78, 143, 0.12);
}
.info-card-head {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.25rem;
}
.info-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 22px rgba(27, 78, 143, 0.3);
}
.info-card-icon svg { width: 26px; height: 26px; }
.info-card-icon-accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, #D94B44 100%);
    box-shadow: 0 8px 22px rgba(200, 48, 42, 0.3);
}
.info-card-eyebrow {
    display: block;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0.15rem;
}
.info-card h3 {
    margin: 0;
    font-size: 1.25rem;
}
.info-card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}
.info-card-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--color-border);
    font-size: 0.96rem;
}
.info-card-list li:last-child { border-bottom: 0; }
.info-card-list strong {
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    flex-shrink: 0;
}
.info-card-list span,
.info-card-list a {
    color: var(--color-text-soft);
    text-align: right;
    word-break: break-word;
}
.info-card-list a { color: var(--color-primary); text-decoration: none; font-weight: 600; }
.info-card-list a:hover { color: var(--color-accent); }

@media (max-width: 820px) {
    .info-cards { grid-template-columns: 1fr; gap: 1.25rem; }
    .info-card { padding: 1.5rem; }
}

/* Hero image dentro de páginas de servicios */
.service-hero-image {
    margin: 0 0 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: 860px;
}
.service-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========================================================= */
/* ============ BLOG POST INDIVIDUAL           ============ */
/* ========================================================= */

/* Hero del blog (sin imagen de fondo — la imagen va debajo) */
.page-hero-blog {
    padding: 4.5rem 0 3.5rem;
    min-height: 0;
}

/* Imagen destacada del post: debajo del hero, completa y sin recortar */
.single-post-feature {
    padding: 2.5rem 0 0;
    margin-bottom: -2rem;
}
.single-post-feature-figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(11, 37, 64, 0.16);
    background: var(--color-bg-soft);
    max-width: 1080px;
    margin: 0 auto;
}
.single-post-feature-figure img {
    width: 100%;
    height: auto;
    display: block;
}
@media (max-width: 640px) {
    .single-post-feature { padding: 1.5rem 0 0; margin-bottom: -1rem; }
}

/* Meta info bajo el H1 del hero */
.post-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.92rem;
}
.post-hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.14);
    padding: 0.45rem 1rem;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.post-hero-meta-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.95;
}

/* Layout principal: contenido + sidebar */
.single-post { padding: 5rem 0; }
.single-post-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 3.5rem;
    align-items: start;
}
.single-post-main { min-width: 0; }

/* Contenido del post (tipografía mejorada) */
.single-post-content {
    color: var(--color-text-soft);
    font-size: 1.1rem;
    line-height: 1.85;
}
.single-post-content > p:first-child {
    font-size: 1.22rem;
    line-height: 1.7;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 2rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, rgba(27, 78, 143, 0.05) 0%, rgba(200, 48, 42, 0.05) 100%);
    border-left: 5px solid var(--color-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.single-post-content p { margin: 0 0 1.5rem; }
.single-post-content h2 {
    position: relative;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    padding-top: 1rem;
    color: var(--color-text);
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    letter-spacing: -0.01em;
}
.single-post-content h2::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-primary) 100%);
    border-radius: 2px;
    margin-bottom: 1.1rem;
}
.single-post-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    color: var(--color-primary);
    font-size: 1.25rem;
}
.single-post-content ul,
.single-post-content ol {
    padding: 1.5rem 1.75rem 1.5rem 2.5rem;
    margin: 1.5rem 0;
    background: var(--color-bg-soft);
    border-radius: var(--radius);
    border-left: 4px solid var(--color-accent);
    color: var(--color-text);
}
.single-post-content li { margin-bottom: 0.6rem; }
.single-post-content li:last-child { margin-bottom: 0; }
.single-post-content strong { color: var(--color-text); font-weight: 700; }
.single-post-content a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(27, 78, 143, 0.3);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}
.single-post-content a:hover {
    color: var(--color-accent);
    text-decoration-color: var(--color-accent);
}
.single-post-content img {
    border-radius: var(--radius);
    margin: 2rem auto;
    box-shadow: 0 14px 40px rgba(11, 37, 64, 0.12);
    display: block;
    max-width: 100%;
    height: auto;
}
.single-post-content blockquote {
    margin: 2rem 0;
    padding: 1.75rem 2rem 1.75rem 3rem;
    background: linear-gradient(135deg, var(--color-bg-soft) 0%, #fff 100%);
    border-left: 5px solid var(--color-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    font-size: 1.12rem;
    color: var(--color-text);
    position: relative;
    box-shadow: 0 4px 16px rgba(11, 37, 64, 0.04);
}
.single-post-content blockquote::before {
    content: '\201C';
    position: absolute;
    top: 0.25rem; left: 1rem;
    font-size: 4rem;
    color: var(--color-accent);
    line-height: 1;
    opacity: 0.3;
    font-family: Georgia, serif;
}

/* Footer del post (volver + compartir) */
.single-post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.single-post-share {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.single-post-share-label {
    color: var(--color-text-soft);
    font-size: 0.9rem;
    margin-right: 0.35rem;
    font-weight: 600;
}
.single-post-share a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-soft);
    color: var(--color-text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.single-post-share a:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: translateY(-3px);
}
.single-post-share svg { width: 18px; height: 18px; }

/* Sidebar */
.single-post-sidebar {
    position: sticky;
    top: 130px;
    align-self: start;
}
.post-sidebar-card {
    background: #fff;
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(11, 37, 64, 0.06);
    margin-bottom: 1.25rem;
}
.post-sidebar-card:last-child { margin-bottom: 0; }
.post-sidebar-card h4 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: var(--color-text);
}
.post-sidebar-cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-color: transparent;
}
.post-sidebar-cta::before {
    content: '';
    position: absolute;
    top: -40%; right: -20%;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(200, 48, 42, 0.3) 0%, transparent 70%);
    pointer-events: none;
}
.post-sidebar-cta > * { position: relative; z-index: 1; }
.post-sidebar-cta h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}
.post-sidebar-cta p {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.25rem;
    line-height: 1.55;
}
.post-sidebar-cta .btn {
    width: 100%;
    justify-content: center;
}
.post-sidebar-cta-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--color-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 22px rgba(200, 48, 42, 0.4);
}
.post-sidebar-cta-icon svg { width: 26px; height: 26px; }

/* Búsqueda en sidebar */
.post-sidebar-search {
    display: flex;
    gap: 0.5rem;
}
.post-sidebar-search input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--color-text);
}
.post-sidebar-search input[type="search"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 78, 143, 0.15);
}
.post-sidebar-search button {
    padding: 0.6rem 1.1rem;
    background: var(--color-text);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: background 0.2s ease;
}
.post-sidebar-search button:hover { background: var(--color-primary); }

/* Recientes */
.post-sidebar-recent {
    list-style: none;
    padding: 0;
    margin: 0;
}
.post-sidebar-recent li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-border);
    line-height: 1.45;
}
.post-sidebar-recent li:last-child { border-bottom: 0; }
.post-sidebar-recent a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}
.post-sidebar-recent a:hover {
    color: var(--color-accent);
}

/* Categorías */
.post-sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}
.post-sidebar-categories li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-border);
}
.post-sidebar-categories li:last-child { border-bottom: 0; }
.post-sidebar-categories a {
    color: var(--color-text-soft);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.post-sidebar-categories a::before {
    content: '›';
    color: var(--color-accent);
    font-weight: 700;
}
.post-sidebar-categories a:hover { color: var(--color-primary); }

.post-sidebar-contact-list,
.post-sidebar-hours {
    list-style: none;
    padding: 0;
    margin: 0;
}
.post-sidebar-contact-list li {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.65rem 0;
    font-size: 0.95rem;
    border-bottom: 1px dashed var(--color-border);
    color: var(--color-text);
}
.post-sidebar-contact-list li:last-child { border-bottom: 0; }
.post-sidebar-contact-list svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
    flex-shrink: 0;
}
.post-sidebar-contact-list a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
}
.post-sidebar-contact-list a:hover { color: var(--color-primary); }

.post-sidebar-hours li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--color-border);
    font-size: 0.92rem;
}
.post-sidebar-hours li:last-child { border-bottom: 0; }
.post-sidebar-hours strong {
    color: var(--color-text);
    font-family: var(--font-heading);
    flex-shrink: 0;
}
.post-sidebar-hours span {
    color: var(--color-text-soft);
    text-align: right;
}

@media (max-width: 1024px) {
    .single-post-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .single-post-sidebar { position: static; }
}
@media (max-width: 640px) {
    .single-post { padding: 3rem 0; }
    .single-post-content { font-size: 1.02rem; }
    .single-post-content > p:first-child { font-size: 1.08rem; padding: 1.1rem 1.25rem; }
    .single-post-footer { flex-direction: column; align-items: flex-start; }
    .post-hero-meta { gap: 0.5rem; }
    .post-hero-meta-item { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
}

/* Related posts */
.related-posts {
    background: var(--color-bg-soft);
    padding: 5rem 0;
}
.related-posts .section-header { margin-bottom: 2.5rem; }
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
    gap: 1.75rem;
}
.related-post-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 16px rgba(11, 37, 64, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: block;
    color: inherit;
    text-decoration: none;
}
.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 44px rgba(11, 37, 64, 0.13);
    color: inherit;
}
.related-post-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-bg-soft);
}
.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.related-post-card:hover .related-post-thumb img { transform: scale(1.06); }
.related-post-thumb-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}
.related-post-body { padding: 1.4rem 1.5rem 1.5rem; }
.related-post-meta {
    font-size: 0.82rem;
    color: var(--color-text-soft);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.related-post-meta svg { width: 13px; height: 13px; opacity: 0.7; }
.related-post-body h3 {
    font-size: 1.05rem;
    margin: 0 0 0.85rem;
    line-height: 1.4;
    color: var(--color-text);
}
.related-post-link {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.related-post-link svg { transition: transform 0.2s ease; }
.related-post-card:hover .related-post-link svg { transform: translateX(3px); }

/* Botón acento (naranja) usado en la sidebar CTA */
.btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: var(--color-accent);
    color: #fff;
    padding: 0.75rem 1.3rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-family: var(--font-heading);
    text-decoration: none;
    border: 0;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(200, 48, 42, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-accent:hover {
    background: var(--color-accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(200, 48, 42, 0.5);
}

/* ============ Lightbox ============ */
.jw-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: zoom-out;
}
.jw-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius);
    cursor: default;
}
.jw-lightbox-close,
.jw-lightbox-prev,
.jw-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 0;
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}
.jw-lightbox-close:hover,
.jw-lightbox-prev:hover,
.jw-lightbox-next:hover { background: rgba(255, 255, 255, 0.3); }
.jw-lightbox-close { top: 1rem; right: 1rem; }
.jw-lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.jw-lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.jw-lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.8);
    font-size: 0.88rem;
    background: rgba(0,0,0,0.5);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
}

/* ========================================================= */
/* ============ RESPONSIVE                           ============ */
/* ========================================================= */

/* Hamburguesa: solo en tablet/móvil (≤960px). En desktop siempre menú completo. */
@media (max-width: 960px) {
    .main-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 85%; max-width: 340px;
        height: 100vh;
        background: #fff;
        padding: 5rem 1.75rem 2rem;
        box-shadow: -8px 0 24px rgba(0,0,0,0.12);
        z-index: 1001;
        overflow-y: auto;
        display: block;
        transition: right 0.25s ease;
    }
    .main-nav.open { right: 0; }
    .main-nav ul { flex-direction: column; gap: 0; align-items: flex-start; }
    .main-nav li { width: 100%; border-bottom: 1px solid var(--color-border); }
    .main-nav a {
        display: block;
        padding: 0.9rem 0;
        font-size: 1rem;
        white-space: normal;
    }
    .menu-toggle { display: inline-flex; }
    .header-inner { gap: 1rem; justify-content: space-between; }
    .header-cta { padding-left: 0; border-left: 0; }

    /* Sub-menu en hamburguesa: en línea, con indentación */
    .main-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        box-shadow: none;
        border: 0;
        padding: 0 0 0 1rem;
        margin-bottom: 0.5rem;
        min-width: 0;
    }
    .main-nav .sub-menu li { border-bottom: 1px dashed var(--color-border); }
    .main-nav .sub-menu a { padding: 0.65rem 0; font-size: 0.95rem; }
    .main-nav li.menu-item-has-children > a::after {
        transform: rotate(45deg) translateY(0);
    }
    .main-nav li.menu-item-has-children::before { display: none; }
}

/* A partir de 960px se simplifica la topbar y se ocultan textos auxiliares */
@media (max-width: 960px) {
    .topbar { font-size: 0.78rem; }
    .topbar-right { display: none; }
    .topbar-inner { justify-content: center; }
    .topbar-left { justify-content: center; gap: 0.85rem; }

    .header-cta .header-phone span { display: none; }

    .hero { min-height: 60vh; padding: 3rem 0; }
    .hero h1 { font-size: clamp(1.7rem, 6vw, 2.5rem); }
    .hero-trust { gap: 1rem; }

    .section { padding: 3rem 0; }
    .section-header { margin-bottom: 2rem; }

    .page-content { padding: 2.5rem 0; }
}

/* Teléfono dentro del menú (sólo visible en hamburguesa) */
.nav-phone { display: none; }

/* Reglas específicas para desktop vs hamburguesa con el item Contacto */
@media (min-width: 961px) {
    /* Desktop: ocultar el último item del menú (Contacto) — ya hay btn-contacto fuera */
    .main-nav > ul > li:last-child { display: none; }
}

@media (max-width: 960px) {
    /* Hamburguesa: ocultar el btn-contacto del header; el Contacto se ve dentro del menú */
    .btn-contacto { display: none; }

    /* Contacto destacado dentro de la hamburguesa */
    .main-nav > ul > li:last-child {
        margin-top: 1rem;
        padding-top: 0;
    }
    .main-nav > ul > li:last-child > a {
        display: block;
        text-align: center;
        padding: 0.9rem 1.4rem !important;
        font-size: 1rem;
    }

    /* Teléfono debajo del botón Contacto (solo en hamburguesa) — tarjeta azul sólida */
    .nav-phone {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        margin-top: 0.9rem;
        padding: 1.1rem 1.25rem;
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
        border-radius: var(--radius);
        color: #fff;
        text-decoration: none;
        box-shadow: 0 6px 16px rgba(27, 78, 143, 0.28);
    }
    .nav-phone:hover {
        background: linear-gradient(135deg, var(--color-primary-dark) 0%, #002A85 100%);
        color: #fff;
        box-shadow: 0 10px 24px rgba(27, 78, 143, 0.4);
    }
    .nav-phone-icon {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.22);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        margin: 0 auto;
    }
    .nav-phone-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        line-height: 1.15;
        min-width: 0;
    }
    .nav-phone-text small {
        font-size: 0.72rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.8);
        text-transform: uppercase;
        letter-spacing: 0.8px;
        margin-bottom: 3px;
    }
    .nav-phone-text strong {
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 1.25rem;
        color: #fff;
        letter-spacing: 0.3px;
    }
}

@media (max-width: 640px) {
    .container { padding: 0 1rem; }
    .site-header > .container { padding-left: 1rem; padding-right: 1rem; }

    .hero { padding: 2.5rem 0; min-height: auto; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { width: 100%; }
    .hero-phone-block { justify-content: center; }

    .section { padding: 2.5rem 0; }
    .section-header { margin-bottom: 1.75rem; }

    .grid { gap: 1rem; }
    .service-card { padding: 1.4rem; }
    .feature-icon { width: 60px; height: 60px; font-size: 1.6rem; }

    .contact-info { gap: 1.25rem; margin-bottom: 2rem; }
    .contact-form { padding: 1.25rem; }
    .jw-form-grid { grid-template-columns: 1fr; gap: 1rem; }
    .jw-form-footer { flex-direction: column; align-items: stretch; gap: 1rem; }
    .jw-submit { width: 100%; }

    .cta-banner { padding: 2.5rem 0; }
    .cta-banner .btn { width: 100%; }

    .footer-grid { gap: 1.75rem; }
    .footer-col h4 { margin-bottom: 0.85rem; }

    .floating-cta { bottom: 1rem; right: 1rem; }
    .floating-btn { width: 50px; height: 50px; }

    .jw-lightbox { padding: 0.75rem; }
    .jw-lightbox-close { top: 0.5rem; right: 0.5rem; width: 40px; height: 40px; }
    .jw-lightbox-prev { left: 0.5rem; width: 40px; height: 40px; }
    .jw-lightbox-next { right: 0.5rem; width: 40px; height: 40px; }

    .topbar-left { flex-direction: column; gap: 0.3rem; text-align: center; }
    .topbar-item { justify-content: center; }
}

@media (max-width: 380px) {
    .hero-trust { gap: 0.75rem; }
    .hero-trust-item { font-size: 0.82rem; }
    .feature h3 { font-size: 1rem; }
    .service-card h3 { font-size: 1.1rem; }
}
