/* Variables de diseño */
:root {
    --bg: #ffffff;
    --bg-soft: #f4f6f8;
    --text: #0f1419;
    --muted: #5b6670;
    --line: rgba(15, 20, 25, 0.1);
    --line-strong: rgba(15, 20, 25, 0.24); /* bordes de inputs y filtros: contraste 3:1 */
    --accent: #008fc3; /* Azul corporativo Imagen 59 */
    --accent-dark: #00729c;
    --radius: 18px; /* Regla de formas: botones y filtros pill, tarjetas 18px, inputs 12px */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --gutter: clamp(1rem, 4vw, 3.5rem);
    --max: 1320px;
    /* Regla: todo el contenido (header, hero, secciones, footer) alinea al ancho de .container.
       Los fondos pueden ir a ancho completo; el contenido usa este padding lateral. */
    --edge: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.accent { color: var(--accent); }

/* Tipografía */
h1, h2, h3 { font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }

.section-label, .eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.8rem;
    border-radius: 999px;
    font: 600 1rem var(--font);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.4s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active, .filter-btn:active { transform: scale(0.98); }
.btn span { transition: transform 0.4s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-light { background: #fff; color: var(--accent); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--text); }

/* Navbar: siempre blanca; al scrollear se compacta y suma una línea */
.navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--edge);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.4s, padding 0.4s var(--ease);
}
.navbar.scrolled { box-shadow: 0 1px 0 var(--line); padding-block: 0.6rem; }
.logo { display: block; }
.logo img { height: 48px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2.2rem; list-style: none; }
.nav-links a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }

/* Submenú de Servicios: se abre con hover o con foco de teclado */
.has-sub { position: relative; }
.has-sub > a::after {
    content: "";
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin-left: 0.45em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.2em) rotate(45deg);
    transition: transform 0.3s var(--ease);
}
.has-sub:hover > a::after, .has-sub:focus-within > a::after { transform: translateY(0) rotate(225deg); }
.submenu {
    position: absolute;
    top: calc(100% + 0.9rem);
    left: -1.1rem;
    min-width: 250px;
    list-style: none;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 60, 85, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
}
.submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -1rem; height: 1rem; } /* puente para no perder el hover */
.has-sub:hover .submenu, .has-sub:focus-within .submenu, .has-sub.open .submenu { opacity: 1; visibility: visible; transform: none; }
.has-sub.open > a::after { transform: translateY(0) rotate(225deg); }
.submenu a { display: block; padding: 0.65rem 0.9rem; border-radius: 10px; white-space: nowrap; }
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--bg-soft); color: var(--accent); }
.nav-links .nav-cta {
    padding: 0.6rem 1.3rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    transition: background 0.3s;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); color: #fff; }

.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}
.menu-btn span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--text);
    transition: transform 0.4s var(--ease);
}
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero: fondo a pantalla completa debajo del header; el contenido respeta el ancho de .container */
.hero {
    --nav-h: 80px;
    position: relative;
    padding-top: var(--nav-h);
    color: #fff;
}
.hero-box {
    position: relative;
    isolation: isolate;
    min-height: clamp(480px, 70svh, 700px); /* deja asomar la sección siguiente */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--edge);
    overflow: hidden;
}
.hero-slideshow, .hero-overlay { z-index: -1; }
.hero-slideshow, .hero-overlay { position: absolute; inset: 0; }
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1.5s ease, transform 7s linear;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
/* Azul de marca a la izquierda para el texto; la foto se ve a la derecha */
.hero-overlay {
    background:
        linear-gradient(90deg, rgba(0, 143, 195, 0.95) 0%, rgba(0, 143, 195, 0.88) calc(var(--edge) + 680px), rgba(0, 143, 195, 0.25) calc(var(--edge) + 1050px), transparent 100%),
        linear-gradient(0deg, rgba(0, 60, 85, 0.35) 0%, transparent 35%);
}
.hero-content, .hero-bottom { position: relative; z-index: 2; }
.hero-content { max-width: 720px; margin-bottom: 2.5rem; }
.nav-sentinel { position: absolute; top: 24px; height: 1px; width: 1px; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.hero h1 {
    font-size: clamp(2.4rem, 4.6vw, 4.25rem); /* 3 líneas máx. dentro de la caja */
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
    margin-bottom: 1.75rem;
}
/* más específico que .hero-content > :nth-child(2) para que no le pise los delays */
.hero .hero-content h1 {
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.45), 0 0 44px rgba(0, 194, 212, 0.55);
    animation: rise 1s var(--ease) 0.12s both, neon-on 1.8s 1s both;
}
/* Parpadeo de tubo que arranca, una sola vez (el oficio de la casa) */
@keyframes neon-on {
    0%, 8% { opacity: 0.28; text-shadow: none; }
    10% { opacity: 1; text-shadow: 0 0 18px rgba(255, 255, 255, 0.45), 0 0 44px rgba(0, 194, 212, 0.55); }
    13% { opacity: 0.35; text-shadow: none; }
    19% { opacity: 1; text-shadow: 0 0 18px rgba(255, 255, 255, 0.45), 0 0 44px rgba(0, 194, 212, 0.55); }
    23% { opacity: 0.5; text-shadow: none; }
    34%, 100% { opacity: 1; text-shadow: 0 0 18px rgba(255, 255, 255, 0.45), 0 0 44px rgba(0, 194, 212, 0.55); }
}

/* Entrada del hero: eyebrow, título, bajada y botones en secuencia */
.hero-content > * { animation: rise 1s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: 0.12s; }
.hero-content > :nth-child(3) { animation-delay: 0.24s; }
.hero-content > :nth-child(4) { animation-delay: 0.36s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
.hero-content p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 560px; opacity: 0.92; margin-bottom: 2.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}
.hero-dots { display: flex; gap: 0.5rem; }
.hero-dots span { width: 28px; height: 3px; background: rgba(255, 255, 255, 0.35); border-radius: 2px; transition: background 0.4s, width 0.4s var(--ease); }
.hero-dots span.active { background: #fff; width: 48px; }

/* Nosotros */
.about-section { padding: clamp(5rem, 12vw, 9rem) 0; }
.statement { font-size: clamp(2rem, 4.6vw, 3.8rem); max-width: 1000px; margin-bottom: clamp(3rem, 6vw, 5rem); }
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-text p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.25rem; }
.about-text strong { color: var(--text); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2.5rem; }
.stat { display: flex; flex-direction: column; }
.about-text .stat strong { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--accent); }
.stat strong::after { content: "+"; }
.stat span { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }

.process { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.process li { background: var(--bg); padding: 1.75rem; transition: background 0.3s; }
.process li:hover { background: var(--bg-soft); }
.process span { font-size: 0.8rem; font-weight: 600; color: var(--accent); letter-spacing: 0.1em; }
.process h3 { font-size: 1.5rem; margin: 0.75rem 0 0.4rem; }
.process p { color: var(--muted); font-size: 0.95rem; }

/* Cabecera de sección (título + bajada a la derecha) */
.section-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head > p { max-width: 65ch; color: var(--muted); font-size: 1.1rem; margin-top: 1rem; }

/* Servicios */
.services-section, .cta-section {
    background-color: var(--bg-soft);
    background-image: radial-gradient(rgba(0, 143, 195, 0.14) 1px, transparent 1.3px);
    background-size: 22px 22px;
}
.services-section { padding: clamp(5rem, 10vw, 8rem) 0; }
.services-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.service-card {
    position: relative;
    aspect-ratio: 3 / 4.4;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    isolation: isolate;
}
.service-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.8s var(--ease); }
.service-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(0, 40, 60, 0.85) 100%); transition: background 0.4s; }
.service-card:hover img { transform: scale(1.07); }
.service-card:hover::before { background: linear-gradient(180deg, rgba(0, 143, 195, 0.2) 0%, rgba(0, 110, 150, 0.92) 100%); }
.service-info { position: absolute; inset: auto 0 0; padding: 1.4rem; }
.service-count { font-size: 0.85rem; font-weight: 500; opacity: 0.85; }
.service-info h3 { font-size: 1.45rem; margin: 0.35rem 0 0.5rem; }
.service-info p { font-size: 0.88rem; line-height: 1.45; opacity: 0.88; }

/* Porfolio */
.portfolio-section { padding: clamp(5rem, 10vw, 8rem) 0; }
.filter-container { display: flex; gap: 0.6rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    cursor: pointer;
    font: 500 0.9rem var(--font);
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.filter-btn:hover { border-color: var(--text); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Mosaico: cada bloque de 12 = 1 grande + 1 alto + 10 chicos = grilla de 4×4 llena */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    gap: 1rem;
}
.portfolio-item:nth-child(12n + 1) { grid-column: span 2; grid-row: span 2; }
.portfolio-item:nth-child(12n + 6) { grid-row: span 2; }
.portfolio-item.hidden,
.portfolio-grid.collapsed .portfolio-item:nth-child(n + 13) { display: none; }

.portfolio-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-soft);
    text-decoration: none;
    color: #fff;
}
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.portfolio-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 40, 60, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.4s;
}
.item-info {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding: 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.5s var(--ease), opacity 0.4s;
}
.item-info strong { font-size: 1.1rem; line-height: 1.2; }
.item-info small { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; margin-top: 0.3rem; }
.portfolio-item:hover img, .portfolio-item:focus-visible img { transform: scale(1.05); }
.portfolio-item:hover::after, .portfolio-item:focus-visible::after,
.portfolio-item:hover .item-info, .portfolio-item:focus-visible .item-info { opacity: 1; transform: none; }
/* En pantallas táctiles no hay hover: el título se ve siempre */
@media (hover: none) {
    .portfolio-item::after, .item-info { opacity: 1; transform: none; }
}
.portfolio-more { text-align: center; margin-top: 3rem; }

/* Lightbox */
.lightbox {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border: none;
    background: rgba(255, 255, 255, 0.97);
    padding: clamp(1rem, 4vw, 3rem);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: 1rem; max-width: 100%; }
.lightbox img { max-width: min(1100px, 100%); max-height: calc(100vh - 9rem); border-radius: 12px; object-fit: contain; }
.lightbox figcaption { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lightbox figcaption strong { font-size: 1.2rem; }
.lightbox figcaption span { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.lb-close, .lb-nav {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}
.lb-close:hover, .lb-nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.lb-close { position: absolute; top: 1.25rem; right: 1.25rem; }

/* Clientes */
.clients-section { padding: clamp(4rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); overflow: hidden; }
.clients-section h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 3rem; }
.clients-marquee {
    width: calc(100% - 2 * var(--gutter));
    max-width: calc(var(--max) - 2 * var(--gutter));
    margin: 0 auto;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.clients-track { display: flex; gap: clamp(2.5rem, 5vw, 4.5rem); width: max-content; animation: marquee 45s linear infinite; }
.clients-marquee:hover .clients-track { animation-play-state: paused; }
.clients-track { align-items: center; }
/* Logos en gris parejo; al pasar el mouse, color original.
   ponytail: grayscale en vez de brightness(0) porque no hay versiones monocromáticas
   (Starbucks, Burger King o Cinemark quedarían como manchas). */
.clients-track img {
    flex-shrink: 0;
    filter: grayscale(1) contrast(1.15) opacity(0.55);
    transition: filter 0.4s;
}
.clients-track img:hover { filter: none; }
@keyframes marquee { to { transform: translateX(calc(-50% - clamp(1.25rem, 2.5vw, 2.25rem))); } }

/* Contacto */
/* CTA del home: lleva a contacto.html */
.cta-section { padding: clamp(4.5rem, 9vw, 7rem) 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem 4rem; flex-wrap: wrap; }
.cta-inner p { color: var(--muted); font-size: 1.15rem; margin-top: 1rem; max-width: 52ch; }
.btn-lg { padding: 1.2rem 2.2rem; font-size: 1.1rem; }

/* Página de contacto */
.contact-page { padding: calc(80px + clamp(3rem, 7vw, 5rem)) 0 clamp(4rem, 8vw, 6rem); }
.contact-intro { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.contact-intro h1 { font-size: clamp(2.6rem, 5.5vw, 4.5rem); }
.contact-intro p { color: var(--muted); font-size: 1.15rem; margin-top: 1rem; max-width: 60ch; }
.contact-form select {
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: var(--bg-soft);
    color: var(--text);
    font: 400 1rem var(--font);
}
.contact-form select:focus { outline: none; border-color: var(--accent); background: #fff; }
.optional { font-weight: 400; color: var(--muted); }
.map-wrap { margin-top: 2rem; }
.map-wrap iframe { display: block; width: 100%; height: clamp(300px, 32vw, 400px); border: 0; border-radius: var(--radius); background: var(--bg-soft); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.contact-lead { color: var(--muted); font-size: 1.1rem; margin: 1.25rem 0 2.5rem; max-width: 440px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; }
.contact-list li { display: flex; flex-direction: column; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.contact-list small { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.contact-list a { font-size: 1.2rem; font-weight: 600; text-decoration: none; transition: color 0.3s; }
.contact-list a:hover { color: var(--accent); }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: var(--bg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(15, 20, 25, 0.06);
}
.contact-form label { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; }
.contact-form input, .contact-form textarea {
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: var(--bg-soft);
    color: var(--text);
    font: 400 1rem var(--font);
    resize: vertical;
    transition: border-color 0.3s, background 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.contact-form .btn { align-self: flex-start; }
.form-status { font-size: 0.9rem; color: var(--accent); min-height: 1.2rem; }
.form-status.error { color: #c0392b; }
.contact-form .btn:disabled { opacity: 0.6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* WhatsApp flotante */
.wa-float {
    position: fixed;
    right: clamp(1rem, 3vw, 1.75rem);
    bottom: clamp(1rem, 3vw, 1.75rem);
    z-index: 90;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 10px 30px rgba(15, 20, 25, 0.25);
    transition: transform 0.3s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
@media print { .wa-float { display: none; } }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.contact-form input[type="file"] { padding: 0.75rem 1rem; font-size: 0.9rem; }
/* Intención de la consulta: radios como pills */
.intent { border: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.intent legend { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.6rem; }
.intent label { flex-direction: row; }
.intent input { position: absolute; opacity: 0; }
.intent span {
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.intent input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.intent input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Footer */
.footer { background: var(--accent); color: #fff; padding: clamp(3.5rem, 7vw, 5rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.2fr 0.8fr; gap: 2.5rem; }
.footer-brand img { height: 38px; width: auto; margin-bottom: 1rem; }
.footer-brand p { opacity: 0.85; }
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col h4 { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; margin-bottom: 0.5rem; }
.footer-col a, .footer-col span { text-decoration: none; opacity: 0.92; font-size: 0.95rem; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.social-links { display: flex; gap: 0.75rem; }
.social-links a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: background 0.3s, color 0.3s;
}
.social-links a:hover { background: #fff; color: var(--accent); text-decoration: none; }
.footer-bottom { margin-top: 3.5rem; font-size: 0.85rem; opacity: 0.8; }
.footer-bottom p { padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.2); }

/* Aparición al scrollear */
.scroll-reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.scroll-reveal.active { opacity: 1; transform: none; }


/* Servicios como acordeón: la tarjeta activa se expande (desktop) */
@media (min-width: 1101px) {
    .services-grid { display: flex; height: 480px; }
    .service-card { flex: 1; aspect-ratio: auto; transition: flex 0.7s var(--ease); }
    .service-card:hover, .service-card:focus-visible,
    .services-grid:not(:hover):not(:focus-within) .service-card:first-child { flex: 2.6; }
    .service-info p { width: 260px; max-height: 0; overflow: hidden; opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.5s var(--ease), max-height 0.5s var(--ease); }
    .service-card:hover .service-info p, .service-card:focus-visible .service-info p,
    .services-grid:not(:hover):not(:focus-within) .service-card:first-child .service-info p { max-height: 4.5em; opacity: 0.88; transform: none; transition-delay: 0.15s; }
}


/* Páginas de servicio */
.service-page { padding-top: calc(80px + clamp(2rem, 5vw, 3.5rem)); }
.svc-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb a { text-decoration: none; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--text); }
.svc-hero h1 { font-size: clamp(2.4rem, 4.8vw, 4rem); }
.svc-lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); margin: 1.25rem 0 2rem; max-width: 56ch; }
.svc-hero-img { width: 100%; aspect-ratio: 4 / 3.3; object-fit: cover; border-radius: var(--radius); }

.svc-about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding: clamp(4.5rem, 9vw, 7rem) var(--gutter); align-items: start; }
.svc-about h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 1.5rem; }
.svc-about-text p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.1rem; max-width: 65ch; }
.svc-apps { padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); }
.svc-apps h3 { font-size: 1.15rem; margin-bottom: 1.1rem; }
.svc-apps ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.svc-apps li { padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--bg-soft); font-size: 0.92rem; }

/* 5 variantes: 3 arriba + 2 abajo, sin celdas vacías */
.svc-variants-section {
    padding: clamp(4.5rem, 9vw, 7rem) 0;
    background-color: var(--bg-soft);
    background-image: radial-gradient(rgba(0, 143, 195, 0.14) 1px, transparent 1.3px);
    background-size: 22px 22px;
}
.svc-variants-section h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: clamp(2rem, 4vw, 3rem); }
.variants { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.variant { grid-column: span 2; background: var(--bg); border-radius: var(--radius); padding: 1.75rem; box-shadow: 0 10px 30px rgba(0, 60, 85, 0.05); }
.variant:nth-child(n + 4) { grid-column: span 3; }
.variant h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.variant p { color: var(--muted); }

.svc-gallery { padding-top: clamp(4.5rem, 9vw, 7rem); }
.svc-gallery h2, .svc-faq h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: clamp(2rem, 4vw, 3rem); }
.gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 280px; }
.gallery-grid .portfolio-item:nth-child(n) { grid-column: auto; grid-row: auto; }

.svc-faq { padding: clamp(4.5rem, 9vw, 7rem) var(--gutter); }
.faq-list { max-width: 860px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.4rem 3rem 1.4rem 0;
    font-size: 1.15rem;
    font-weight: 600;
    position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; color: var(--accent); transition: transform 0.3s var(--ease); }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-item p { color: var(--muted); padding: 0 3rem 1.5rem 0; max-width: 70ch; }

@media (max-width: 860px) {
    .svc-hero, .svc-about { grid-template-columns: 1fr; }
    .svc-hero-img { order: -1; aspect-ratio: 16 / 10; }
    .variants { grid-template-columns: 1fr; }
    .variant, .variant:nth-child(n + 4) { grid-column: auto; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
}
@media (max-width: 560px) {
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
}

/* Responsive */
@media (max-width: 1100px) {
    .nav-links { gap: 1.3rem; }
    .nav-links a { white-space: nowrap; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .menu-btn { display: block; }
    .nav-links {
        position: fixed;
        inset: 0 0 auto;
        padding: 6rem var(--gutter) 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        background: #fff;
        box-shadow: 0 20px 40px rgba(15, 20, 25, 0.1);
        transform: translateY(-110%);
        transition: transform 0.5s var(--ease);
        z-index: -1;
    }
    .nav-links.open { transform: none; }
    .nav-links a, .navbar .nav-links a { color: var(--text); font-size: 1.4rem; font-weight: 600; }
    .nav-links .nav-cta, .navbar .nav-links .nav-cta { padding: 0; border: none; background: none; color: var(--accent); }
    /* En el menú móvil el submenú va siempre abierto, con sangría */
    .has-sub > a::after { display: none; }
    .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0.6rem 0 0 1rem; min-width: 0; background: none; }
    .submenu::before { display: none; }
    .submenu a, .navbar .nav-links .submenu a { padding: 0.35rem 0; font-size: 1.05rem; font-weight: 500; color: var(--muted); }
    .submenu a:hover, .submenu a[aria-current="page"] { background: none; }
    .navbar .nav-links .submenu a[aria-current="page"] { color: var(--accent); }

    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
    .hero-dots { display: none; }
    /* En celular el texto ocupa todo el ancho: el azul sube desde abajo */
    .hero-overlay { background: linear-gradient(0deg, rgba(0, 143, 195, 0.96) 0%, rgba(0, 143, 195, 0.88) 55%, rgba(0, 143, 195, 0.2) 85%, transparent 100%); }
}

@media (max-width: 560px) {
    .process { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .service-card { aspect-ratio: 16 / 11; }
    .portfolio-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
    .portfolio-item:nth-child(12n + 1), .portfolio-item:nth-child(12n + 6) { grid-column: auto; grid-row: auto; }
    .lb-nav { position: absolute; bottom: 1.25rem; }
    .lb-prev { left: calc(50% - 56px); }
    .lb-next { right: calc(50% - 56px); }
    .lightbox img { max-height: calc(100vh - 12rem); }
    .footer-grid { grid-template-columns: 1fr; }
}

/* Respeta a quien pidió menos movimiento */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
    .scroll-reveal { opacity: 1; transform: none; }
}

/* Casos de éxito */
.cases { display: grid; gap: clamp(3rem, 7vw, 5.5rem); }
.case { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.case:nth-child(even) .case-media { order: 2; }
.case-media { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.case-media img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.case-media img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.case-body small { color: var(--accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; }
.case-body h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 0.25rem 0 1.25rem; }
.case-body h3 { font-size: 1rem; margin: 1.25rem 0 0.35rem; }
.case-body p { color: var(--muted); }
.case-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; padding: 1rem 0; border-block: 1px solid var(--line); }
.case-facts dt { font-size: 0.75rem; color: var(--muted); }
.case-facts dd { font-weight: 700; font-size: 1.15rem; }
.case blockquote { margin-top: 1.5rem; padding-left: 1.25rem; border-left: 3px solid var(--accent); font-size: 1.1rem; }
.pending { color: #b35c00 !important; font-style: italic; }
.cases-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-block: clamp(4rem, 8vw, 6rem); }
@media (max-width: 860px) {
    .case { grid-template-columns: 1fr; }
    .case:nth-child(even) .case-media { order: 0; }
}

/* Empresas y multilocal */
.multi-brands { margin-top: clamp(4rem, 8vw, 6rem); }
.multi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.multi-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.multi-card figcaption { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.75rem; }
.multi-card small { color: var(--muted); }
@media (max-width: 860px) { .multi-grid { grid-template-columns: repeat(2, 1fr); } }

/* Opiniones de Google */
.reviews-section { padding: clamp(4rem, 8vw, 6rem) 0; background: var(--bg-soft); }
.reviews-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.5rem; }
.reviews-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.reviews-score { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.reviews-score strong { font-size: 2.2rem; line-height: 1; }
.reviews-score span:last-child { color: var(--muted); font-size: 0.95rem; text-decoration: underline; text-underline-offset: 3px; }
.stars { color: #f5b301; letter-spacing: 0.1em; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.review { display: flex; flex-direction: column; gap: 1rem; padding: 1.75rem; background: var(--bg); border-radius: var(--radius); }
.review blockquote { font-size: 1.1rem; line-height: 1.5; flex: 1; }
.review figcaption { font-weight: 600; }
.review figcaption span { font-weight: 400; color: var(--muted); }
.reviews-more { margin-top: 2rem; }
@media (max-width: 860px) { .reviews-grid { grid-template-columns: 1fr; } }

/* Noticias: índice con filtros y página de nota */
.news-head { margin-bottom: 2.5rem; }
.news-head h1 { font-size: clamp(2.4rem, 4.8vw, 4rem); margin-top: 0.75rem; }
.news-head .eyebrow { color: var(--accent); }
.news-count { color: var(--muted); font-size: 0.9rem; margin: -1rem 0 1.75rem; }
.news-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0 1.5rem; }
.news-date { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; font-weight: 600; margin-bottom: 2.5rem; }
.news-date select { font: inherit; font-weight: 500; padding: 0.6rem 2.2rem 0.6rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230f1419' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 1rem center; appearance: none; color: var(--text); cursor: pointer; }
.news-date select:focus-visible { border-color: var(--accent); }
.news-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 1.5rem; }
.news-card a { display: flex; flex-direction: column; gap: 0.7rem; height: 100%; text-decoration: none; }
.news-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); transition: opacity 0.3s; }
.news-card a:hover img { opacity: 0.88; }
.news-card h2, .news-card h3 { font-size: 1.45rem; line-height: 1.15; letter-spacing: -0.02em; transition: color 0.3s; }
.news-card a:hover :is(h2, h3) { color: var(--accent); }
.news-card p:not(.news-meta) { color: var(--muted); font-size: 0.95rem; }
.news-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.8rem; color: var(--muted); }
.news-tag { color: var(--accent); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.news-more { margin-top: auto; color: var(--accent); font-weight: 600; }
.news-empty { color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.news-related { padding-top: clamp(3rem, 6vw, 5rem); }
.news-related h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 2rem; }

.article-head { max-width: 980px; }
.article-head h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin: 0.9rem 0 1.25rem; }
.article-lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--muted); }
.article-hero { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius); margin: 2.5rem 0; }
.article-body h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 2.75rem 0 1rem; }
.article-body h3 { font-size: 1.25rem; letter-spacing: -0.01em; margin: 1.75rem 0 0.5rem; }
.article-body :is(p, li) { font-size: 1.1rem; color: #2b333b; }
.article-body p { margin-bottom: 1.1rem; }
.article-body :is(ul, ol) { padding-left: 1.3rem; margin-bottom: 1.25rem; display: grid; gap: 0.5rem; }
.article-body a { color: var(--accent); }
.callout { padding: 1.1rem 1.4rem; background: var(--bg-soft); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; }
.table-wrap { overflow-x: auto; margin: 1.5rem 0 2rem; }
.article-body table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.97rem; }
.article-body th { text-align: left; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.article-body :is(th, td) { padding: 0.8rem 1rem 0.8rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-body td:first-child { font-weight: 700; }
.article-faq { padding: clamp(3rem, 6vw, 4.5rem) 0 0; }
.article-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: clamp(3rem, 6vw, 4.5rem); padding: clamp(1.75rem, 4vw, 2.75rem); background: var(--accent); color: #fff; border-radius: var(--radius); }
.article-cta h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.article-cta p { opacity: 0.9; margin-top: 0.5rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.article-main { max-width: 780px; }
.article-side { position: sticky; top: 100px; display: grid; gap: 1.25rem; }
.side-box { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); }
.side-box h2 { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.side-box ul { list-style: none; }
.side-box li + li { border-top: 1px solid var(--line); }
.side-box a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; text-decoration: none; font-weight: 600; font-size: 0.95rem; line-height: 1.3; transition: color 0.3s; }
.side-box a:hover { color: var(--accent); }
.side-box a span { color: var(--muted); font-weight: 400; }
.side-box time { display: block; flex-shrink: 0; color: var(--muted); font-weight: 400; font-size: 0.8rem; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: 1fr; } .article-side { position: static; } }
@media (max-width: 860px) { .news-grid { grid-template-columns: repeat(2, 1fr); } .article-hero { aspect-ratio: 16 / 10; } }
@media (max-width: 560px) { .news-grid { grid-template-columns: 1fr; } }
.side-box a:has(time) { flex-direction: column; gap: 0.25rem; }
