/* ═══════════════════════════════════════════
   ROTEX Distrito 4340 — Estilos del Home
   css/home.css
   ═══════════════════════════════════════════ */

/* ─────────────────────────────────────────
   1. HERO
   ───────────────────────────────────────── */
.hero {
  min-height: 100vh;
  background:
    linear-gradient(160deg, rgba(9,29,62,0.88) 0%, rgba(23,69,143,0.72) 60%, rgba(9,29,62,0.92) 100%),
    url('https://images.unsplash.com/photo-1529156069898-49953e39b3ac?w=1600&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(247, 168, 27, 0.11) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--white));
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero-badge {
  display: inline-block;
  background: rgba(247, 168, 27, 0.15);
  border: 1px solid rgba(247, 168, 27, 0.4);
  color: var(--gold);
  font-size: 11px; font-weight: 500;
  letter-spacing: 2.5px; text-transform: uppercase;
  padding: 6px 20px;
  border-radius: 40px;
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease both;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(46px, 7.5vw, 84px);
  font-weight: 700;
  color: #fff;
  line-height: 1.07;
  margin-bottom: 12px;
  animation: fadeUp 0.8s ease 0.12s both;
}
.hero h1 em { color: var(--gold); font-style: italic; }

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.75;
  animation: fadeUp 0.8s ease 0.25s both;
}


.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s ease 0.38s both;
}

.hero-btns a {
  cursor: pointer;
}

.hero-social-proof {
  margin-top: 52px;
  animation: fadeUp 0.8s ease 0.52s both;
}
.hero-social-proof p {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 12px;
}

/* Marquee de banderas */
.flag-marquee   { overflow: hidden; }
.marquee-track  {
  display: flex;
  gap: 10px;
  align-items: center;
  animation: marquee 22s linear infinite;
  width: max-content;
}
.marquee-item { font-size: 22px; flex-shrink: 0; }

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────
   2. BARRA DE ESTADÍSTICAS
   ───────────────────────────────────────── */
.stat-bar {
  background: linear-gradient(135deg, #1e4d96 0%, #15386f 100%);
  padding: 56px 40px;
  border-radius: 12px;
  margin: 60px auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.stat-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 180px;
  text-align: center;
  position: relative;
  padding: 10px 25px;
  transition: all .3s ease;
}

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

.stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 75px;
  background: rgba(255,255,255,.15);
}

.stat-num {
  display: block;
  font-family: var(--sans);
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  font-weight: 400;
  letter-spacing: .4px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.stat-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--gold);
  opacity: 0.6;
}

/* ─────────────────────────────────────────
   3. ¿QUÉ ES ROTEX?
   ───────────────────────────────────────── */
.what .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 88px;
  align-items: center;
}

.what-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pillar {
  background: var(--off-white);
  border-radius: 20px;
  padding: 28px 24px;
  border: 1px solid rgba(23, 69, 143, 0.05);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.pillar:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(247, 168, 27, 0.15);
}

.pillar-icon { width: 26px; height: 26px; color: var(--gold); margin-bottom: 10px; }
.pillar-icon .icon { width: 100%; height: 100%; }
.pillar-title { font-size: 14px; font-weight: 500; color: var(--blue); margin-bottom: 4px; }
.pillar-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.55; }

/* ─────────────────────────────────────────
   4. CÓMO FUNCIONA (PROCESO)
   ───────────────────────────────────────── */
.proceso { background: var(--off-white); }
.proceso-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }

.proceso-step {
  background: var(--white);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(23, 69, 143, 0.05);
}

.proceso-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold-light);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}

.proceso-step h3 { font-size: 18px; font-weight: 500; color: var(--blue); margin-bottom: 10px; }
.proceso-step p  { font-size: 14px; color: var(--text-muted); line-height: 1.7; font-weight: 300; }

.proceso-connector {
  position: absolute;
  top: 50px; right: -24px;
  font-size: 24px;
  color: var(--gold);
  opacity: 0.5;
}

/* Nota: .cta-mid se movió a global.css */

/* ─────────────────────────────────────────
   5. BENEFICIOS / RAZONES
   ───────────────────────────────────────── */
.razones { background: var(--white); }
.razones .container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 72px;
  align-items: flex-start;
}

.benefits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.benefit-card {
  padding: 32px;
  border-radius: 20px;
  background: var(--off-white);
  border: 1px solid rgba(23, 69, 143, 0.05);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.benefit-icon { width: 32px; height: 32px; color: var(--blue); margin-bottom: 16px; }
.benefit-icon .icon { width: 100%; height: 100%; }
.benefit-card h3 { font-size: 16px; font-weight: 500; color: var(--blue); margin-bottom: 8px; }
.benefit-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; font-weight: 300; }

/* ─────────────────────────────────────────
   6. ACTIVIDADES
   ───────────────────────────────────────── */
.actividades { background: var(--off-white); }
.acts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; }

.act-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 28px;
  border: 1px solid rgba(23, 69, 143, 0.05);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.act-emoji { display: block; font-size: 26px; color: var(--gold); margin-bottom: 16px; }
.act-emoji .icon { width: 32px; height: 32px; }
.act-card h3 { font-size: 17px; font-weight: 500; color: var(--blue); margin-bottom: 8px; }
.act-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; font-weight: 300; }

/* ─────────────────────────────────────────
   7. EVENTO DESTACADO (NOCHE DE CHAQUETAS)
   ───────────────────────────────────────── */
.evento {
  background:
    linear-gradient(160deg, rgba(9, 29, 62, 0.94) 0%, rgba(9, 29, 62, 0.94) 100%),
    url('https://images.unsplash.com/photo-1511795409834-ef04bbd61622?w=1200&q=80') center/cover no-repeat;
  padding: 100px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(247, 168, 27, 0.12);
}

.evento::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(247, 168, 27, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.evento-badge {
  display: inline-block;
  background: rgba(247, 168, 27, 0.15);
  border: 1px solid rgba(247, 168, 27, 0.4);
  color: var(--gold);
  font-size: 10px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 40px;
  margin-bottom: 24px;
}

.evento .section-title { color: #fff; }
.evento .section-body  { color: rgba(255, 255, 255, 0.65); margin: 0 auto 20px; }

.evento-date {
  font-size: 18px;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 28px;
}

.evento-features {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.evento-feat { display: flex; align-items: center; gap: 10px; }
.evento-feat-icon { width: 22px; height: 22px; color: var(--gold); opacity: 0.8; }
.evento-feat-icon .icon { width: 100%; height: 100%; }
.evento-feat-label { font-size: 13px; color: rgba(255, 255, 255, 0.75); font-weight: 300; }

/* ─────────────────────────────────────────
   8. TESTIMONIOS (CAROUSEL GRID)
   ───────────────────────────────────────── */
.testi      { background: var(--white); }
.testi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; }

.testi-card {
  background: var(--off-white);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  transition: transform 0.25s;
  border: 1px solid rgba(23, 69, 143, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testi-card:hover { transform: translateY(-3px); }

.testi-quote-mark {
  position: absolute;
  top: -12px; left: 32px;
  font-family: var(--serif);
  font-size: 96px;
  color: var(--gold);
  opacity: 0.25;
  line-height: 1;
}

.testi-text {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 8px;
  z-index: 1;
}

/* Clases de colapso de texto para "Ver más" */
.testi-text.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 102px; /* Fallback */
}

/* Botón "Ver más" de testimonios */
.testi-more-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  display: inline-block;
  font-family: var(--sans);
  text-align: left;
  outline: none;
  transition: color 0.15s;
}
.testi-more-btn:hover {
  color: #ffc03a;
}

.testi-author { display: flex; align-items: center; gap: 11px; margin-top: auto; }

.testi-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--blue-dark);
  color: #fff;
  display: flex;
  align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(23, 69, 143, 0.15);
}

/* Colores de avatares de testimonio */
.testi-avatar.av1 { background: var(--blue); }
.testi-avatar.av2 { background: #d0840b; }
.testi-avatar.av3 { background: #62148a; }
.testi-avatar.av4 { background: #0c6258; }

.testi-name    { font-size: 14px; font-weight: 500; color: var(--blue); }
.testi-country { font-size: 12px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; }
.testi-country .fi { font-size: 14px; border-radius: 2px; }

/* ─────────────────────────────────────────
   9. VIDEO INFORMATIVO
   ───────────────────────────────────────── */
.video-section { background: var(--off-white); }
.video-section .container { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 64px; align-items: center; }

.video-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.video-tag {
  background: var(--white);
  border: 1px solid rgba(23, 69, 143, 0.1);
  color: var(--blue);
  font-size: 13px; font-weight: 400;
  padding: 6px 14px;
  border-radius: 40px;
}
.video-tag .icon { color: var(--gold); }

.video-embed {
  position: relative;
  padding-bottom: 75%; /* Aspect ratio 4:3 */
  height: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(23, 69, 143, 0.08);
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ─────────────────────────────────────────
   10. UNIRSE A ROTEX
   ───────────────────────────────────────── */
.unirse { background: var(--white); }
.unirse .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 72px; align-items: center; }

.steps { display: flex; flex-direction: column; gap: 28px; margin-top: 36px; }

.step { display: flex; gap: 20px; }

.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gold-light);
  color: var(--gold);
  font-family: var(--serif); font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.step-content h3 { font-size: 16px; font-weight: 500; color: var(--blue); margin-bottom: 4px; }
.step-content p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; font-weight: 300; }

.cta-card {
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue-dark) 100%);
  border-radius: 28px;
  padding: 48px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(247, 168, 27, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.cta-card h3 { font-family: var(--serif); font-size: clamp(24px, 4vw, 32px); color: var(--gold); line-height: 1.2; margin-bottom: 12px; position: relative; }
.cta-card p  { font-size: 15px; color: rgba(255, 255, 255, 0.72); line-height: 1.65; font-weight: 300; margin-bottom: 28px; position: relative; }
.cta-card-note { font-size: 11px; color: rgba(255, 255, 255, 0.4); margin-top: 16px; font-weight: 300; position: relative; }

/* ─────────────────────────────────────────
   11. RESPONSIVE (HOME)
   ───────────────────────────────────────── */
@media (max-width: 900px) {
  .what .container,
  .razones .container,
  .video-section .container,
  .unirse .container { grid-template-columns: 1fr; gap: 36px; }

  .benefits-grid,
  .proceso-steps { grid-template-columns: 1fr; }

  .acts-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: 1fr; }
  .stat-bar .container { gap: 32px; }
}

@media (max-width: 600px) {
  .acts-grid,
  .what-pillars { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; align-items: center; }
  .proceso-connector { display: none; }

  /* Ajustes Hero Mobile */
  .hero-badge {
    font-size: 9px !important;
    letter-spacing: 1.5px !important;
    padding: 4px 12px !important;
    max-width: 100%;
    word-wrap: break-word;
  }
  .hero-sub {
    font-size: 15px !important;
    max-width: 50%;
    padding: 0 15px !important;
  }

  /* Barra de Estadísticas 2x2 en Móvil */
  .stat-bar {
    padding: 32px 16px !important;
    margin: 30px auto !important;
  }
  .stat-bar .container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px 12px !important;
  }
  .stat-item {
    padding: 8px 12px !important;
    min-width: unset !important;
  }
  .stat-num {
    font-size: 32px !important;
    margin-bottom: 6px !important;
  }
  .stat-label {
    font-size: 11px !important;
    padding-bottom: 8px !important;
  }
  .stat-item:not(:last-child)::after {
    display: none !important;
  }

  /* Comillas Testimonios Mobile */
  .testi-quote-mark {
    font-size: 64px !important;
    top: -6px !important;
    left: 20px !important;
    opacity: 0.15 !important;
  }
  .testi-card {
    padding: 30px 24px !important;
  }
}
