/*
  ZS Gabinet Custom Solution — Estilos principales
  Paleta y estética minimalista premium
*/

:root {
  --brand: #2F3E46; /* azul gris azulado */
  --light: #E8E8E8; /* gris claro de secciones */
  --gold: #D4AF37; /* detalle dorado tenue */
  --text: #1f2937; /* gris oscuro para texto */
  --muted: #6b7280; /* texto tenue */
  --white: #ffffff;
  --shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Reset y tipografía */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1120px, 92%); margin: 0 auto; }
.section { padding: 64px 0; }
.section-gray { background: var(--light); }
.section-title { font-size: 2rem; margin: 0 0 8px; color: var(--brand); letter-spacing: 0.2px; }
.section-sub { color: var(--muted); margin: 0 0 24px; }

/* Header / Navbar */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 2px 10px rgba(47,62,70,0.06); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.brand-logo { height: 140px; width: auto; display: block; object-fit: contain; }
.brand-text { color: var(--brand); letter-spacing: 0.2px; }
/* Texto de marca al lado del logo */
.brand-name { color: var(--brand); font-weight: 700; letter-spacing: 0.25px; font-size: clamp(1.05rem, 1.8vw, 1.35rem); white-space: nowrap; display: flex; align-items: center; }

.nav-links { display: flex; list-style: none; margin: 0; padding: 0; gap: 16px; }
.nav-links a { padding: 8px 10px; border-radius: 8px; transition: background 0.25s ease, color 0.25s ease; }
.nav-links a:hover { background: var(--light); }

/* Selector de idioma */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; margin-left: 0; }
.lang-btn { padding: 8px 10px; border-radius: 10px; border: 1px solid #e3e3e3; background: #f7f7f7; color: var(--text); font-weight: 600; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; }
.lang-btn:hover { background: var(--light); transform: translateY(-2px); }
.lang-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 12px; font-weight: 600; border: 1px solid transparent; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: #24323a; }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--light); }
.btn-quote { background: var(--gold); color: #111; border-color: var(--gold); }
.btn-quote:hover { background: #c6a133; }
.btn-small { padding: 8px 12px; font-size: 0.925rem; }

/* Toggle móvil */
.nav-toggle { display: none; width: 44px; height: 44px; border: none; background: transparent; border-radius: 10px; padding: 10px; gap: 6px; flex-direction: column; align-items: center; justify-content: center; }
.nav-toggle .bar { width: 24px; height: 2px; background: var(--brand); border-radius: 2px; display: block; }
.nav-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Hero */
.hero { position: relative; min-height: 68vh; display: grid; align-items: center; }
.hero-bg { position: absolute; inset: 0; background-image: url('WhatsApp Image 2025-10-29 at 19.05.26.jpeg'); background-size: cover; background-position: center; filter: saturate(105%) contrast(1.06) brightness(1.06);
  /* suavizar */
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.28)); }
.hero-content { position: relative; z-index: 1; padding: 64px 0; background: transparent; backdrop-filter: none; border: 0; border-radius: 0; box-shadow: none; max-width: min(880px, 92%); margin-inline: auto; text-align: left; }
.hero-title { font-size: clamp(2rem, 3.2vw, 3.4rem); color: var(--brand); margin: 0 0 12px; font-weight: 700; letter-spacing: 0.3px; }
.hero-sub { color: var(--text); margin: 0 0 18px; font-size: clamp(1rem, 1.2vw, 1.15rem); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
/* Atenuar imagen de fondo del hero para mejorar legibilidad */
.hero-bg { opacity: 0.38; }
/* Texto de ubicación en hero */
.hero-location { margin-top: 10px; color: var(--muted); }

/* Alineación del hero: centrado perfecto y overlay recto */
.hero { display: grid; place-items: center; position: relative; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: none; }

/* Servicios */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--white); border: 1px solid #eaeaea; border-radius: 16px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease; }
.card:hover { transform: translateY(-4px); background: #f7f7f7; box-shadow: var(--shadow); }
.service-card h3 { margin: 8px 0 6px; color: var(--brand); }
.service-card p { color: var(--muted); margin: 0; }
.icon { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; background: #f3f3f3; border: 1px solid #e3e3e3; }
.icon svg { width: 34px; height: 34px; stroke: var(--brand); fill: none; stroke-width: 2; }
.icon svg rect, .icon svg polygon, .icon svg circle, .icon svg line { fill: none; stroke: var(--brand); }
/* Nota bajo sección */
.section-note { margin-top: 14px; color: var(--muted); }

/* Galería */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 18px; box-shadow: 0 4px 16px rgba(0,0,0,0.06); transform: translateY(8px); opacity: 0; transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.35s ease; }
.gallery-item.loaded { transform: translateY(0); opacity: 1; }
.gallery-item::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0) 60%, rgba(0,0,0,0.35)); opacity: 0; transition: opacity 0.25s ease; }
.gallery-item img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.4s ease, filter 0.3s ease; filter: saturate(98%); }
.gallery-item:not(.loaded) img { filter: blur(8px) brightness(0.95) saturate(90%); transform: scale(1.02); }
.gallery-item:hover img { transform: scale(1.06); filter: brightness(0.93); }
.gallery-item:hover { box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.gallery-item:hover::before { opacity: 1; }
.gallery-item figcaption { position: absolute; inset: auto 0 0 0; padding: 16px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.55)); color: #fff; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; transform: translateY(6px); opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; }
.gallery-item:hover figcaption { transform: translateY(0); opacity: 1; }
.gallery-item h4 { margin: 0; font-weight: 600; }
.btn-lightbox { background: rgba(255,255,255,0.9); color: var(--brand); border-color: transparent; border-radius: 999px; }
.btn-lightbox:hover { background: var(--gold); color: #111; }
/* Badge de categoría */
.category-badge { position: absolute; top: 12px; left: 12px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #0c1723; background: rgba(255,255,255,0.9); border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
/* Nota al final de galería */
.end-note { margin-top: 10px; color: var(--muted); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; padding: 24px; z-index: 100; }
.lightbox.active { display: flex; }
.lightbox-img { max-width: min(1200px, 90vw); max-height: 80vh; border-radius: 16px; box-shadow: var(--shadow); }
.lightbox-title { margin: 12px 0 0; color: #fff; text-align: center; }
.lightbox-close { position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; background: var(--white); color: var(--brand); border: none; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }

.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; background: var(--white); color: var(--brand); font-size: 28px; line-height: 1; box-shadow: var(--shadow); }
.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }
.lightbox-prev:hover, .lightbox-next:hover { background: var(--gold); color: #111; }

/* Sobre nosotros */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; }
.about-media img { border-radius: 16px; box-shadow: var(--shadow); }
.quote { border-left: 4px solid var(--gold); padding-left: 12px; color: var(--text); font-style: italic; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.contact-form { background: var(--white); border: 1px solid #eaeaea; border-radius: 16px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.label { font-weight: 500; }
label span { display: inline-block; margin-bottom: 6px; color: var(--brand); font-weight: 600; }
input, textarea { width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 12px; outline: none; background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease; font-size: 1rem; }
input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,62,70,0.12); }
.form-status { margin-top: 10px; color: var(--brand); min-height: 24px; }

.contact-direct { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.contact-chip { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; border: 1px solid #ddd; transition: background 0.2s ease, transform 0.2s ease; }
.contact-chip:hover { background: var(--light); transform: translateY(-2px); }
/* Datos visibles en contacto */
.contact-info { margin-top: 8px; color: var(--muted); }

.contact-map iframe { width: 100%; min-height: 380px; border: 0; border-radius: 16px; box-shadow: var(--shadow); }

/* Footer */
.footer { background: var(--light); padding: 22px 0; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.brand-small .brand-mark { width: 28px; height: 28px; border-radius: 6px; font-size: 0.85rem; }
.footer-logo { height: 56px; width: auto; display: block; object-fit: contain; }
.rights { margin: 0; color: var(--muted); }
.social { display: flex; gap: 10px; }
.social-link { padding: 8px 12px; background: #f7f7f7; border-radius: 999px; border: 1px solid #e6e6e6; }
.social-link:hover { background: var(--gold); color: #111; }

/* Animaciones y efectos */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
[data-animate] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.in-view { opacity: 1; transform: translateY(0); animation: fadeInUp 0.6s ease both; }

/* Responsive */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav { gap: 12px; }
  .nav-toggle { display: inline-flex; position: relative; z-index: 120; }
  .nav-links { position: fixed; inset: 64px 0 auto 0; background: var(--white); padding: 12px 16px; display: none; flex-direction: column; gap: 6px; border-top: 1px solid #eee; box-shadow: 0 6px 20px rgba(0,0,0,0.08); z-index: 80; }
  .nav-links.open { display: flex; }
  .btn-quote { display: none; }
  .lang-switch { position: fixed; right: 64px; top: 14px; z-index: 60; }
  .brand-logo { height: 80px; }
  .brand { gap: 6px; }
  .brand-name { font-size: 1rem; letter-spacing: 0.25px; }
  .hero { min-height: 56vh; }
  /* Mejor legibilidad del hero en móvil: imagen más tenue y overlay blanco uniforme */
  .hero-bg { opacity: 0.22; background-position: center 20%; }
  .hero::after { background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.5)); }
  .hero-content { padding: 32px 20px; text-align: center; max-width: 96%; }
  .section-title { font-size: 1.8rem; }
  .section { padding: 48px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
.footer-logo { height: 44px; }
}

/* Phablets: mejor uso del ancho en 600–768px */
@media (min-width: 600px) and (max-width: 768px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Sección garantía: layout horizontal moderno */
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }

/* Sección de video de marketing */
.marketing-video .section-head { text-align: center; margin-bottom: 16px; }
.marketing-video .video-wrapper { max-width: 960px; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #000; }
.marketing-video .video-player { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; }
/* Padding seguro en móviles con notch */
.marketing-video { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* Overlay Play y botón Mute */
.marketing-video .video-wrapper { position: relative; }
.marketing-video .video-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,0.28); color: #fff; font-size: 2rem; cursor: pointer; transition: opacity 0.25s ease; }
.marketing-video .video-overlay.hidden { opacity: 0; pointer-events: none; }
.marketing-video .video-overlay:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Mejoras táctiles */
.marketing-video .video-overlay { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

@media (max-width: 768px) {
  .marketing-video .video-wrapper { border-radius: 14px; }
  .marketing-video .video-overlay { font-size: 1.6rem; }
  .marketing-video .video-player { max-height: 60vh; }
}

@media (max-width: 768px) {
  .marketing-video .video-wrapper { border-radius: 14px; }
}
@media (max-width: 480px) {
  .marketing-video { padding-top: 12px; padding-bottom: 12px; }
  .marketing-video .video-player { max-height: 55vh; }
  .marketing-video .video-overlay { font-size: 1.5rem; }
}
.feature-item { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; padding: 16px 18px; border: 1px solid #eaeaea; border-radius: 16px; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,0.06); }
.feature-icon { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--light); color: var(--brand); font-size: 26px; }
.feature-item h3 { margin: 0; font-weight: 700; }
.feature-item p { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
/* Forzar que título y párrafo ocupen el ancho disponible bajo el icono */
.feature-item h3, .feature-item p { flex: 1 1 100%; min-width: 0; }

@media (max-width: 768px) {
  .features-grid { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
  .feature-item { min-width: 260px; scroll-snap-align: start; }
}
/* Oculta el título del lightbox */
.lightbox-title { display: none; }