/* ==========================================================================
   PALETA (tomada de los logos)
   - Marino y rojo: logo de Grupo Vidrialum
   - Azul Seglass: logo de Seglass
   El marino es el color principal; el rojo solo se usa como acento.
   ========================================================================== */
:root {
    --navy: #002e48;
    --navy-900: #001d2f;
    --navy-700: #0d4263;
    --red: #dd0000;
    --red-700: #b30000;
    --seglass: #16609f;

    --ink: #122433;
    --muted: #5b6b79;
    --line: #e1e7ed;
    --bg: #ffffff;
    --bg-soft: #f3f6f9;
    --navy-tint: #e8eff5;
    --red-tint: #fcecec;

    --radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 46, 72, 0.06);
    --shadow-md: 0 14px 34px rgba(0, 46, 72, 0.12);
    --ease: 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
    --header-h: 76px;
}

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

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

body {
    font-family: 'Libre Franklin', sans-serif;
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--seglass);
    outline-offset: 3px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 16px 30px; font-size: 17px; }

.btn-red { background-color: var(--red); color: #ffffff; }
.btn-red:hover { background-color: var(--red-700); }

.btn-ghost-light {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost-light:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Botón y contorno que toman el color de la marca de su sección */
.btn-brand { background-color: var(--accent, var(--navy)); color: #ffffff; }
.btn-brand:hover { filter: brightness(0.9); }

.btn-outline {
    color: var(--accent, var(--navy));
    border-color: currentColor;
    background: transparent;
}
.btn-outline:hover { background-color: var(--accent-tint, var(--navy-tint)); }

/* ==========================================================================
   TÍTULOS DE SECCIÓN
   ========================================================================== */
.section { padding: 96px 0; }
.section-soft { background-color: var(--bg-soft); }

.section-head {
    max-width: 640px;
    margin: 0 auto 56px;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent, var(--navy-700));
    margin-bottom: 12px;
}

.eyebrow::before {
    content: '';
    width: 24px;
    height: 2px;
    background-color: var(--red);
}

.eyebrow-light { color: rgba(255, 255, 255, 0.8); }

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: var(--navy);
    margin-bottom: 14px;
}

.section-lead {
    font-size: 17px;
    color: var(--muted);
}

/* ==========================================================================
   ESPACIO PARA IMÁGENES
   Si la imagen aún no existe, se muestra un recuadro con el nombre del
   archivo que hay que subir (lo marca script.js con la clase .is-empty).
   ========================================================================== */
.media {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy-tint), #f7f9fb);
}

.media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ratio-4x3 { aspect-ratio: 4 / 3; }

.media.is-empty img { display: none; }

.media.is-empty::before {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    font-size: 34px;
    color: rgba(0, 46, 72, 0.25);
}

.media.is-empty::after {
    content: attr(data-file);
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    margin-top: 18px;
    padding: 0 16px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: rgba(0, 46, 72, 0.45);
    word-break: break-all;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.main-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: box-shadow var(--ease), border-color var(--ease);
}

.main-header.scrolled {
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo-img {
    height: 54px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    position: relative;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: 6px 0;
    transition: color var(--ease);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ease);
}

.nav-link:hover,
.nav-link.active { color: var(--navy); }

.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: none;
    color: var(--navy);
    font-size: 20px;
    cursor: pointer;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: calc(var(--header-h) + 88px) 0 96px;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
    color: #ffffff;
}

/* Fondo animado: 4 fotos que se funden cada 6 s con un zoom lento */
.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slides img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: hero-fade 24s linear infinite;
}

.hero-slides img:nth-child(1) { animation-delay: 0s; }
.hero-slides img:nth-child(2) { animation-delay: 6s; }
.hero-slides img:nth-child(3) { animation-delay: 12s; }
.hero-slides img:nth-child(4) { animation-delay: 18s; }

@keyframes hero-fade {
    0%   { opacity: 0; transform: scale(1.08); }
    6%   { opacity: 1; }
    25%  { opacity: 1; }
    31%  { opacity: 0; transform: scale(1); }
    100% { opacity: 0; transform: scale(1); }
}

/* Capa azul marino encima de las fotos para que el texto se lea bien */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 29, 47, 0.94) 0%, rgba(0, 46, 72, 0.82) 50%, rgba(0, 46, 72, 0.62) 100%),
        linear-gradient(0deg, rgba(0, 29, 47, 0.6) 0%, transparent 40%);
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-title {
    font-size: clamp(34px, 5.2vw, 58px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1px;
    margin-bottom: 22px;
}

.hero-title span {
    color: #ffffff;
    box-shadow: inset 0 -0.18em 0 var(--red);
}

.hero-lead {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.78);
    max-width: 540px;
    margin-bottom: 36px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Selector de marca */
.hero-brands {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-brands-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.brand-pick {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px 16px 16px;
    border-radius: var(--radius);
    background-color: rgba(0, 29, 47, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #ffffff;
    text-decoration: none;
    transition: background-color var(--ease), border-color var(--ease), transform var(--ease);
}

.brand-pick:hover {
    background-color: rgba(0, 29, 47, 0.65);
    transform: translateX(4px);
}

.brand-pick-seglass:hover { border-color: #4f93cf; }
.brand-pick-alumking:hover { border-color: var(--red); }

.brand-pick-logo {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.brand-pick-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.brand-pick-text strong { font-size: 20px; }
.brand-pick-text small { font-size: 14px; color: rgba(255, 255, 255, 0.65); }

.brand-pick > i {
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--ease);
}

.brand-pick:hover > i { color: #ffffff; }

/* ==========================================================================
   NOSOTROS
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

/* Collage: foto grande arriba, dos abajo y el logo al centro */
.about-collage {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1.35fr 1fr;
    gap: 12px;
    aspect-ratio: 1 / 1;
}

.about-collage .media { border-radius: var(--radius); }

.collage-main { grid-column: 1 / -1; }

.collage-logo {
    position: absolute;
    left: 50%;
    top: 57.5%;
    transform: translate(-50%, -50%);
    padding: 14px 22px;
    background-color: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.collage-logo img {
    height: 48px;
    width: auto;
}

.about-text .section-lead { margin-bottom: 36px; }
.about-text strong { color: var(--navy); }

.stats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stats li {
    padding: 18px;
    border-radius: var(--radius);
    background-color: var(--bg-soft);
    border-top: 3px solid var(--navy);
}

.stats li:nth-child(2) { border-top-color: var(--red); }

.stats strong {
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--navy);
}

.stats span {
    font-size: 14px;
    color: var(--muted);
}

/* ==========================================================================
   SECCIONES DE MARCA (SEGLASS / ALUMKING)
   ========================================================================== */
.brand-seglass  { --accent: var(--seglass); --accent-tint: #e7f0f8; }
.brand-alumking { --accent: var(--red);     --accent-tint: var(--red-tint); }

.brand-intro {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    align-items: center;
    margin-bottom: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--line);
}

.brand-logo {
    width: 104px;
    height: 104px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.brand-intro .section-title { margin-bottom: 8px; }

.brand-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Íconos de redes */
.social-row {
    display: flex;
    gap: 10px;
}

.social-row a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    background-color: var(--bg);
    color: var(--accent, var(--navy));
    font-size: 17px;
    text-decoration: none;
    transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}

.social-row a:hover {
    background-color: var(--accent, var(--navy));
    border-color: var(--accent, var(--navy));
    color: #ffffff;
}

/* Banner de planta: dos fotos, la primera más ancha */
.brand-banner {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    height: 360px;
    margin-bottom: 48px;
}

.brand-banner .media {
    height: 100%;
    border-radius: var(--radius);
}

/* Tarjetas de producto */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--ease), transform var(--ease);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-card:hover .media img { transform: scale(1.05); }

/* Fotos de producto sobre fondo blanco: se muestran completas */
.media.fit-contain { background: #ffffff; }
.media.fit-contain img { object-fit: contain; padding: 12px; }

/* Tarjeta destacada a lo ancho (foto a la izquierda, texto a la derecha) */
.product-card-wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 2fr;
}

.product-card-wide .media { height: 220px; }

.product-card-wide .product-body {
    justify-content: center;
    padding: 24px 32px;
    border-top: 0;
    border-left: 3px solid var(--accent, var(--navy));
}

.product-card-wide h3 { font-size: 20px; }
.product-card-wide p { flex: 0; }

.product-badge {
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: var(--accent-tint, var(--navy-tint));
    color: var(--accent, var(--navy));
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.product-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px 24px 24px;
    border-top: 3px solid var(--accent, var(--navy));
}

.product-body h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.product-body p {
    flex: 1;
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 18px;
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent, var(--navy));
    text-decoration: none;
}

.product-link i { transition: transform var(--ease); }
.product-link:hover i { transform: translateX(4px); }

/* ==========================================================================
   PROYECTOS
   ========================================================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 440px;
    gap: 20px;
}

.project-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.project-card .media {
    position: absolute;
    inset: 0;
}

.project-card:hover .media img { transform: scale(1.05); }

/* En proyectos el texto va abajo, así que el aviso de imagen sube */
.project-card .media.is-empty::before { top: 32%; }
.project-card .media.is-empty::after { top: 32%; }

.project-info {
    position: absolute;
    inset: auto 0 0 0;
    padding: 56px 22px 20px;
    background: linear-gradient(to top, rgba(0, 29, 47, 0.88), transparent);
    color: #ffffff;
}

.project-info h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 8px 0 2px;
}

.project-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #ffffff;
}

.tag-seglass { background-color: var(--seglass); }
.tag-alumking { background-color: var(--red); }
.tag-featured {
    background-color: #ffffff;
    color: var(--navy);
}
.tag-featured i { color: var(--red); margin-right: 2px; }

/* ==========================================================================
   CLIENTES (carrusel continuo de logos)
   ========================================================================== */
.clients-section .section-head { margin-bottom: 40px; }

.clients-marquee {
    overflow: hidden;
    /* Desvanece los bordes para que los logos entren y salgan suavemente */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.clients-track {
    list-style: none;
    display: flex;
    gap: 20px;
    width: max-content;
    padding: 8px 0;
    animation: clients-scroll 40s linear infinite;
}

.clients-marquee:hover .clients-track { animation-play-state: paused; }

@keyframes clients-scroll {
    to { transform: translateX(calc(-50% - 10px)); }
}

.client {
    flex-shrink: 0;
    width: 210px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 22px;
    background-color: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color var(--ease), box-shadow var(--ease);
}

.client:hover {
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.client img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.75;
    transition: filter var(--ease), opacity var(--ease);
}

.client:hover img {
    filter: none;
    opacity: 1;
}

/* Sin logo todavía: se muestra el nombre de la empresa */
.client-name { display: none; }

.client.no-logo img { display: none; }

.client.no-logo .client-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--navy);
}

.client-name small {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

/* ==========================================================================
   SUCURSALES
   ========================================================================== */
.branch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.branch-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--bg);
    overflow: hidden;
    transition: box-shadow var(--ease), border-color var(--ease);
}

.branch-map-embed {
    height: 220px;
    background-color: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}

.branch-map-embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.branch-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 26px 28px 28px;
}

.branch-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.branch-card h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 21px;
    font-weight: 800;
    color: var(--navy);
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.branch-list {
    list-style: none;
    flex: 1;
    margin-bottom: 20px;
}

.branch-list li {
    display: flex;
    gap: 12px;
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 12px;
}

.branch-list i {
    width: 16px;
    margin-top: 5px;
    color: var(--navy-700);
}

.branch-list a {
    text-decoration: none;
    transition: color var(--ease);
}

.branch-list a:hover { color: var(--navy); }

.branch-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    text-decoration: none;
}

.branch-map i { transition: transform var(--ease); }
.branch-map:hover i { transform: translateX(4px); }

/* ==========================================================================
   CTA FINAL
   ========================================================================== */
.cta-band {
    padding: 64px 0;
    background: linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 100%);
    color: #ffffff;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cta-inner h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    margin-bottom: 6px;
}

.cta-inner p { color: rgba(255, 255, 255, 0.78); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--bg-soft);
    border-top: 1px solid var(--line);
    padding-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 48px;
}

.footer-logo {
    height: 56px;
    width: auto;
    margin-bottom: 18px;
}

.footer-brand p {
    font-size: 15px;
    color: var(--muted);
    max-width: 300px;
}

.footer-col h3 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 16px;
}

.footer-col .footer-subtitle { margin-top: 24px; }

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; }

.footer-col li a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--muted);
    text-decoration: none;
    transition: color var(--ease);
}

.footer-col li a:hover { color: var(--navy); }

.footer-col .social-row:first-of-type a { --accent: var(--seglass); }
.footer-col .social-row:last-of-type a { --accent: var(--red); }

.footer-bottom {
    background-color: var(--navy);
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    padding: 18px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.footer-bottom-inner p:last-child {
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: #25d366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    transition: transform var(--ease);
}

.whatsapp-float:hover { transform: translateY(-3px) scale(1.05); }

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 1024px) {
    .nav-menu { gap: 22px; }
    .brand-intro { grid-template-columns: auto 1fr; }
    .brand-links { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 900px) {
    :root { --header-h: 68px; }

    .logo-img { height: 42px; }

    /* Menú móvil desplegable */
    .menu-toggle { display: flex; align-items: center; justify-content: center; }

    .nav-menu {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 8px 24px 20px;
        background-color: #ffffff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
    }

    .nav-menu.open {
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .nav-link {
        padding: 14px 0;
        font-size: 16px;
        border-bottom: 1px solid var(--line);
    }

    .nav-link::after { display: none; }

    .hero-inner,
    .about-grid { grid-template-columns: 1fr; gap: 48px; }

    .card-grid,
    .branch-grid { grid-template-columns: repeat(2, 1fr); }

    .project-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 360px; }
    .project-card:first-child { grid-column: 1 / -1; }

    .brand-banner { height: 280px; }

    .footer-grid { grid-template-columns: 1fr 1fr; }

    .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .project-grid { grid-auto-rows: 380px; }
    .project-card:first-child { grid-column: auto; }
    .section { padding: 72px 0; }

    .header-actions .btn-sm { display: none; }

    .hero { padding: calc(var(--header-h) + 56px) 0 72px; }
    .hero-buttons .btn { flex: 1 1 100%; }

    .stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
    .stats li { padding: 14px 10px; }
    .stats strong { font-size: 26px; }
    .stats span { font-size: 12px; }

    .brand-intro { grid-template-columns: 1fr; gap: 20px; }

    .brand-banner {
        grid-template-columns: 1fr;
        height: auto;
        gap: 12px;
    }
    .brand-banner .media { aspect-ratio: 4 / 3; height: auto; }

    .product-card-wide { grid-template-columns: 1fr; }
    .product-card-wide .media { height: auto; aspect-ratio: 4 / 3; }
    .product-card-wide .product-body {
        padding: 22px 24px 24px;
        border-left: 0;
        border-top: 3px solid var(--accent, var(--navy));
    }
    .brand-logo { width: 84px; height: 84px; }

    .card-grid,
    .branch-grid,
    .project-grid,
    .footer-grid { grid-template-columns: 1fr; }

    .footer-bottom-inner { flex-direction: column; text-align: center; }

    .whatsapp-float {
        right: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    .client { width: 170px; height: 84px; }
    .clients-track { gap: 14px; animation-duration: 30s; }
    @keyframes clients-scroll { to { transform: translateX(calc(-50% - 7px)); } }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-slides img { animation: none; }
    .hero-slides img:first-child { opacity: 1; }
    .clients-marquee { -webkit-mask-image: none; mask-image: none; }
    .clients-track {
        animation: none;
        width: auto;
        flex-wrap: wrap;
        justify-content: center;
        padding: 8px 24px;
    }
    .clients-track [aria-hidden="true"] { display: none; }
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
