/* ================================================================
   CRITICAL.CSS — Estilos Above-The-Fold
   ================================================================ */
:root {
    --color-primary: #c0392b;
    /* Terracota Ladrillo */
    --color-secondary: #e67e22;
    /* Naranja Construcción */
    --color-accent: #f39c12;
    /* Amarillo Señalización */
    --color-bg: #f8f9fa;
    /* Blanco Roto Fondo */
    --color-bg-dark: #2c3e50;
    /* Gris Pizarra Oscuro (Construcción) */
    --color-surface: #ffffff;
    --color-text: #2b2b2b;
    --color-muted: #6c757d;

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

    --radius: 8px;
    /* Menos redondeado, más estilo "bloque" */
    --radius-sm: 4px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s 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%;
}

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 h4,
.bg-gradient-primary h1,
.bg-gradient-primary h2,
.bg-gradient-primary h3,
.bg-gradient-primary h4 {
    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.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    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: 40px;
    height: 40px;
}

.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: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--color-primary);
    color: white !important;
}

.btn-primary:hover {
    background: var(--color-bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

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

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

/* 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;
}

/* HERO SECTION (ABOVE THE FOLD) */
.hero {
    position: relative;
    padding: 50px 0 60px;
    background-color: var(--color-bg-dark);
    overflow: hidden;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(8, 15, 40, 0.45) 0%, rgba(8, 15, 40, 0.2) 100%);
    z-index: 1;
}

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

/* Imagen destacada dentro del contenido de artículos de blog
   (sobreescribe .hero-img que es para fondos absolutos de portada) */
.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;
}

.hero > .container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    max-width: 600px;
}

@media (min-width: 1024px) {
    .hero > .container {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

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

    .hero {
        padding: 40px 0 50px;
        text-align: center;
    }

    .hero-content p {
        margin: 0 auto 32px;
    }
}

/* 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;
    }
}
