/* Feedback visual en clic de menú */
.menu-link.cta-button:active {
    opacity: 0.85;
    box-shadow: 0 0 0 2px rgba(113, 188, 58, 0.35);
    transition: box-shadow 0.2s, opacity 0.2s;
}

/* Mejor accesibilidad: focus visible */
.menu-link.cta-button:focus-visible {
    outline: 2px solid var(--accent-green-text);
    outline-offset: 2px;
}
/* Animación de apertura/cierre del menú hamburger */
/* Hamburger icon animation */
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
/* Hamburger menu styles - Refined */
.menu-toggle:focus-visible {
    outline: 2px solid var(--accent-green-text);
    outline-offset: 3px;
    border-radius: var(--radius-xs);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 2px solid transparent;
    cursor: pointer;
    margin-left: 1.2rem;
    z-index: 100;
    transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-toggle:hover {
    border-color: var(--accent-green);
}

.menu-toggle-bar {
    width: 28px;
    height: 4px;
    background: var(--accent-green-text);
    margin: 4px 0;
    border-radius: var(--radius-pill);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Utility Classes & Refinements */

/* Scroll-triggered stagger animation support */

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.tracking-tight { letter-spacing: -0.5px; }
.tracking-normal { letter-spacing: 0px; }
.tracking-wide { letter-spacing: 0.5px; }
.tracking-wider { letter-spacing: 1px; }

/* Display utilities */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* Spacing utilities (margin/padding) */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 2.5rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 2.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 2.5rem; }

/* Border utilities */
.border-neon { border: 2px solid var(--border-color); }
.border-accent { border: 2px solid var(--accent-green); }

.rounded-0 { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-xs); }
.rounded-md { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }

/* Shadow utilities */

/* Color utilities */


.border-success { border-color: var(--accent-success); }
.border-error { border-color: var(--accent-error); }
.border-warning { border-color: var(--accent-orange); }
.border-info { border-color: var(--secondary-blue); }

/* Transform utilities */

/* Transition utilities */
.transition-slow { transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); }

/* Accessibility Focus States */
:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

/* Reduced Motion Support */
/* Header shadow on scroll */
.header-shadow {
    box-shadow: 0 2px 16px rgba(30,188,156,0.13), 0 1px 4px rgba(0,0,0,0.07);
    transition: box-shadow 0.25s;
}

/* Menú activo */
.active-menu {
    border-bottom: 2px solid var(--accent-green);
    font-weight: 600;
    color: var(--accent-green-text);
    transition: color 0.2s ease, border-bottom 0.2s ease;
}

/* Animación de hover en menú */
.menu-link.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    border: none;
    background: none;
    padding: 0.5rem 0;
    box-shadow: none;
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 0.9rem;
}

.menu-link.cta-button:hover, .menu-link.cta-button:focus {
    color: var(--accent-green-text);
    border-bottom: 2px solid var(--accent-green);
    outline: none;
}

.menu-link.cta-button:active {
    opacity: 0.9;
}

/* Separadores y espaciado en menú */
nav.container #main-menu {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}
nav.container #main-menu li {
    position: relative;
}
nav.container #main-menu li:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 22px;
    background: var(--border-color);
    margin-left: 1.2rem;
    vertical-align: middle;
}

/* Accesibilidad: focus visible */
.menu-link.cta-button:focus-visible {
    outline: 2px solid var(--accent-green-text);
    outline-offset: 2px;
}
/* Variables de Color - Security-Focused Brutalist Refined */
:root {
    --primary-blue: #0d1b2aff;    /* Azul Oscuro de fondo */
    --secondary-blue: #00d4ff;    /* Cian vibrante para acentos */
    --accent-green: #71bc3aff;    /* Verde primario del logo */
    --accent-green-dark: #5a9c2c;     /* Verde oscuro para contrastes */
    --accent-green-light: #a1c293;    /* Verde claro/pálido */
    --accent-orange: #ff9800;     /* Naranja para alertas/warnings */
    --accent-error: #ff4757;      /* Rojo para errores */
    --accent-success: #71bc3aff;  /* Verde éxito */
    --text-light: #F8F9FA;        /* Blanco roto */
    --text-dark: #1a1a1a;         /* Negro profundo */
    --background-light: #FFFFFF;
    --paper-cool: #f5f7fa;      /* papel frio de secciones claras */
    --dark-bg: #0a0e1a;           /* Fondo más oscuro para contraste */
    --border-color: #00d4ff33;    /* Cian transparente para bordes */
    /* Derivados accesibles del verde de marca. #71bc3a se conserva para fondos,
       logo y secciones oscuras (7.42:1 sobre #0d1b2a); estos cubren los casos
       donde no alcanza el minimo WCAG AA. */
    --accent-green-text: #487f22; /* verde de texto sobre fondos claros (4.84:1) */
    --ink-on-green: #0d1b2a;      /* texto sobre el verde de marca (7.42:1) */
    --quote-teal: #0d6b57;        /* menta legible en citas (6.22:1) */
    /* Rampa neutra de texto sobre papel. Existia repartida en hex crudos
       (#555, #666, #444, #222, #343A40) sin nombre ni documentacion. */
    --text-body: #555555;         /* cuerpo secundario sobre papel (7.46:1) */
    --text-muted: #666666;        /* apoyo y pies de tarjeta (5.74:1) */
    --text-emphasis: #343a40;     /* enfasis dentro de cuerpo (10.6:1) */
    --border-neutral: #d9dee3;    /* filete neutro cuando el cian no aplica */
    --quote-tint: #eef8f3;        /* fondo de cita y aviso sobre papel */
    --text-lead: 1.08rem;         /* cuerpo de entradilla, un paso sobre el base */
    /* Forma: esquinas suaves y aire interior. */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-pill: 2rem;
    /* Elevacion ambiental: las superficies flotan en reposo y se elevan al interactuar. */
    --shadow-rest: 0 2px 12px rgba(13, 27, 42, 0.07);
    --shadow-raised: 0 12px 32px rgba(13, 27, 42, 0.12);
    /* Estados de formulario sobre la seccion oscura de contacto (#0d1b2a). */
    --field-border: #557a8f;      /* 3.33:1 sobre el campo, 3.78:1 sobre la seccion */
    --field-label: #f8f9fa;       /* 16.50:1 */
    --field-hint: #b3c2cf;        /*  9.55:1 */
    --state-error: #ff6b78;       /*  6.32:1 sobre oscuro */
    --state-ok: #8ed160;          /*  9.47:1 sobre oscuro */
    /* Altura real de la cabecera fija: gobierna el desplazamiento del hero y el
       salto de ancla. Se redefine donde cambia el tamano de la cabecera. */
    --header-h: 69px;
}
/* Fondo hero con imagen y overlay */
.hero-section {
    position: relative;
    background: url('Assets/Bacground.png') center center/cover no-repeat ;
    min-height: 420px;
    padding-top: 40px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    box-sizing: border-box;
}
.hero-logo, .hero-content {
    position: relative;
    z-index: 1;
}
/* --- QUIÉNES SOMOS SECTION - Dark & Premium --- */
.about-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-bg) 100%);
    color: var(--text-light);
    padding: 6rem 0;
    text-align: center;
    animation: fadeInUp 1s cubic-bezier(.77,0,.175,1) 0.7s both;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--accent-green);
    border-bottom: 1px solid var(--accent-green);
}
.about-title {
    font-size: clamp(1.55rem, 4.4vw, 2.8rem);
    font-weight: 800;
    color: var(--accent-green);
    margin-bottom: 2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.about-content {
    max-width: 900px;
    margin: 0 auto;
}
.about-text {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.8;
    font-weight: 400;
    letter-spacing: 0.4px;
    margin-bottom: 1.5rem;
}
.about-highlight {
    color: var(--accent-green);
    font-weight: 800;
    background: none;
    letter-spacing: 0.5px;
}

.about-section h3 {
    color: var(--accent-green);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
/* --- ANIMACIONES --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

/* Animación para ocultar el grid de servicios */
.services-hide {
    animation: fadeOutDown 0.35s forwards;
}

/* Detalle de servicio - Service detail view */
.service-detail {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-rest);
    /* El panel es un hijo más de la rejilla y ocupa la fila entera, para abrirse
       justo debajo de la tarjeta que se pulsó. La separación la pone el `gap`
       de la rejilla; un margen propio la duplicaría. */
    grid-column: 1 / -1;
    margin: 0 auto;
    max-width: 100%;
    padding: 3rem 2rem;
    z-index: 10;
    position: relative;
}

.service-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-green);
}

.service-detail-content {
    text-align: center;
}

.service-detail h3 {
    font-size: 2rem;
    margin: 1.2rem 0 0.7rem 0;
    color: var(--primary-blue);
    font-weight: 700;
}

.service-detail p {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: var(--text-body);
    line-height: 1.7;
}

.service-detail ul {
    text-align: left;
    margin: 0 auto 1.2rem auto;
    display: inline-block;
    font-size: 1rem;
    color: var(--text-emphasis);
    background: transparent;
    padding: 0;
}

.service-back {
    margin-top: 1.5rem;
    background: var(--accent-green);
    color: var(--background-light);
    border: none;
    border-radius: 0;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(13, 27, 42, 0.18);
    transition: all 0.25s ease;
    text-transform: none;
    letter-spacing: 0.3px;
}

.service-back:hover {
    background: var(--accent-green-dark);
    color: var(--background-light);
    box-shadow: 0 6px 18px rgba(13, 27, 42, 0.22);
    transform: translateY(-2px);
}

@keyframes logoFade {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animaciones - Section Reveals */
.hero-logo img {
    animation: logoFade 1s cubic-bezier(.77,0,.175,1) 0.2s both;
}

.hero-content {
    animation: slideInUp 1s cubic-bezier(.77,0,.175,1) 0.3s both;
}

.services-section,
.advantage-section,
.contact-section {
    animation: fadeInUp 1s cubic-bezier(.77,0,.175,1) 0.4s both;
}

.service-card,
.advantage-card {
    animation: scaleIn 0.6s cubic-bezier(.77,0,.175,1) backwards;
}

/* --- VENTAJAS SECTION - Premium Layout --- */
.advantage-section {
    background: linear-gradient(135deg, var(--background-light) 0%, var(--paper-cool) 100%);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    border-top: 2px solid var(--border-color);
}

.advantage-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.advantage-section h2 {
    font-size: clamp(1.55rem, 4.4vw, 2.8rem);
    margin-bottom: 3.5rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.advantage-card {
    background: var(--background-light);
    padding: 2.75rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-rest);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.advantage-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 40px 40px;
    border-color: transparent transparent var(--accent-green) transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.advantage-card:hover::after {
    opacity: 0.15;
}

.advantage-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-8px);
    box-shadow: var(--shadow-raised);
}

.advantage-card .icon {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 1.5rem;
    color: var(--accent-green-text);
}

.advantage-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: clamp(0.95rem, 0.5vw + 0.78rem, 1.1rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    overflow-wrap: break-word;
    hyphens: auto;
}

.advantage-card p {
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.6;
}
/* Header fijo superior - Brutalist refinement */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    background: var(--background-light);
    z-index: 1000;
    box-shadow: 0 4px 32px rgba(13, 27, 42, 0.12);
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--border-color);
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.98);
}

.main-header .container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-img {
    height: 48px;
    vertical-align: middle;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.logo-img:hover {
    opacity: 0.85;
}

.main-header #main-menu {
    display: flex;
    gap: 0.35rem;
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
}

.main-header .menu-link {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 2px solid transparent;
}

.main-header .menu-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-green-text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-header .menu-link:hover::before,
.main-header .menu-link:focus::before {
    transform: scaleX(1);
}

.main-header .menu-link:hover,
.main-header .menu-link:focus {
    background: transparent;
    color: var(--accent-green);
    transform: translateY(-2px);
}

.main-header .menu-link.active-menu {
    color: var(--accent-green-text);
    border-bottom: 2px solid var(--accent-green);
}

/* Ajuste de margen para el contenido principal */
.hero-section {
    margin-top: var(--header-h);
}


/* Base Global y Tipografía */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--background-light);
    letter-spacing: 0.3px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.25;
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    line-height: 1.3;
}

p {
    margin-bottom: 1.15em;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- HEADER & HERO SECTION - Brutalist Drama --- */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-bg) 100%);
    color: var(--text-light);
    padding: 3rem 0 5rem 0;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--accent-green);
    box-shadow: 0 8px 32px rgba(13, 27, 42, 0.3);
}


.hero-logo, .hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(1.85rem, 6.2vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.15;
    color: var(--text-light);
    text-wrap: balance;
    animation: slideInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    color: rgba(248, 249, 250, 0.95);
    line-height: 1.8;
    animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

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

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

/* CTA Button Styling - Brutalist Bold */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    background: var(--accent-green);
    color: var(--ink-on-green);
    padding: 0.85rem 2rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: none;
    box-shadow: 0 2px 8px rgba(13, 27, 42, 0.18);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transition: left 0.25s ease;
    z-index: -1;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: var(--accent-green-dark);
    box-shadow: 0 6px 18px rgba(13, 27, 42, 0.22);
    transform: translateY(-2px);
}

.cta-button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(13, 27, 42, 0.18);
}

/* --- SERVICIOS SECTION - Geometric Bold --- */
.services-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(to bottom, var(--background-light), var(--paper-cool));
    position: relative;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.services-section h2 {
    font-size: clamp(1.55rem, 4.4vw, 2.8rem);
    margin-bottom: 3.5rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.service-card {
    background: var(--background-light);
    padding: 2.75rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-rest);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-8px);
    box-shadow: var(--shadow-raised);
}

.icon {
    display: block;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0 auto 1.5rem;
    color: var(--accent-green-text);
}

.icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.service-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.service-card p {
    color: var(--text-body);
    font-size: 1rem;
    line-height: 1.7;
}

/* --- CONTACT SECTION - Dark & Bold --- */
.contact-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-bg) 100%);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    border-top: 1px solid var(--accent-green);
    border-bottom: 1px solid var(--accent-green);
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.contact-legend {
    margin-bottom: 2rem;
    color: rgba(248, 249, 250, 0.8);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.contact-form input,
.contact-form textarea {
    padding: 1.2rem;
    border: 1px solid var(--field-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.3px;
    position: relative;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(248, 249, 250, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--accent-green-text);
    outline-offset: 2px;
    border-color: var(--accent-green-text);
    background: rgba(113, 188, 58, 0.06);
}

/* El estado de validacion lo marca el JS tras el primer intento, no las
   pseudoclases nativas: :invalid es cierto desde que carga la pagina en todo
   campo required vacio, y pintaba de rojo un formulario que nadie ha tocado. */
.contact-form .is-valid {
    border-color: var(--accent-green);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
}

.contact-form button[type="submit"],
.contact-form button[type="submit"].cta-button {
    align-self: center;
    min-width: 200px;
}

/* Blog Section - Enhanced Styling */
.blog-section {
    padding: 2rem 0;
}

.blog-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.blog-post,
.blog-summary {
    padding: 2.75rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-rest);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.blog-post::before,
.blog-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-green);
}

.blog-post:hover,
.blog-summary:hover {
    border-color: var(--accent-green);
    box-shadow: 0 12px 40px rgba(113, 188, 58, 0.15);
    transform: translateY(-4px);
}

.blog-post h3,
.blog-summary h3 {
    font-size: 1.6rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-post p,
.blog-summary p {
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.blog-post ul,
.blog-summary ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.blog-post li,
.blog-summary li {
    margin-bottom: 0.7rem;
    color: var(--text-body);
    line-height: 1.6;
}

.blog-post blockquote,
.blog-summary blockquote {
    margin: 2rem 0;
}

.blog-post .cta-button,
.blog-summary .cta-button {
    margin-top: 1.5rem;
}

.summary-content {
    margin-left: 0;
}

/* ═══ Precios ═════════════════════════════════════════════════════════════
   Hoja de tarifas, no rejilla de tarjetas: el patron de tarjeta ya es de la
   seccion de servicios. Cada fila enfrenta lo que se compra con lo que cuesta,
   separadas por el filete neutro; la cifra es lo unico verde de la seccion,
   porque es lo que el visitante viene a mirar. */
.pricing-section {
    padding: 6rem 0;
    background: linear-gradient(to bottom, var(--paper-cool), var(--background-light));
    border-top: 1px solid var(--accent-green);
}

.pricing-section h2 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

/* Toda la seccion se alinea a la izquierda, como la de articulos: una hoja de
   tarifas se lee como documento, y mezclar titulo a la izquierda con entradilla
   centrada delata que nadie decidio la alineacion. */
.pricing-lead {
    max-width: 62ch;
    margin: 0 0 2.75rem;
    color: var(--text-body);
    font-size: var(--text-lead);
    line-height: 1.7;
}

.pricing-list {
    margin: 0 0 2rem;
    padding: 0;
    text-align: left;
}

.pricing-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border-neutral);
}

.pricing-row:last-child {
    border-bottom: none;
}

/* El diagnostico es la conversion de la pagina: se separa del resto con el
   mismo tinte que ya usan las citas, sin inventar un color nuevo. */
.pricing-row.is-free {
    margin-bottom: 0.5rem;
    padding: 1.75rem;
    background: var(--quote-tint);
    border: 1px solid var(--border-neutral);
    border-radius: var(--radius-md);
}

.pricing-row dt {
    flex: 1 1 22rem;
    min-width: 0;
}

.pricing-row dd {
    margin: 0;
}

.pricing-name {
    display: block;
    color: var(--text-dark);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

.pricing-detail {
    display: block;
    max-width: 56ch;
    margin-top: 0.4rem;
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pricing-figure {
    flex: 0 0 auto;
    color: var(--accent-green-text);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    /* Las cifras alineadas piden ancho uniforme; si no, los digitos bailan. */
    font-variant-numeric: tabular-nums;
}

.pricing-unit {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: normal;
}

.pricing-note {
    max-width: 62ch;
    margin: 0 0 2rem;
    color: var(--text-emphasis);
    font-size: 0.98rem;
    line-height: 1.7;
}

@media (max-width: 700px) {
    .pricing-row,
    .pricing-row.is-free {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    /* En columna, el flex-basis de 22rem deja de ser ancho y pasa a ser altura:
       sin esto el dt mide 352px y empuja la cifra fuera de la vista. */
    .pricing-row dt {
        flex: 0 1 auto;
    }

    .pricing-figure {
        white-space: normal;
    }
}

/* --- FOOTER - Refined Dark --- */
footer {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 3rem 0 2rem;
    font-size: 1rem;
    border-top: 2px solid var(--accent-green);
    letter-spacing: 0.5px;
}

footer p {
    margin: 0;
    font-weight: 500;
}

/* Acento sobre fondos claros: el verde de marca no llega a 3:1 sobre blanco. */
.accent-color {
    color: var(--accent-green-text);
}

/* Sobre fondo oscuro el verde de marca da 7.42:1 y se conserva intacto. */
.about-section .accent-color,
.hero-section .accent-color {
    color: var(--accent-green);
}

    .img_blob {
        width: 100%;
        max-width: 520px;
        height: auto;
        object-fit: cover;
        object-position: center;
        margin: 0 auto 1.5rem auto;
        display: block;
        overflow: hidden;
        border: 2px solid var(--border-color);
        box-shadow: 0 8px 32px rgba(113, 188, 58, 0.15);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        position: relative;
    }
    
    .img_blob:hover {
        box-shadow: 0 10px 32px rgba(13, 27, 42, 0.16);
    }

/* ═══ Controles y estados anadidos en harden ══════════════════════════════ */

/* La rejilla no se oculta al abrir un panel: comparar dos servicios no deberia
   obligar a salir, recordar el primero y volver a entrar. La tarjeta abierta se
   marca en su lugar. */
.service-card:has(.service-toggle[aria-expanded="true"]) {
    border-color: var(--accent-green-text);
    box-shadow: var(--shadow-raised);
}

/* La tarjeta anuncia que se puede abrir; el control real es el <button>. */
.service-card {
    cursor: pointer;
}

.service-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border: none;
    background: none;
    color: var(--accent-green-text);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: gap 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-toggle:hover {
    gap: 0.7rem;
}

.service-toggle:focus-visible,
.service-detail:focus-visible,
.service-sibling:focus-visible,
.service-back:focus-visible {
    outline: 2px solid var(--accent-green-text);
    outline-offset: 3px;
}

.service-toggle-arrow {
    width: 1.05em;
    height: 1.05em;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-toggle[aria-expanded="true"] .service-toggle-arrow {
    transform: rotate(90deg);
}

.service-detail-list {
    margin: 1.5rem 0;
    padding-left: 1.4rem;
    text-align: left;
    color: var(--text-emphasis);
    line-height: 1.65;
}

.service-detail-list li {
    margin-bottom: 0.9rem;
    padding-left: 0.3rem;
}

.service-detail-list strong {
    color: var(--primary-blue);
}

.service-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.service-back {
    min-height: 44px;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--primary-blue);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-back:hover {
    border-color: var(--accent-green-text);
}

/* Ir de un servicio a otro sin volver a la rejilla y perder el hilo. */
.service-detail-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.service-sibling {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border: none;
    background: none;
    color: var(--accent-green-text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.service-sibling:hover {
    background: rgba(113, 188, 58, 0.08);
}

/* ── Formulario: etiqueta visible, pista, contador y error junto al campo ── */
.contact-form .field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
}

.contact-form label {
    color: var(--field-label);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.field-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    margin: 0;
    color: var(--field-hint);
    font-size: 0.85rem;
}

.field-count {
    font-variant-numeric: tabular-nums;
}

.field-error {
    margin: 0;
    min-height: 0;
    color: var(--state-error);
    font-size: 0.85rem;
    line-height: 1.45;
}

.field-error:empty {
    display: none;
}

.contact-form .is-invalid {
    border-color: var(--state-error);
}

/* Un campo en error enfocado no puede senalar rojo y verde a la vez: el verde
   significa "correcto" en este mismo sistema. */
.contact-form .is-invalid:focus {
    outline-color: var(--state-error);
    border-color: var(--state-error);
}

.form-status {
    margin: 0;
    min-height: 1.4em;
    font-size: 0.92rem;
    font-weight: 500;
}

.form-status.is-error {
    color: var(--state-error);
}

.form-status.is-ok {
    color: var(--state-ok);
}

.contact-form button[type="submit"][disabled] {
    opacity: 0.7;
    cursor: progress;
}

/* ═══ Copy de conversion (clarify) ════════════════════════════════════════ */

/* Las tres razones que responden al miedo de entregar el codigo a un tercero.
   Van pegadas al boton porque es ahi donde aparece la duda. */
.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: flex-start;
    width: fit-content;
    max-width: min(46rem, 100%);
    margin: 1.5rem auto 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(248, 249, 250, 0.86);
}

.trust-strip li {
    position: relative;
    padding-left: 1.4rem;
    text-align: left;
}

/* La marca de verificacion es decorativa: el texto ya dice todo. */
.trust-strip li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.42em;
    width: 0.62rem;
    height: 0.34rem;
    border-left: 1.5px solid var(--accent-green);
    border-bottom: 1.5px solid var(--accent-green);
    transform: rotate(-45deg);
}

.trust-strip--dark {
    margin-bottom: 2rem;
}

/* Cifra con su fuente a la vista: sin atribucion no es un dato, es una promesa. */
.cited-note {
    max-width: 42rem;
    margin: 0 auto 2rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(248, 249, 250, 0.78);
}

.cited-note cite {
    font-style: normal;
    color: rgba(248, 249, 250, 0.6);
}

/* ── Pie de pagina con canales reales ── */
.site-footer {
    text-align: left;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

.site-footer-col h2 {
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-green);
}

.site-footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.95rem;
    line-height: 1.5;
    letter-spacing: 0;
}

/* Los enlaces del pie tambien cumplen el minimo tactil de 44px: el area crece
   con relleno, sin agrandar el texto. */
.site-footer-col li {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: rgba(248, 249, 250, 0.85);
}

/* Distingue el celular del fijo sin gritar: el numero es lo que se toca, la
   etiqueta solo desambigua. Hereda el tamano del pie y baja de opacidad. */
.site-footer-nota {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: rgba(248, 249, 250, 0.55);
}

.site-footer-col a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: rgba(248, 249, 250, 0.85);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-footer-col a:hover {
    color: var(--text-light);
    border-bottom-color: var(--accent-green);
}

.site-footer-col a:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 3px;
}

.site-footer-legal a {
    color: var(--accent-green);   /* 7.42:1 sobre la tinta del pie */
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer-legal a:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 3px;
}

.site-footer-legal {
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(248, 249, 250, 0.14);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(248, 249, 250, 0.68);
}

/* ═══ Proceso y publicaciones (distill) ══════════════════════════════════ */

.about-lede {
    max-width: 44rem;
    margin: 0 auto 3.5rem;
}

/* El proceso es una secuencia: los numeros llevan informacion, no decoran. */
.process-steps {
    counter-reset: fase;
    display: grid;
    /* Minimo bajo a proposito: el proceso puede tener 3, 4 o 5 fases y ninguna
       debe quedar huerfana en su propia fila. */
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 2.5rem 2.25rem;
    max-width: 60rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    text-align: left;
}

.process-steps li {
    counter-increment: fase;
    position: relative;
    padding-top: 2.25rem;
}

.process-steps li::before {
    content: counter(fase);
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-green);
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(113, 188, 58, 0.35);
    min-width: 2.5rem;
}

.process-steps h3 {
    /* Reserva dos lineas para que el cuerpo de todas las fases arranque a la
       misma altura aunque un titulo sea mas largo que los demas. */
    line-height: 1.35;
    min-height: 2.7em;   /* exactamente dos lineas de ese line-height */
    margin: 0 0 0.5rem;
    font-size: var(--text-lead);
    color: var(--text-light);
}

.process-steps p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.65;
    color: rgba(248, 249, 250, 0.78);
}

/* Los tres datos que el comprador vino a buscar, sin convertirlos en metricas
   decorativas: son definiciones, no un marcador de cifras. */
.process-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.75rem 3rem;
    max-width: 60rem;
    margin: 4rem auto 0;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(248, 249, 250, 0.14);
    text-align: left;
}

.process-facts dt {
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-green);
}

.process-facts dd {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* ── Publicaciones: una lista, no una tercera rejilla de tarjetas ── */
.writing-section {
    padding: 6rem 0;
    background: linear-gradient(to bottom, var(--paper-cool), var(--background-light));
    border-top: 1px solid var(--accent-green);
}

.writing-section h2 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.writing-lede {
    max-width: 40rem;
    margin: 0 0 3rem;
    color: var(--text-body);
    font-size: 1.05rem;
    line-height: 1.65;
}

.writing-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border-color);
}

.writing-list li {
    border-bottom: 1px solid var(--border-color);
}

.writing-list a {
    display: block;
    padding: 1.75rem 0;
    color: inherit;
    text-decoration: none;
    transition: padding-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.writing-list a:hover {
    padding-left: 0.75rem;
}

.writing-list a:focus-visible {
    outline: 2px solid var(--accent-green-text);
    outline-offset: 4px;
}

.writing-list h3 {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
    color: var(--primary-blue);
}

.writing-list a:hover h3 {
    color: var(--accent-green-text);
}

.writing-list p {
    max-width: 52rem;
    margin: 0;
    color: var(--text-body);
    line-height: 1.6;
}

.writing-more {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 2.5rem;
    color: var(--accent-green-text);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.writing-more:focus-visible {
    outline: 2px solid var(--accent-green-text);
    outline-offset: 3px;
}

/* ═══ Patrones de articulo extraidos (extract) ═══════════════════════════
   Estaban repetidos como atributos style= en cada articulo, con la paleta y
   la escala escritas a mano en cada uso. */

.hero-lede {
    max-width: 46rem;
    margin: 0 auto 1rem;
    color: rgba(248, 249, 250, 0.95);
    font-size: var(--text-lead);
    line-height: 1.8;
}

.article-list {
    margin: 1.5rem 0 1.5rem 1.5rem;
    color: var(--text-emphasis);
    font-size: var(--text-lead);
    line-height: 1.8;
}

.article-list li {
    margin-bottom: 0.6rem;
}

.article-callout {
    margin: 0 0 1.2rem;
    padding: 1.25rem 1.5rem;
    background: var(--quote-tint);
    border-left: 1px solid var(--accent-green-text);
    border-radius: var(--radius-xs);
    color: var(--quote-teal);
    font-weight: 500;
    line-height: 1.65;
}

blockquote.article-callout {
    font-style: italic;
}

.hero-logo-img {
    height: 120px;
    max-width: 90vw;
}

.hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
}

/* ═══ Página legal ════════════════════════════════════════════════════════
   Documento largo: lo que importa es la medida de línea y la jerarquía, no
   la decoración. */

.legal-section {
    padding: 5rem 0 6rem;
    background: linear-gradient(to bottom, var(--paper-cool), var(--background-light));
}

.legal-content {
    /* Medida en ch, que es lo que el sistema fija en caracteres (65-75) y no en
       pixeles: 46rem daban unos 92 por linea. */
    max-width: 70ch;
}

.legal-content h2 {
    margin: 3rem 0 1rem;
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    line-height: 1.3;
    color: var(--primary-blue);
    text-transform: none;
    letter-spacing: -0.2px;
}

.legal-content h2:first-of-type {
    margin-top: 1rem;
}

.legal-content h3 {
    margin: 2rem 0 0.75rem;
    font-size: 1.1rem;
    color: var(--accent-green-text);
}

.legal-content p {
    margin: 0 0 1.15rem;
    color: var(--text-body);
    line-height: 1.75;
}

.legal-content a:not(.cta-button) {
    /* Verde un paso mas oscuro que el de titulos: el degradado de fondo dejaba
       el token normal en 4.47:1, dos centesimas por debajo del minimo. */
    color: #43761f;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-content a:focus-visible {
    outline: 2px solid var(--accent-green-text);
    outline-offset: 3px;
}

.legal-content strong {
    color: var(--text-emphasis);
}

.legal-content .article-list {
    margin-left: 1.25rem;
    font-size: 1rem;
    line-height: 1.75;
}

.legal-updated {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
    color: var(--text-muted);
}

.legal-back {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* El campo trampa se saca de la vista sin display:none, porque algunos bots
   ignoran los campos ocultos de esa forma pero sí rellenan los posicionados. */
.campo-trampa {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Consentimiento junto al botón: la ley pide que se vea antes de enviar. */
.form-consent {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--field-hint);
}

.form-consent a {
    color: var(--accent-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-consent a:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

/* ═══ Adaptaciones responsive ═══════════════════════════════════════════
   Van al final a proposito: son max-width, asi que deben venir DESPUES de
   las reglas base para poder ganarles, y de mas ancho a mas estrecho para
   que el punto de quiebre menor tenga la ultima palabra. */

@media (max-width: 900px) {
    nav.container #main-menu {
        opacity: 0;
        transform: translateY(-16px);
        transition: opacity 0.35s, transform 0.35s;
        pointer-events: none;
    }
    nav.container #main-menu.menu-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    nav.container #main-menu {
        position: absolute;
        top: 64px;
        right: 0;
        background: var(--background-light);
        box-shadow: 0 8px 32px rgba(113, 188, 58, 0.15);
        border-radius: 0 0 12px 12px;
        border: 2px solid var(--border-color);
        border-top: none;
        flex-direction: column;
        gap: 0;
        width: 240px;
        padding: 1.5rem 0;
        display: none;
        z-index: 99;
    }
    
    nav.container #main-menu.menu-open {
        display: flex;
    }
    
    nav.container #main-menu li {
        margin: 0.5rem 0;
    }
    
    nav.container #main-menu li:not(:last-child)::after {
        display: none;
    }
    
    nav.container #main-menu li a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.8rem 1.5rem;
        width: 100%;
    }

    /* En una lista apilada el subrayado no lee como foco: lee como separador.
       Aqui el estado se marca con fondo y un contorno real. */
    #main-menu .menu-link::before {
        display: none;
    }

    #main-menu .menu-link.cta-button:hover,
    #main-menu .menu-link.cta-button:focus,
    #main-menu .menu-link.active-menu {
        border-bottom: none;
        background: rgba(113, 188, 58, 0.10);
    }

    #main-menu .menu-link:focus-visible {
        outline: 2px solid var(--accent-green-text);
        outline-offset: -2px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .service-grid,
    .advantage-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .blog-post,
    .blog-summary {
        padding: 1.5rem;
    }
    
    .blog-post h3,
    .blog-summary h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 600px) {
    :root {
        font-size: 15px;
        --header-h: 65px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .services-section,
    .advantage-section,
    .about-section,
    .writing-section,
    .legal-section,
    .contact-section {
        padding: 3rem 0;
    }
    
    .service-card,
    .advantage-card {
        padding: 1.5rem;
    }
    
    .contact-form {
        max-width: 100%;
    }
    
    .img_blob {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Se elimina el desplazamiento, no el feedback: las transiciones de color y
       foco siguen vivas para que hover, focus y estado activo se sigan leyendo. */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        scroll-behavior: auto !important;
        transition-property: color, background-color, border-color, outline-color, opacity !important;
        transition-duration: 0.15s !important;
    }
}

/* Entrada por tacto: sin hover fiable y con dianas mas generosas. */
@media (hover: none) {
    .service-card:hover,
    .advantage-card:hover,
    .blog-post:hover,
    .blog-summary:hover {
        transform: none;
        box-shadow: var(--shadow-rest);
    }

    .cta-button:hover {
        transform: none;
    }
}

@media (pointer: coarse) {
    .menu-link.cta-button {
        min-height: 48px;
    }

    .cta-button {
        min-height: 48px;
        padding: 1rem 2rem;
    }
}

/* Muescas y esquinas redondeadas: el contenido no se mete bajo el sistema. */
@supports (padding: max(0px)) {
    .main-header,
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    footer {
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
}

/* Movil apaisado: la cabecera fija se come demasiado alto util. */
@media (max-height: 480px) and (orientation: landscape) {
    :root {
        --header-h: 56px;
    }

    .hero-section {
        min-height: auto;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .hero-logo img {
        height: 64px;
    }

    .logo-img {
        height: 36px;
    }
}
