/* Fuentes autoalojadas (sin Google Fonts) */
@font-face{font-family:'Sora';src:url('/fonts/sora-latin-var.woff2') format('woff2');font-weight:100 800;font-style:normal;font-display:swap}
@font-face{font-family:'Inter';src:url('/fonts/inter-latin-var.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
/* ================================================================
   CRITICAL.CSS — Estilos Above-The-Fold
   ================================================================ */
:root {
    /* Identidad "Azul Confianza" — marino + acero, minimalista */
    --color-primary: #2E6BB0;        /* Azul acero · acento / CTA */
    --color-primary-dark: #22507E;   /* Hover / estados activos */
    --color-secondary: #1D4E7A;      /* Azul profundo secundario */
    --color-accent: #E8A93C;         /* Dorado · estrellas / rating */
    --color-bg: #F5F7FA;             /* Blanco frío · fondo */
    --color-bg-dark: #0F2A43;        /* Marino · secciones oscuras */
    --color-surface: #ffffff;
    --color-text: #1C2530;
    --color-muted: #566072;
    --color-border: #E4E9F0;         /* Bordes hairline */

    --font-heading: 'Sora', system-ui, sans-serif;
    --font-base: 'Inter', system-ui, sans-serif;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    /* Sombras suaves, difusas y frías (look limpio) */
    --shadow-sm: 0 1px 2px rgba(15, 42, 67, 0.06);
    --shadow: 0 1px 2px rgba(15, 42, 67, 0.04), 0 12px 28px -14px rgba(15, 42, 67, 0.16);
    --shadow-lg: 0 24px 60px -24px rgba(15, 42, 67, 0.28);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1200px;
}

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

ul, ol {
    list-style: none;
}

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

img,
svg {
    display: block;
    max-width: 100%;
}

/* Guard: inline SVGs sized only by viewBox must never balloon to the 300×150
   UA default during the async styles.css load (FOUC). Class rules in styles.css
   override this via source order. */
svg:where(:not([width]):not([height])) {
    width: 1.5em;
    height: 1.5em;
}

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

/* Typography Base */
h1,
h2,
h3,
h4,
.brand-name {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--color-bg-dark);
}

h1, h2, h3, h4 {
    margin-bottom: 20px;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h3,
.bg-gradient-primary h1,
.bg-gradient-primary h2,
.bg-gradient-primary h3,
.bg-gradient-primary h3 {
    color: white !important;
}

/* Layout */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER BASE */
.header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-sub {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 600;
    font-family: var(--font-base);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* BOTONES GLOBALES & CTAs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--transition);
    border: 1.5px solid transparent;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--color-primary);
    color: white !important;
    box-shadow: 0 6px 16px -8px rgba(46, 107, 176, 0.6);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -10px rgba(15, 42, 67, 0.45);
}

.btn-whatsapp {
    background: #25D366;
    color: white !important;
    box-shadow: 0 6px 16px -8px rgba(37, 211, 102, 0.6);
}

.btn-whatsapp:hover {
    background: #1DA851;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -10px rgba(15, 66, 42, 0.45);
}

.btn-white {
    background: white;
    color: var(--color-bg-dark) !important;
    border: 1.5px solid white;
}

.btn-white:hover {
    background: transparent;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

/* SKIP LINK ACCESIBILITY */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    z-index: 1000;
}

.skip-link:focus {
    top: 20px;
}

/* ================================================================
   PAGE HERO — cabecera unificada de todo el sitio (above the fold)
   Un único componente con dos variantes:
     .page-hero--cta    → home + páginas de servicio (img/hero-cta.webp)
     .page-hero--title  → resto de secciones          (img/hero-title.webp)
   Mismo ancho (full-bleed) y misma altura en las 52 páginas.
   ================================================================ */
:root {
    --page-hero-h: 520px;
}

/* Altura fija (no min-height): garantiza la misma cabecera en todas las
   páginas aunque el texto de cada una tenga distinta longitud. */
.page-hero {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: var(--page-hero-h);
    padding: 48px 0;
    background-color: var(--color-bg-dark);
    color: #fff;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(8, 15, 40, 0.80) 0%, rgba(8, 15, 40, 0.55) 55%, rgba(8, 15, 40, 0.72) 100%);
}

.page-hero > .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.page-hero h1 {
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    line-height: 1.12;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    margin: 0 0 20px;
}

.page-hero-sub {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 62ch;
}

.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
}

.page-hero-badge svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--color-accent);
}

/* ---- Variante CTA: home + servicios ---- */
.page-hero--cta .page-hero-inner {
    max-width: 720px;
}

.page-hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.page-hero-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.page-hero-rating .stars {
    color: var(--color-accent);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* ---- Variante título: resto de secciones ---- */
.page-hero--title {
    text-align: center;
}

.page-hero--title .page-hero-inner {
    max-width: 820px;
    margin: 0 auto;
}

.page-hero--title .page-hero-sub {
    margin: 0 auto;
}

/* Migas dentro de la cabecera (artículos de blog) */
.page-hero-crumbs ol {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0 0 22px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.page-hero-crumbs a {
    color: inherit;
    text-decoration: none;
}

.page-hero-crumbs a:hover {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 768px) {
    :root {
        --page-hero-h: 580px;
    }

    .page-hero {
        padding: 40px 0;
    }

    .page-hero-sub {
        font-size: 1rem;
        line-height: 1.55;
    }

    .page-hero-badge {
        margin-bottom: 16px;
    }

    .page-hero h1 {
        margin-bottom: 14px;
    }

    .page-hero-ctas {
        margin-top: 24px;
    }

    .page-hero-rating {
        margin-top: 16px;
    }

    .page-hero--cta {
        text-align: center;
    }

    .page-hero--cta .page-hero-sub {
        margin: 0 auto;
    }

    .page-hero--cta .page-hero-ctas,
    .page-hero--cta .page-hero-rating {
        justify-content: center;
    }
}

/* Imagen destacada dentro del contenido de artículos de blog */
.article-img {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 450px !important;
    object-fit: cover !important;
    z-index: auto !important;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: block;
}

@media (max-width: 768px) {
    .header .container {
        height: 65px;
    }
}

/* Ocultar botón header en móvil para evitar empujar el menú hamburguesa fuera de la pantalla */
@media (max-width: 1023px) {
    .header-cta-desktop {
        display: none !important;
    }
}

/* ── BLOG · plantilla de artículo (consolidado desde los <style> inline de los posts) ── */
.article-header { background: #f8fafc; padding: 60px 0 40px; border-bottom: 1px solid #e5e7eb; }
.article-featured-img, .article-img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.article-content { max-width: 800px; margin: 0 auto; padding: 40px 20px; font-size: 1.1rem; }
.article-content h2 { margin: 40px 0 16px; color: var(--color-bg-dark); }
.article-content h3 { margin: 24px 0 12px; color: var(--color-bg-dark); }
.article-content p { margin-bottom: 20px; color: #4b5563; }
.article-content ul { margin-bottom: 24px; padding-left: 24px; color: #4b5563; }
.article-content li { margin-bottom: 8px; }
.article-tag { display: inline-block; background: var(--color-primary); color: #fff; font-size: .75rem; font-weight: 700; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; margin-bottom: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--color-primary); font-size: .9rem; text-decoration: none; margin-bottom: 24px; }
.back-link:hover { text-decoration: underline; }
.price-table { width: 100%; border-collapse: collapse; margin-bottom: 32px; }
.price-table th, .price-table td { padding: 12px; border: 1px solid #e5e7eb; text-align: left; }
.price-table th { background: #f3f4f6; font-weight: 700; }
.price-highlight { color: var(--color-primary); font-weight: 700; }
.blog-cta { background: var(--color-bg-dark); color: #fff; padding: 32px; border-radius: 8px; text-align: center; margin-top: 48px; }
.blog-cta h3 { color: #fff; margin-bottom: 16px; margin-top: 0; }
.blog-cta p { color: #f3f4f6; margin-bottom: 24px; }
