/* ==========================================================================
   OpenGym México — Landing (clon fiel de Swipepages)
   Mobile-first, Flexbox/Grid, sin frameworks.
   ========================================================================== */

:root {
  --color-primary: #d0021b;
  --color-primary-dark: #be0013;
  --color-black: #0a0a0a;
  --color-dark: #121212;
  --color-gray-100: #f4f4f4;
  --color-gray-300: #d9d9d9;
  --color-gray-500: #9b9b9b;
  --color-text: #313233;
  --color-white: #ffffff;

  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-width: 1220px;
  --radius-btn: 50px;
  --radius-input: 5px;
  --radius-card: 12px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  background: var(--color-white);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 10000;
}
.skip-link:focus { left: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-black);
}

.text-primary { color: var(--color-primary); }

.section-title {
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
}
.section-title--light { color: var(--color-white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--color-primary-dark); }

.btn--block { width: 100%; }

.btn--dark {
  background: var(--color-black);
  color: #fff;
}
.btn--dark:hover { background: #000; box-shadow: 0 6px 18px rgba(0,0,0,.35); }

.btn--outline-dark {
  background: var(--color-black);
  color: #fff;
  min-width: 220px;
}
.btn--outline-dark:hover { background: var(--color-primary); }

.btn--whatsapp {
  background: #25d366;
  color: #fff;
  width: 100%;
  margin-top: var(--space-2);
}
.btn--whatsapp:hover { background: #1eb955; }

/* ==========================================================================
   HERO + FORM
   ========================================================================== */
.hero {
  position: relative;
  padding-block: var(--space-4) var(--space-6);
  color: #fff;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.35) 100%);
}

.hero__container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hero__logo {
  width: 160px;
  margin-bottom: var(--space-3);
}

.hero__title {
  color: #fff;
  font-size: clamp(30px, 7vw, 52px);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.hero__subtitle {
  font-size: clamp(16px, 2.4vw, 20px);
  max-width: 560px;
  color: #f1f1f1;
}

/* Lead form card */
.lead-form {
  background: #b6b6b6;
  border-radius: var(--radius-card);
  padding: var(--space-3);
  color: #111;
  width: 100%;
  max-width: 560px;
}

.lead-form__title {
  text-align: center;
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  color: #fff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.form-field {
  margin-bottom: var(--space-2);
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-input);
  background: #fff;
  color: #000;
  font-size: 14px;
  min-height: 44px;
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
  font-family: var(--font-main);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 1px;
}

.phone-field {
  display: flex;
  align-items: stretch;
  gap: 6px;
  background: #fff;
  border-radius: var(--radius-input);
  overflow: hidden;
}
.phone-field__prefix {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 14px;
  white-space: nowrap;
  background: #eee;
}
.phone-field input {
  border-radius: 0 !important;
  flex: 1;
}

.form-field--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.form-field--checkbox input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }
.form-field--checkbox label { font-size: 12px; margin-bottom: 0; }
.form-field--checkbox a { text-decoration: underline; }

.form-status {
  margin-top: var(--space-2);
  font-size: 14px;
  text-align: center;
  min-height: 20px;
  font-weight: 600;
}
.form-status--ok { color: #1a7f37; }
.form-status--error { color: #d0021b; }

/* ==========================================================================
   INTRO
   ========================================================================== */
.intro {
  background: var(--color-black);
  color: #fff;
  padding-block: var(--space-6);
}
.intro__text {
  text-align: center;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.8;
  max-width: 920px;
  margin-inline: auto;
}

/* ==========================================================================
   PARTNER / SOCIO ESTRATÉGICO
   ========================================================================== */
.partner {
  background: var(--color-primary);
  color: #fff;
  padding-block: var(--space-6);
}
.partner__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
.partner__eyebrow {
  color: #fff;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  margin-bottom: var(--space-2);
}
.partner__title {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 700;
  max-width: 640px;
  margin-bottom: var(--space-3);
}
.partner__media img {
  max-width: 320px;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.35));
}

/* ==========================================================================
   PROYECTOS
   ========================================================================== */
.projects {
  padding-block: var(--space-6);
  background: linear-gradient(180deg, #fff 0%, var(--color-gray-100) 100%);
}
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-3);
}
.project-card {
  text-align: center;
}
.project-card__img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-2);
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
}
.project-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-card h3 {
  color: var(--color-primary);
  font-size: 18px;
  margin-bottom: 6px;
}
.project-card p {
  font-size: 14px;
  color: var(--color-text);
}

/* ==========================================================================
   STATS
   ========================================================================== */
.stats {
  background: var(--color-gray-100);
  padding-block: var(--space-6);
}
.stats__container {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.stats__item {
  text-align: center;
}
.stats__number {
  display: block;
  color: var(--color-primary);
  font-size: clamp(48px, 10vw, 80px);
  font-weight: 800;
  line-height: 1;
}
.stats__label {
  display: block;
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 700;
  color: var(--color-black);
  margin-top: 4px;
}
.stats__highlight {
  display: block;
  color: var(--color-primary);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  margin-top: 4px;
}

/* ==========================================================================
   POR QUÉ ELEGIR
   ========================================================================== */
.why {
  background: var(--color-black);
  color: #fff;
  padding-block: var(--space-6);
}
.why__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.why-card {
  border: 1px solid #333;
  padding: var(--space-4) var(--space-3);
  text-align: center;
}
.why-card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-2);
}
.why-card h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: var(--space-1);
}
.why-card p {
  color: #ccc;
  font-size: 14px;
}
.why__closing {
  text-align: center;
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 600;
  max-width: 900px;
  margin-inline: auto;
  color: #fff;
}
.why__closing strong { color: var(--color-primary); }

/* ==========================================================================
   ASOCIACIONES
   ========================================================================== */
.associations {
  background: var(--color-black);
  padding-block: var(--space-5);
}
.associations__banner {
  background: #2c2c2c;
  padding: var(--space-2);
  text-align: center;
  margin-bottom: var(--space-4);
}
.associations__banner h2 {
  color: #fff;
  font-size: clamp(16px, 2.5vw, 22px);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.associations__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-5);
}
.associations__logos img {
  max-height: 90px;
  width: auto;
  opacity: .95;
}

/* ==========================================================================
   CLIENTES / MARQUEE
   ========================================================================== */
.clients {
  background: var(--color-black);
  padding-top: var(--space-5);
}
.clients .section-title { margin-bottom: var(--space-4); }

.marquee {
  overflow: hidden;
  padding-block: var(--space-3);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee--reverse .marquee__track {
  animation-direction: reverse;
  animation-duration: 32s;
}
.marquee__track img {
  height: 48px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  opacity: .9;
  flex-shrink: 0;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ==========================================================================
   PROCESO (6 pasos)
   ========================================================================== */
.process {
  position: relative;
  color: #fff;
  padding-block: var(--space-6);
  overflow: hidden;
}
.process__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.process__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.process__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,10,20,.88), rgba(5,10,20,.93));
}
.process .container { position: relative; z-index: 1; }

.process__title {
  color: #fff;
  font-size: clamp(30px, 6vw, 46px);
  text-transform: uppercase;
  margin-bottom: var(--space-5);
  line-height: 1.15;
}
.process__title span { color: #fff; font-weight: 400; }
.process__title strong { color: var(--color-primary); }

.process__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.process__step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-left: 76px;
  position: relative;
  min-height: 64px;
}
.process__number {
  color: var(--color-primary);
  font-size: 28px;
  font-weight: 800;
}
.process__icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.process__step p {
  font-size: 14px;
  color: #eee;
  max-width: 320px;
}

/* ==========================================================================
   CTA FINAL
   ========================================================================== */
.cta-final {
  background: var(--color-primary);
  color: #fff;
  padding-block: var(--space-6);
  text-align: center;
}
.cta-final__box {
  background: #fff;
  color: var(--color-black);
  padding: var(--space-3);
  border-radius: 4px;
  max-width: 720px;
  margin: 0 auto var(--space-4);
}
.cta-final__box h2 {
  font-size: clamp(22px, 4.5vw, 34px);
  font-weight: 800;
  line-height: 1.25;
}
.cta-final__box h2 span { color: var(--color-primary); }
.cta-final__text {
  max-width: 720px;
  margin: 0 auto var(--space-4);
  font-size: clamp(16px, 2.4vw, 20px);
}
.cta-final__buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-black);
  color: #fff;
  padding-block: var(--space-6) var(--space-4);
}
.site-footer__title {
  color: #fff;
  text-align: center;
  font-size: clamp(20px, 3.5vw, 28px);
  margin-bottom: var(--space-5);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.site-footer__col h3 {
  color: var(--color-primary);
  font-size: 20px;
  margin-bottom: var(--space-2);
}
.site-footer__col p {
  margin-bottom: var(--space-2);
  font-size: 14px;
  color: #ddd;
}
.site-footer__col a:hover { color: var(--color-primary); }
.site-footer__col--map iframe {
  border-radius: 8px;
  filter: grayscale(.2);
}
.site-footer__copy {
  text-align: center;
  margin-top: var(--space-5);
  font-size: 12px;
  color: #888;
}

/* ==========================================================================
   WHATSAPP WIDGET
   ========================================================================== */
.wa-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999;
}
.wa-widget__bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.wa-widget__panel {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: min(300px, 82vw);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
.wa-widget__header {
  background: #075e54;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.wa-widget__close {
  font-size: 20px;
  line-height: 1;
  color: #fff;
}
.wa-widget__body {
  padding: 16px;
  background: #ece5dd;
}
.wa-widget__agent {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
}
.wa-widget__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.wa-widget__status {
  font-size: 12px;
  color: #4caf50;
  display: flex;
  align-items: center;
  gap: 4px;
}
.wa-widget__status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  display: inline-block;
}

/* ==========================================================================
   SCROLL ANIMATIONS
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   BREAKPOINTS
   ========================================================================== */

/* Small phones (iPhone SE ~375px is base already covered) */
@media (max-width: 374px) {
  .hero__title { font-size: 26px; }
  .lead-form { padding: var(--space-2); }
}

/* Large phones */
@media (min-width: 480px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .cta-final__buttons { flex-direction: row; justify-content: center; }
}

/* Tablets vertical (iPad) */
@media (min-width: 768px) {
  .hero__container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
  .hero__content { flex: 1 1 50%; padding-top: var(--space-4); }
  .lead-form { flex: 1 1 44%; }

  .partner__container { flex-direction: row; text-align: left; justify-content: space-between; }
  .partner__content { flex: 1 1 55%; }
  .partner__media { flex: 1 1 40%; text-align: center; }

  .projects__grid { grid-template-columns: repeat(3, 1fr); }

  .stats__container { flex-direction: row; justify-content: space-around; }

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

  .site-footer__grid { grid-template-columns: repeat(3, 1fr); }

  .process__steps {
    grid-template-columns: repeat(3, 1fr);
    row-gap: var(--space-6);
  }
  .process__step:nth-child(even) { margin-top: var(--space-5); }
}

/* Small laptops / tablets horizontal */
@media (min-width: 1024px) {
  .projects__grid { grid-template-columns: repeat(5, 1fr); }
  .why__grid { grid-template-columns: repeat(4, 1fr); }
  .hero__logo { width: 200px; }
}

/* Desktop */
@media (min-width: 1280px) {
  :root { --space-7: 120px; }
}

/* Ultrawide */
@media (min-width: 1920px) {
  :root { --container-width: 1400px; }
  body { font-size: 18px; }
}
