/* Hialsa v6 — presentación con foco en fotos (galería + visor).
   Tipografía: fuente del sistema (sin recursos externos). */

:root {
  --primary: #0c4b86;
  --secondary: #0e79b6;
  --navy: #22274c;
  --tint: #a1b8cc;
  --off: #eaf6fa;
  --text: #161211;
  --muted: #6e6c6d;
  --border: #d7e3ec;
  --wa: #25d366;
  --white: #ffffff;

  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(22, 39, 76, 0.06);
  --shadow: 0 14px 34px rgba(22, 39, 76, 0.12);
  --shadow-lg: 0 26px 60px rgba(22, 39, 76, 0.20);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }

h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 0.4em; letter-spacing: -0.01em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; }

/* ---------- topbar ---------- */

.topbar { background: var(--navy); color: #dfe8f2; font-size: 0.85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.topbar-note { color: var(--tint); }
.topbar-links { display: flex; gap: 18px; }
.topbar-links a { color: #dfe8f2; }
.topbar-links a:hover { color: #fff; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand img { height: 46px; width: auto; }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.site-nav a, .site-nav .sub-toggle {
  display: inline-block; padding: 10px 14px; border-radius: 999px;
  color: var(--text); font-size: 0.95rem; font-weight: 500;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.site-nav a:hover, .site-nav .sub-toggle:hover { background: var(--off); color: var(--primary); }
.has-sub { position: relative; }
.has-sub.is-open .sub-toggle { background: var(--off); color: var(--primary); }
.site-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px; margin-top: 8px; flex-direction: column; gap: 2px;
}
.has-sub.is-open .sub-menu { display: flex; }
.site-nav .sub-menu a { display: block; border-radius: 8px; }

.header-wa { margin-left: 4px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--navy); cursor: pointer; margin-left: auto; padding: 6px; }

/* ---------- botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 15px; font-size: 0.88rem; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-wa { background: var(--wa); color: #08331b; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.28); }
.btn-wa:hover { background: #1fbe5b; color: #08331b; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--navy); }
.btn-outline:hover { border-color: var(--secondary); color: var(--secondary); }

/* ---------- secciones ---------- */

.section { padding: 78px 0; }
.section-soft { background: var(--off); }
.section-head { max-width: 640px; margin-bottom: 34px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.76rem; font-weight: 700; color: var(--secondary); margin: 0 0 8px; }
.section-sub { color: var(--muted); margin: 6px 0 0; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.sub-title { font-size: 1.35rem; }

/* ---------- hero ---------- */

.hero { position: relative; background: linear-gradient(160deg, #f6fbfe 0%, var(--off) 55%, #e2f0f7 100%); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1.02fr 1fr; gap: 46px; align-items: center;
  padding: 84px 0 92px;
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: 16px; }
.hero h1 .accent { color: var(--secondary); }
.hero .lead { margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; color: var(--muted); font-size: 0.9rem; }

.hero-mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; aspect-ratio: 1 / 1; }
.mosaic-tile {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); background: var(--navy);
}
.mosaic-tile img, .mosaic-tile .ph-photo { width: 100%; height: 100%; object-fit: cover; }
.mosaic-tile.mosaic-1 { grid-row: span 2; }
.mosaic-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px;
  color: #fff; font-weight: 600; font-size: 0.92rem;
  background: linear-gradient(transparent, rgba(22, 39, 76, 0.82));
}

/* ---------- tarjetas de categoría ---------- */

.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); }
.card-media img, .card-media .ph-photo { width: 100%; height: 100%; object-fit: cover; }
.card-count {
  position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, 0.92); color: var(--navy);
  font-size: 0.76rem; font-weight: 600; padding: 5px 11px; border-radius: 999px;
}
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 24px; }
.card-title { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.card-text { color: var(--muted); font-size: 0.95rem; }
.card-cta { display: inline-flex; align-items: center; gap: 8px; color: var(--secondary); font-weight: 600; margin-top: 6px; }

/* ---------- placeholders (mientras no haya fotos reales) ---------- */

.ph-photo { display: flex; align-items: center; justify-content: center; position: relative; color: rgba(255, 255, 255, 0.9); }
.ph-photo-icon { opacity: 0.85; }
.ph-photo-num {
  position: absolute; left: 12px; bottom: 10px; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.85);
}
.ph-ini { font-size: 2.4rem; font-weight: 700; color: rgba(255, 255, 255, 0.9); letter-spacing: 0.04em; }

/* ---------- categoría: cabecera ---------- */

.cat-head { padding: 54px 0 8px; background: linear-gradient(160deg, #f6fbfe, var(--off)); }
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--secondary); }
.breadcrumbs span { margin: 0 8px; }
.page-title { font-size: clamp(1.9rem, 4vw, 3rem); }
.cat-head-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 22px 0 40px; }

/* ---------- galería ---------- */

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gal-item {
  position: relative; padding: 0; border: 0; cursor: zoom-in; background: var(--navy);
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gal-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gal-item img, .gal-item .ph-photo { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gal-item:hover img, .gal-item:hover .ph-photo { transform: scale(1.05); }
.gal-zoom {
  position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.92);
  color: var(--navy); opacity: 0; transform: translateY(6px); transition: opacity 0.2s ease, transform 0.2s ease;
}
.gal-item:hover .gal-zoom, .gal-item:focus-visible .gal-zoom { opacity: 1; transform: none; }

/* ---------- característica / especificaciones ---------- */

.cat-info-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 46px; align-items: start; }
.feature-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.feature-list li { position: relative; padding-left: 30px; color: var(--text); }
.feature-list li::before {
  content: ''; position: absolute; left: 0; top: 0.55em; width: 14px; height: 14px; border-radius: 50%;
  background: var(--secondary); box-shadow: inset 0 0 0 4px #fff, 0 0 0 1px var(--secondary);
}
.card-pad { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.specs { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.specs caption { text-align: left; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.specs th, .specs td { text-align: left; padding: 11px 4px; border-bottom: 1px solid var(--border); font-size: 0.94rem; vertical-align: top; }
.specs th { color: var(--muted); font-weight: 600; width: 42%; }

/* ---------- contacto / nosotros ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--text); }
.contact-list svg { color: var(--secondary); flex: none; margin-top: 3px; }
.contact-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 0.95rem; background: #fbfdfe;
}
.field input:focus, .field textarea:focus { border-color: var(--secondary); outline: none; }
.form-note { color: var(--muted); font-size: 0.82rem; margin: 12px 0 0; }
.mapa { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.mapa iframe { display: block; width: 100%; height: 340px; border: 0; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.value-card h3 { color: var(--primary); font-size: 1.1rem; }
.value-card p { color: var(--muted); margin: 0; font-size: 0.94rem; }

/* ---------- footer ---------- */

.site-footer { background: var(--navy); color: #cdd7e3; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 40px; padding: 62px 20px 46px; }
.footer-brand { font-size: 1.55rem; font-weight: 700; color: #fff; margin: 0 0 12px; }
.footer-desc { color: #aebbd0; font-size: 0.92rem; margin: 0 0 18px; }
.footer-title { color: #fff; font-size: 1.02rem; margin: 0 0 16px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 0.92rem; }
.footer-list a { color: #cdd7e3; }
.footer-list a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { color: var(--tint); flex: none; margin-top: 3px; }
.socials { list-style: none; display: flex; gap: 10px; margin: 18px 0 0; padding: 0; }
.socials a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 0.85rem; font-weight: 700;
}
.socials a:hover { background: var(--secondary); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0; font-size: 0.84rem; color: #aebbd0; }

/* ---------- flotante WhatsApp ---------- */

.float-wa {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 18px;
  background: var(--wa); color: #08331b; font-weight: 700; border-radius: 999px;
  box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.float-wa:hover { transform: translateY(-2px); color: #08331b; }

/* ---------- visor (lightbox) ---------- */

.lb {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; background: rgba(12, 20, 40, 0.92); backdrop-filter: blur(4px);
}
.lb[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 92vw; display: flex; flex-direction: column; align-items: center; }
.lb-media { display: flex; align-items: center; justify-content: center; max-height: 80vh; }
.lb-media img { max-width: 92vw; max-height: 80vh; width: auto; height: auto; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lb-media .ph-photo { width: min(80vw, 900px); height: min(60vh, 620px); border-radius: 12px; }
.lb-caption { color: #e7eef7; text-align: center; margin-top: 16px; font-size: 0.95rem; }
.lb-count { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); color: #cdd7e3; font-size: 0.88rem; margin: 0; letter-spacing: 0.04em; }
.lb-close, .lb-nav {
  background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; cursor: pointer;
  border-radius: 50%; display: grid; place-items: center; transition: background 0.2s ease, transform 0.15s ease;
}
.lb-close { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; }
.lb-nav { width: 54px; height: 54px; flex: none; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.26); }
.lb-nav:hover { transform: scale(1.06); }
.lb-nav[hidden] { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 60px 0 68px; }
  .hero-mosaic { aspect-ratio: 16 / 11; }
  .cards-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cat-info-layout, .split, .values { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 720px) {
  .site-nav {
    position: fixed; inset: 0 0 auto 0; top: 0; margin: 0; padding: 84px 20px 24px;
    background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    transform: translateY(-100vh); visibility: hidden;
    transition: transform 0.28s ease, visibility 0s linear 0.28s;
    max-height: 100vh; overflow: auto;
  }
  .site-nav.is-open { transform: none; visibility: visible; transition: transform 0.28s ease, visibility 0s; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a, .site-nav .sub-toggle { padding: 14px; border-radius: 10px; width: 100%; text-align: left; font-size: 1.02rem; }
  .site-nav .sub-menu { position: static; box-shadow: none; border: 0; margin: 0 0 6px; padding-left: 12px; min-width: 0; }
  .nav-toggle { display: block; }
  .header-inner { flex-wrap: wrap; }
  .header-wa span { display: none; }
  .topbar { font-size: 0.8rem; }
  .topbar-inner { justify-content: center; text-align: center; min-height: 0; padding: 9px 0; gap: 4px 14px; }
  .topbar-links { flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .lb-nav { width: 44px; height: 44px; }
  .lb { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
