/* ============================================================
   DECASGYM S.A. de C.V. — Hoja de estilos del sitio de marca
   Paleta tomada del logotipo: azul marino, verde y cian.
   ============================================================ */

:root {
  --navy: #14337c;
  --navy-deep: #0c2158;
  --navy-ink: #0a1a42;
  --green: #3fa33c;
  --teal: #0e9ea8;
  --ink: #1a2333;
  --muted: #5a6478;
  --bg: #ffffff;
  --bg-alt: #f2f5fa;
  --line: #e3e8f0;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(10, 26, 66, 0.08);
  --shadow-md: 0 10px 30px rgba(10, 26, 66, 0.12);
  --shadow-lg: 0 24px 60px rgba(10, 26, 66, 0.22);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.nav-open, body.modal-open { overflow: hidden; }

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

a { color: var(--teal); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; color: var(--navy-ink); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: min(1160px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green), #2e8c2b);
  color: #fff;
  box-shadow: 0 6px 18px rgba(63, 163, 60, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(63, 163, 60, 0.45); }

.btn-ghost {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.45);
}

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

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand img { width: 150px; height: auto; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  color: var(--navy-ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover { color: var(--teal); }

.nav-link.active { color: var(--green); }

.nav-cta {
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding-inline: 1.2rem;
  margin-left: 0.4rem;
}

.nav-cta:hover, .nav-cta.active { background: var(--navy-deep); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  height: 2.5px;
  width: 100%;
  background: var(--navy-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(72px + clamp(3rem, 8vw, 5.5rem)) 0 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(14, 158, 168, 0.35), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(63, 163, 60, 0.28), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, #1a4198 100%);
  color: #fff;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 1.2rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.07);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero h1 .accent {
  background: linear-gradient(90deg, #6fd06c, #35c6d1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 54ch;
  margin: 0 0 1.8rem;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-media {
  margin: 0;
  position: relative;
}

.hero-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
}

.hero-media figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(10, 26, 66, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: 1.6rem 0 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- Secciones ---------- */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }

.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(2.5rem, 6vw, 3.5rem);
  text-align: center;
}

.section-head p:last-child { color: var(--muted); }

.kicker {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.015em; }

/* ---------- Nosotros ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split-copy p { color: var(--muted); }

.checklist {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.7rem;
  font-weight: 600;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  background: var(--green) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4 4L19 7"/></svg>') center / 62% no-repeat;
}

.split-media { margin: 0; position: relative; }

.split-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.floating-badge {
  position: absolute;
  left: -0.9rem;
  bottom: 1.4rem;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  color: var(--muted);
}

.floating-badge strong { color: var(--navy); display: block; }

/* ---------- Tarjetas genéricas ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem;
}

.card {
  padding: 1.8rem 1.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20, 51, 124, 0.1), rgba(14, 158, 168, 0.12));
  color: var(--navy);
}

.card-icon svg { width: 26px; height: 26px; }

/* ---------- Equipamiento comando ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.2rem;
}

.chip {
  padding: 0.45rem 1rem;
  border: 1px solid rgba(20, 51, 124, 0.18);
  border-radius: 999px;
  background: rgba(20, 51, 124, 0.05);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
}

.vistas {
  margin: 0 0 2.6rem;
  padding: 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.vistas img { width: 100%; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.product-card img {
  width: 100%;
  height: 225px;
  object-fit: cover;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.3rem 1.4rem 1.5rem;
}

.product-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--navy-ink);
}

.product-desc { color: var(--muted); font-size: 0.94rem; }

.product-more {
  margin-top: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--green);
}

.fineprint {
  margin: 2.2rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Electrónica y kit ---------- */
.section-dark {
  background:
    radial-gradient(800px 400px at 110% 0%, rgba(14, 158, 168, 0.25), transparent 60%),
    linear-gradient(150deg, var(--navy-ink), var(--navy-deep));
  color: #fff;
}

.section-dark .section-head h2 { color: #fff; }

.section-dark .section-head p:last-child { color: rgba(255, 255, 255, 0.75); }

.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
}

.kit-card {
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.kit-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.1rem;
}

.kit-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 170px;
  margin-bottom: 1.1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(63, 163, 60, 0.25), rgba(14, 158, 168, 0.25));
  color: #9fe89d;
}

.kit-icon svg { width: 64px; height: 64px; }

.kit-card h3 { color: #fff; font-size: 1.08rem; }

.kit-card p { margin: 0; font-size: 0.92rem; color: rgba(255, 255, 255, 0.78); }

/* ---------- Galería ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.gallery-item {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.3rem;
}

.contact-card {
  display: block;
  padding: 1.7rem 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.contact-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }

.contact-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.contact-card a { color: var(--teal); font-weight: 600; text-decoration: none; }

.contact-card a:hover { text-decoration: underline; }

.contact-cta { margin-top: 2.4rem; text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 3rem 0;
  background: var(--navy-ink);
  color: rgba(255, 255, 255, 0.75);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
}

.footer-logo {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  background: #fff;
  border-radius: 12px;
}

.footer-brand p { margin: 0.8rem 0 0; font-size: 0.92rem; }

.footer-note { margin: 0; font-size: 0.84rem; text-align: right; }

/* ---------- Modal de producto ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 34, 0.65);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal.open .modal-backdrop { opacity: 1; }

.modal-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  width: min(920px, 100%);
  max-height: min(86vh, 780px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.modal.open .modal-dialog { opacity: 1; transform: none; }

.modal-media {
  background: var(--navy-ink);
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-content {
  padding: 2rem 2rem 2.2rem;
  overflow-y: auto;
}

.modal-content h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

.modal-content h4 {
  margin: 1.5rem 0 0.6rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.modal-content > p { color: var(--muted); margin: 0; }

.modal-capacidad {
  margin-top: 0.8rem !important;
  color: var(--navy) !important;
  font-weight: 600;
}

#modal-specs {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.94rem;
}

#modal-specs li { margin-bottom: 0.35rem; }

#modal-materials {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

#modal-materials td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

#modal-materials td:first-child {
  font-weight: 700;
  color: var(--navy-ink);
  white-space: nowrap;
}

#modal-materials td:last-child { color: var(--muted); }

#modal-ficha { margin-top: 1.6rem; }

.modal-close, .lightbox-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 26, 66, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-close:hover, .lightbox-close:hover { background: rgba(10, 26, 66, 0.85); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(8, 14, 34, 0.88);
  opacity: 0;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
}

.lightbox.open { opacity: 1; }

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 84vh;
  width: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

/* ---------- Animaciones de entrada ---------- */
/* Solo se oculta si hay JavaScript (clase "js" en <html>); sin JS todo es visible */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .product-card, .contact-card, .gallery-item img, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-dialog { grid-template-columns: 1fr; max-height: 90vh; }
  .modal-media img { max-height: 260px; }
  .footer-inner, .footer-note { text-align: left; }
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: max-height 0.3s ease;
  }

  body.nav-open .site-nav { max-height: calc(100vh - 72px); overflow-y: auto; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.8rem 1.2rem 1.4rem;
  }

  .nav-link { display: block; padding: 0.8rem 0.6rem; font-size: 1.05rem; }

  .nav-cta { margin: 0.6rem 0 0; text-align: center; }

  .hero-stats { grid-template-columns: 1fr; gap: 1.4rem; }

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

  .floating-badge { left: 0.9rem; }
}
