/* =========================================================
   BASE — compartido entre todas las páginas del sitio
   (reset, tipografía, navbar, footer, whatsapp, animaciones
   de entrada genéricas, estados de formulario)
========================================================= */

/* =========================
   TIPOGRAFÍA (SISTEMA YATYTECH)
   - Base: 400
   - Énfasis leve / links: 500
   - Títulos sección / cards / botones: 600
   - Logo / activos: 700
   - Hero principal: 800
========================= */

/* RESET + TIPOGRAFÍA GLOBAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #fff;
  font-weight : 500; /* base */
}

/* =========================
   NAVBAR BASE
========================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 48px;
  border-bottom: 1px solid #eee;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(15, 23, 42, 0.08);
  border-bottom-color: rgba(226, 232, 240, 0.6);
}

/* =========================
   LOGO
========================= */

.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-logo img {
  width: 70px;
  height: auto;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ff7a18;
}

.brand2 {
  color: #0b2c5d;
  font-weight: 700;
}

/* =========================
   LINKS (DESKTOP BASE)
========================= */

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: #0b2c5d;
  transition: all 0.3s ease;
  display: inline-block;
}

/* Hover elegante */
.nav-links a:hover {
  color: #ff7a18;
  transform: translateY(-3px);
}

/* Activo */
.nav-links li.active a {
  font-weight: 600;
}

/* Punto activo */
.nav-links li.active::after {
  content: "";
  width: 5px;
  height: 5px;
  background: #ff7a18;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
}

/* =========================
   RIGHT SIDE (IDIOMA + CTA + HAMBURGER)
========================= */

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

/* =========================
   LANGUAGE SWITCH (UNO SOLO)
========================= */

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: all 0.3s ease;
}

/* Glow muy sutil en hover */
.lang-switch:hover {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

/* Botones */
.lang-btn {
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  letter-spacing: 0.5px;
}

/* Hover elegante */
.lang-btn:hover {
  color: #0f172a;
}

/* Activo estilo SaaS */
.lang-btn.active {
  color: #0f172a;
  font-weight: 600;
  background: white;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Separador invisible (solo mantiene estructura) */
.lang-separator {
  display: none;
}

/* =========================
   BOTÓN DESKTOP
========================= */

.nav-btn {
  background: #ff7a18;
  color: white;
  padding: 10px 22px;
  border-radius: 24px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 122, 24, 0.2);
}

/* =========================
   HAMBURGER
========================= */

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1100;
}

.hamburger .material-symbols-outlined {
  font-size: 32px;
  color: #0b2c5d;
  transition: 0.3s ease;
}

/* =========================
   VISIBILIDAD
========================= */

.desktop-only {
  display: inline-block;
}

.mobile-only {
  display: none;
}

.mobile-contact {
  display: none;
}

/* =========================
   RESPONSIVE (MOBILE)
========================= */

@media (max-width: 900px) {
  .navbar {
    padding: 12px 24px;
  }

  .nav-logo img {
    width: 50px;
  }

  .brand {
    font-size: 16px;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 72px);
    background: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    transition: right 0.35s ease;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 18px;
    font-weight: 500;
    transform: none;
  }

  .nav-links a:hover {
    transform: none;
  }

  .nav-links li.active a {
    font-weight: 700;
    color: #0f172a;
  }

  .mobile-contact {
    display: block;
    margin-top: 16px;
  }

  .nav-links .nav-btn-mobile {
    background: #ff7a18;
    color: white;
    padding: 12px 26px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
  }

  .nav-links .nav-btn-mobile:hover {
    color: white;
    box-shadow: 0 5px 15px rgba(255, 122, 24, 0.2);
  }

  .lang-switch {
    padding: 6px 10px;
  }

  .lang-btn,
  .lang-separator {
    font-size: 14px;
  }
}

/* SECCIONES (genérico, usado por cualquier página) */
.section {
  min-height: 100vh;
  padding: 120px 48px;
  font-size: 32px;
  font-weight: 700;
  color: #0b2c5d;
}

section {
  scroll-margin-top: 90px;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */

.footer {
  background: #fff;
  padding: 80px 48px 40px;
  border-top: 1px solid #eee;
  position: relative;
  overflow: hidden;
}

/* Línea tricolor superior */
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #f97316 30%, #0b2c5d 70%, transparent 100%);
  opacity: 0.6;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 60px;
  max-width: 1200px;
  margin: auto;
}

.footer-logo {
  font-size: 22px;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-brand p {
  font-size: 14px;
  color: #9a9a9a;
  line-height: 1.7;
  font-weight: 500;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #9a9a9a;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 14px;
}

.footer-col a {
  text-decoration: none;
  color: #000;
  font-size: 14px;
  font-weight: 500;
}

.footer-col a:hover {
  text-decoration: underline;
}

.newsletter {
  display: flex;
  align-items: center;
  gap: 16px;
}

.newsletter input {
  border: none;
  border-bottom: 1px solid #000;
  padding: 6px 0;
  font-size: 14px;
  outline: none;
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.newsletter button {
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.newsletter button {
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  opacity: 1 !important;
  color: #000 !important;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.footer-bottom p {
  font-size: 13px;
  color: #000;
  font-weight: 500;
}

@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .newsletter {
    flex-direction: column;
    align-items: flex-start;
  }

  .newsletter input {
    width: 100%;
  }

  .newsletter button {
    margin-top: 10px;
  }
}

/* ================= WHATSAPP ================= */
.whatsapp-float {
  position: fixed;
  width: 68px;
  height: 68px;
  bottom: 30px;
  right: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #1ebe5d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
}

.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.4), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: -1;
}

.whatsapp-float:hover {
  transform: translateY(-6px) scale(1.08);
  box-shadow: 0 18px 45px rgba(37, 211, 102, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.whatsapp-float:hover::before {
  opacity: 1;
  transform: scale(1.1);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  transition: transform 0.4s ease;
}

.whatsapp-float:hover svg {
  transform: rotate(-8deg);
}

@media (max-width: 768px) {
  .whatsapp-float {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }
}

/* =====================================================
   ANIMACIONES DE ENTRADA — CLASES BASE (genéricas)
===================================================== */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-mid:   650ms;
  --dur-slow:  900ms;
}

.anim-fade-up {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity var(--dur-mid) var(--ease-out-expo),
    transform var(--dur-mid) var(--ease-out-expo);
  will-change: opacity, transform;
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(-36px);
  transition:
    opacity var(--dur-mid) var(--ease-out-expo),
    transform var(--dur-mid) var(--ease-out-expo);
  will-change: opacity, transform;
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(36px);
  transition:
    opacity var(--dur-mid) var(--ease-out-expo),
    transform var(--dur-mid) var(--ease-out-expo);
  will-change: opacity, transform;
}

.anim-pop {
  opacity: 0;
  transform: scale(0.88);
  transition:
    opacity var(--dur-mid) var(--ease-out-back),
    transform var(--dur-mid) var(--ease-out-back);
  will-change: opacity, transform;
}

.anim-clip {
  clip-path: inset(0 0 100% 0);
  transition: clip-path var(--dur-slow) var(--ease-out-expo);
  will-change: clip-path;
}

/* Activados */
.anim-fade-up.in-view,
.anim-fade-left.in-view,
.anim-fade-right.in-view {
  opacity: 1;
  transform: translate(0, 0);
}

.anim-pop.in-view {
  opacity: 1;
  transform: scale(1);
}

.anim-clip.in-view {
  clip-path: inset(0 0 0% 0);
}

/* =====================================================
   YT-REVEAL (sistema previo, mantenido por compatibilidad)
===================================================== */
.yt-reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition:
    opacity 650ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 650ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 650ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform, filter;
}

.yt-reveal.yt-inview {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.yt-reveal-soft {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.yt-reveal-soft.yt-inview {
  opacity: 1;
  transform: translateY(0);
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up, .anim-fade-left, .anim-fade-right, .anim-pop, .anim-clip,
  .yt-reveal, .yt-reveal-soft {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    filter: none !important;
  }
}

/* Mobile: reducir desplazamiento */
@media (max-width: 768px) {
  .anim-fade-up    { transform: translateY(20px); }
  .anim-fade-left  { transform: translateX(-20px); }
  .anim-fade-right { transform: translateX(20px); }
}

/* ── FIELD STATES (formularios — reutilizable en cualquier página) ── */
.input-group.has-error input,
.input-group.has-error textarea,
.phone-group.has-error #phone-input,
.custom-select-group.has-error .custom-select {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.input-group.has-success input,
.input-group.has-success textarea,
.phone-group.has-success #phone-input {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.07);
}

.input-group.has-error label,
.input-group.has-error .phone-label {
  color: #ef4444;
}

.input-group.has-success label,
.phone-group.has-success .phone-label {
  color: #22c55e;
}

.field-hint {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #ef4444;
  margin-top: 5px;
  padding-left: 4px;
  min-height: 14px;
}

/* ── BTN STATES ── */
.btn-premium.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-premium.loading::after {
  width: 30%;
  animation: btn-progress 1.2s ease-in-out infinite alternate;
}

@keyframes btn-progress {
  from { width: 10%; left: 0; }
  to   { width: 60%; left: 30%; }
}

.btn-premium.success {
  background: #16a34a;
  cursor: default;
}

.btn-premium.success::after {
  width: 100%;
  background: rgba(255,255,255,0.2);
}

.btn-premium.btn-error {
  background: #ef4444;
}
