/* =========================================
   RESET & BASE
========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:   #1a3c8f;
  --blue2:  #2555c0;
  --red:    #e02020;
  --red2:   #ff3a3a;
  --white:  #ffffff;
  --gray:   #f4f6fb;
  --dark:   #111827;
  --text:   #374151;
  --wa:     #25D366;
  --wa-d:   #128C7E;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
}

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

a { text-decoration: none; color: inherit; }

/* =========================================
   UTILITY
========================================= */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--wa);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background .25s, transform .2s, box-shadow .25s;
  box-shadow: 0 4px 18px rgba(37,211,102,.35);
  text-decoration: none;
}
.btn-wa:hover {
  background: var(--wa-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,.45);
}
.btn-wa svg { flex-shrink: 0; }

.section-tag {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}
.section-title span { color: var(--blue2); }

.section-body {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 600px;
  margin-top: 14px;
}

section { padding: 72px 0; }

/* =========================================
   NAVBAR
========================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
#navbar.scrolled {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-logo img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  font-size: .92rem;
  font-weight: 600;
  color: var(--dark);
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--gray); color: var(--blue2); }

/* WhatsApp nav button */
.nav-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wa);
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 50px;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  flex-shrink: 0;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.nav-wa-btn:hover {
  background: var(--wa-d);
  transform: scale(1.04);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid #e5e7eb;
  padding: 12px 20px 20px;
  gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  padding: 12px 10px;
  border-radius: 8px;
  transition: background .2s;
}
.mobile-menu a:hover { background: var(--gray); }

/* =========================================
   HERO / SLIDER
========================================= */
#inicio {
  padding: 0;
  margin-top: 68px;
  position: relative;
  overflow: hidden;
  height: calc(100vh - 68px);
  min-height: 480px;
  max-height: 820px;
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.slide.active { opacity: 1; }

#dissolveCanvas {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: none;
  pointer-events: none;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Dark overlay */
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,25,80,.72) 0%,
    rgba(180,10,10,.38) 100%
  );
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 20px;
  gap: 18px;
}

.hero-badge {
  background: var(--red);
  color: var(--white);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 50px;
  animation: pulse-badge 2.5s infinite;
}
@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,32,32,.5); }
  50% { box-shadow: 0 0 0 10px rgba(224,32,32,0); }
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
  max-width: 800px;
}
.hero-title strong { color: #ffd843; }

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: rgba(255,255,255,.9);
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
  max-width: 560px;
}

.hero-cta { margin-top: 8px; }
.hero-cta .btn-wa { font-size: 1.1rem; padding: 16px 34px; }

/* Slider dots */
.slider-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  gap: 10px;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  transition: background .3s, transform .3s;
}
.dot.active { background: var(--white); transform: scale(1.4); }

/* Slider arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.5);
  color: var(--white);
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s;
}
.slider-arrow:hover { background: rgba(255,255,255,.38); }
.slider-arrow.prev { left: 18px; }
.slider-arrow.next { right: 18px; }

/* =========================================
   TRUST BAR
========================================= */
.trust-bar {
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue2) 100%);
  padding: 0;
}
.trust-bar .container {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}
.trust-bar .container::-webkit-scrollbar { display: none; }

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  color: var(--white);
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.15);
  flex: 1;
  justify-content: center;
  min-width: 180px;
}
.trust-item:last-child { border-right: none; }
.trust-item svg { flex-shrink: 0; }
.trust-item span { font-size: .9rem; font-weight: 600; }

/* =========================================
   CÓMO FUNCIONA
========================================= */
#como-funciona { background: var(--gray); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

.col-text { display: flex; flex-direction: column; gap: 16px; }

.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue2);
  color: var(--white);
  font-weight: 800;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(37,85,192,.3);
}
.step-info strong {
  display: block;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 2px;
}
.step-info p { font-size: .93rem; color: var(--text); }

.col-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.col-img img { width: 100%; height: 100%; object-fit: cover; max-height: 460px; }
.col-img img.map-img {
  object-fit: contain;
  object-position: center;
  max-height: 460px;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 32px rgba(10,40,160,.25));
}

/* =========================================
   MARCAS
========================================= */
#marcas { background: var(--white); }

/* --- Vitrina 3D giratoria --- */
.vitrina-wrapper {
  width: 100%;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
}
.vitrina-scene {
  width: 140px;
  height: 140px;
  position: relative;
  transform-style: preserve-3d;
  animation: vitrinaGiro 34s linear infinite;
}
@keyframes vitrinaGiro {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}
.vitrina-card {
  position: absolute;
  width: 140px;
  height: 140px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  backface-visibility: visible;
  border: 2px solid #e5e7eb;
  transition: border-color .3s;
}
.vitrina-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.vitrina-card span {
  font-size: .82rem;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: .5px;
}
/* posición de cada cara (5 logos = 72° entre cada uno) */
.vitrina-card:nth-child(1) { transform: rotateY(0deg)   translateZ(200px); }
.vitrina-card:nth-child(2) { transform: rotateY(72deg)  translateZ(200px); }
.vitrina-card:nth-child(3) { transform: rotateY(144deg) translateZ(200px); }
.vitrina-card:nth-child(4) { transform: rotateY(216deg) translateZ(200px); }
.vitrina-card:nth-child(5) { transform: rotateY(288deg) translateZ(200px); }
.vitrina-wrapper:hover .vitrina-scene {
  animation-play-state: paused;
}

.brands-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.brand-pill {
  background: var(--gray);
  color: var(--dark);
  font-weight: 700;
  font-size: .92rem;
  padding: 8px 20px;
  border-radius: 50px;
  border: 2px solid #e5e7eb;
  transition: background .2s, border-color .2s, color .2s;
}
.brand-pill:hover {
  background: var(--blue2);
  color: var(--white);
  border-color: var(--blue2);
}

/* =========================================
   COBERTURA
========================================= */
#cobertura { background: var(--gray); }

.coverage-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ecfdf5;
  border: 2px solid #6ee7b7;
  color: #065f46;
  font-weight: 700;
  font-size: .9rem;
  padding: 8px 18px;
  border-radius: 50px;
  margin-top: 14px;
}

/* =========================================
   CTA BANNER
========================================= */
.cta-section {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue2) 50%, var(--red) 100%);
  padding: 72px 0;
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.cta-section p {
  color: rgba(255,255,255,.88);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 28px;
}

/* =========================================
   CONTACTO
========================================= */
#contacto { background: var(--white); }

/* --- Redes sociales --- */
.social-block {
  margin-top: 28px;
}
.social-block h4 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 14px;
  font-size: 1rem;
}
.social-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray);
  border-radius: 50px;
  padding: 10px 18px;
  text-decoration: none;
  font-weight: 700;
  font-size: .88rem;
  color: var(--dark);
  border: 2px solid #e5e7eb;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.social-link img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  border-color: var(--blue2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.contact-info { display: flex; flex-direction: column; gap: 20px; }

.contact-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--gray);
  border-radius: var(--radius);
  padding: 18px 22px;
  border-left: 4px solid var(--blue2);
}
.contact-card svg { flex-shrink: 0; margin-top: 2px; }
.contact-card h4 { font-weight: 700; color: var(--dark); margin-bottom: 2px; }
.contact-card p { font-size: .92rem; color: var(--text); }

.contact-form {
  background: var(--gray);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-form h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: .88rem; font-weight: 600; color: var(--dark); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--dark);
  transition: border-color .2s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue2);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.btn-submit {
  width: 100%;
  background: var(--blue2);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .25s, transform .2s;
}
.btn-submit:hover { background: var(--blue); transform: translateY(-1px); }

/* =========================================
   FOOTER
========================================= */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 32px 20px;
  font-size: .88rem;
}
footer strong { color: var(--white); }
footer a { color: var(--wa); }

/* =========================================
   FLOATING WHATSAPP
========================================= */
.float-wa {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.float-wa-tooltip {
  background: var(--dark);
  color: var(--white);
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.float-wa:hover .float-wa-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.float-wa-btn {
  width: 60px;
  height: 60px;
  background: var(--wa);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.5);
  animation: wa-bounce 3s ease-in-out infinite;
  transition: transform .2s, background .2s;
  text-decoration: none;
}
.float-wa-btn:hover {
  background: var(--wa-d);
  transform: scale(1.1);
  animation: none;
}
@keyframes wa-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Ripple */
.float-wa-btn::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(37,211,102,.35);
  animation: wa-ripple 2.5s ease-out infinite;
}
@keyframes wa-ripple {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* =========================================
   SCROLL TO TOP
========================================= */
#scrollTop {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 9998;
  width: 42px;
  height: 42px;
  background: var(--blue2);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 3px 14px rgba(0,0,0,.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
#scrollTop.visible { opacity: 1; transform: none; pointer-events: auto; }
#scrollTop:hover { background: var(--blue); }

/* =========================================
   ANIMATIONS
========================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 900px) {
  .two-col,
  .two-col.reverse,
  .contact-grid {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .two-col.reverse { direction: ltr; }
  .col-img { max-height: 300px; }
  .col-img img { max-height: 300px; }
}

@media (max-width: 680px) {
  .nav-links,
  .nav-wa-btn { display: none; }
  .hamburger { display: flex; }

  #inicio { height: 70vh; min-height: 420px; max-height: none; }

  .hero-title { font-size: clamp(1.6rem, 7vw, 2.4rem); }

  .trust-item { padding: 14px 18px; min-width: 160px; }

  section { padding: 52px 0; }

  .contact-form { padding: 22px 18px; }

  .float-wa-btn { width: 54px; height: 54px; }
  .float-wa-btn::before { width: 54px; height: 54px; }
  .float-wa { bottom: 20px; right: 16px; }
  #scrollTop { bottom: 88px; right: 16px; }
}
