/* ================= HERO CONTACTO ================= */
.contact-hero {
  position: relative;
  text-align: center;
  padding: 120px 20px 110px;
  background:
    linear-gradient(
      rgba(255,255,255,0.82),
      rgba(255,255,255,0.88)
    ),
    url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=2000')
    center/cover no-repeat;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.contact-hero h1 {
  color: #0f172a;
  font-size: 3rem;
}

.contact-hero p {
  color: #475569;
}

/* ===== HERO CONTACTO DARK MODE ===== */
body.dark .contact-hero {
  background:
    linear-gradient(rgba(10,15,44,0.85), rgba(10,15,44,0.90)),
    url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=2000')
    center/cover no-repeat;
  border-bottom: none;
}

body.dark .contact-hero h1,
body.dark .contact-hero p {
  color: #fff;
}

/* GRID CONTACTO */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 60px;
}

/* FORMULARIO */
.contact-form {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* INPUTS */
.input-group {
  position: relative;
  margin-bottom: 25px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
}

.input-group textarea {
  resize: none;
}

#mensaje {
  min-height: 140px;
}

.input-group label {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #888;
  transition: 0.3s;
  pointer-events: none;
}

/* Reemplaza esta regla en tu CSS para que use la validación por JS o por texto escrito */
.input-group input:focus + label,
.input-group textarea:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group textarea:not(:placeholder-shown) + label,
.input-group.input-error label {
  top: -10px;
  left: 8px;
  font-size: 12px;
  color: #7b5cff;
  background: white;
  padding: 0 5px;
}

/* Y añade esta línea para que el truco de arriba funcione con inputs vacíos */
.input-group input, .input-group textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
}
/* Asegura que el buscador entienda que hay un placeholder invisible */
.input-group input::placeholder, .input-group textarea::placeholder {
  color: transparent;
}

/* ERRORES Y VALIDACIONES */
.error {
  color: #ef4444;
  font-size: 12px;
  display: none;
  margin-top: 5px;
}

.input-group.input-error input,
.input-group.input-error textarea,
.input-error input,
.input-error textarea {
  border-color: #ef4444 !important;
}

.input-group.input-error .error,
.input-error .error {
  display: block;
}

/* BOTÓN ENVIAR Y ESTADO LOADING */
#submitBtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.loader {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
}

#submitBtn.loading span {
  visibility: hidden;
  opacity: 0;
}

#submitBtn.loading .loader {
  display: block;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* MENSAJE SUCCESS */
.success-msg {
  color: green;
  display: none;
  margin-top: 15px;
}

/* BLOQUE INFO DERECHA */
.contact-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.contact-subtitle {
  color: #666;
  margin-bottom: 25px;
}

.contact-actions {
  margin-bottom: 25px;
}

/* BOTÓN WHATSAPP */
.whatsapp-btn {
  display: inline-block;
  background: linear-gradient(135deg, #25D366, #1ebe5d);
}

/* BENEFICIOS CONTACTO */
.contact-benefits {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 15px;
  background: white;
  padding: 18px;
  border-radius: 12px;
  transition: 0.3s;
}

.benefit:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.benefit strong {
  color: #111;
}

.benefit p {
  color: #666;
}

.icon {
  font-size: 20px;
}

/* EMAIL CARD */
.contact-email-pro {
  background: linear-gradient(135deg, #ffffff, #f7f9fc);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid #eaeaea;
  margin-bottom: 25px;
  transition: 0.3s;
}

.contact-email-pro:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.06);
}

.email-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.email-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.email-status {
  font-size: 12px;
  color: #22c55e;
  font-weight: 600;
}

.email-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  margin-bottom: 10px;
}

.email-icon {
  font-size: 18px;
}

.email-link {
  font-weight: 600;
  text-decoration: none;
  color: #111;
  transition: 0.3s;
}

.email-link:hover {
  color: #4f46e5;
}

.email-note {
  font-size: 0.9rem;
  color: #666;
}

/* ===== FOOTER PREMIUM ===== */
.footer-pro {
  background: #0b0d12;
  color: #aaa;
  padding: 80px 20px 40px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.footer-pro h4 {
  color: white;
  margin-bottom: 15px;
  font-size: 14px;
}

.footer-pro a {
  display: block;
  text-decoration: none;
  color: #888;
  font-size: 14px;
  margin-bottom: 10px;
  transition: 0.3s;
}

.footer-pro a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 5px;
}

.logo {
  height: 28px;
  width: auto;
  display: block;
}

.brand-name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

/* ==================== LANG SWITCH (SELECTOR IDIOMAS) ==================== */
.lang-switch {
  position: relative;
  display: inline-block;
  margin-left: 12px;
  z-index: 100;
}

.lang-current {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: #0f1629;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}

.lang-current:hover {
  background: #1a2338 !important;
  border: 2px solid #00d4ff !important;
  box-shadow: 
    0 0 0 4px rgba(0, 212, 255, 0.25),
    0 6px 20px rgba(0, 212, 255, 0.45) !important;
}

.lang-switch:hover .lang-current {
  border: 2px solid transparent !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0px;
  background: #1f252f;
  border: 1px solid #444;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: none;
  min-width: 180px;
  padding: 8px 0;
  z-index: 9999;
}

.lang-switch:hover .lang-menu {
  display: block;
}

.flag-wrapper {
  display: inline-flex;
  padding: 2px;
  background: transparent;
  border: none;
}

.lang-current img,
.lang-option img {
  width: 26px;
  height: 17px;
  object-fit: cover;
  border-radius: 3px;
}

.arrow {
  font-size: 19px;
  line-height: 1;
  color: #ffffff;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #eee;
  text-decoration: none;
  font-size: 15px;
}

.lang-option:hover {
  background: #2a323f;
}

/* ===== FIX DARK MODE GENERAL ===== */
body.dark .contact-subtitle {
  color: var(--text-soft);
}

body.dark .input-group input,
body.dark .input-group textarea {
  background: #161a22;
  border: 1px solid #333;
  color: #f1f1f1;
}

body.dark .input-group label {
  color: #aaa;
}

body.dark .input-group input:focus + label,
body.dark .input-group textarea:focus + label,
body.dark .input-group input:valid + label,
body.dark .input-group textarea:valid + label {
  background: #161a22;
  color: var(--accent);
}

body.dark .contact-form .btn {
  color: white;
}

body.dark .contact-email-pro {
  background: #161a22;
  border: 1px solid #222;
}

body.dark .email-box {
  background: #0f1218;
  border: 1px solid #222;
}

body.dark .email-link {
  color: #f1f1f1;
}

body.dark .email-label {
  color: #aaa;
}

body.dark .email-note {
  color: var(--text-soft);
}

body.dark .benefit {
  background: #161a22;
}

body.dark .benefit strong {
  color: #f1f1f1;
}

body.dark .benefit p {
  color: var(--text-soft);
}

body.dark .success-msg {
  color: #22c55e;
}

body.dark .lang-menu {
  background: #1f252f;
  border-color: #444;
}

body.dark .lang-option {
  color: #eee;
}

body.dark .lang-option:hover {
  background: #2a323f;
}

/* ==================== NAVBAR FIX + MENÚ MÓVIL ==================== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 15px;
}

nav {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  justify-content: flex-end;
}

.desktop-nav {
  flex: 1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 34px;
  color: var(--primary);
  cursor: pointer;
  padding: 5px 10px;
}

body.dark .mobile-menu-btn {
  color: #fff;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(10, 15, 44, 0.97);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu-links {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 99999;
  overflow: hidden;
  width: 25%;
  min-width: 200px;
  max-width: 260px;
  height: 100%;
  background: #0a0f2c;
  padding: 30px 15px;
  border-radius: 0;
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.close-menu-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  z-index: 1000000;
}

.mobile-link {
  display: block;
  color: #fff;
  font-size: 1.1rem;
  padding: 12px 0;
  text-align: left;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.mobile-link:last-child {
  border-bottom: none;
}

.mobile-link:active {
  background: rgba(0, 212, 255, 0.12);
}

/* ============================================= */
/* RESPONSIVE GENERAL PARA MÓVIL Y TABLET        */
/* ============================================= */
@media (max-width: 991px) {
  .desktop-nav,
  .nav-right,
  .lang-switch {
    display: none !important;
  }
  .mobile-menu-btn {
    display: block;
  }

  .container {
    width: 94%;
    max-width: 100%;
    padding: 0 15px;
  }

  section {
    padding: 55px 0 !important;
  }

  .hero {
    padding: 90px 20px 70px !important;
  }

  .hero h1 {
    font-size: 2.35rem !important;
    line-height: 1.2 !important;
  }

  .hero p {
    font-size: 1.08rem !important;
  }

  .split {
    grid-template-columns: 1fr !important;
    gap: 35px !important;
  }

  .benefits {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .card {
    padding: 24px 18px !important;
  }

  .results-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }

  .result-card {
    padding: 28px 20px !important;
  }

  .btn {
    padding: 15px 30px !important;
    font-size: 1.08rem !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 25px auto !important;
    display: block !important;
  }

  h2 {
    font-size: 1.8rem !important;
    line-height: 1.25 !important;
  }

  h3 {
    font-size: 1.4rem !important;
  }

  p {
    font-size: 1.06rem !important;
    line-height: 1.78 !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 35px !important;
  }

  .footer-pro {
    padding: 60px 20px 40px !important;
  }

  /* CONTACTO MOBILE EXCLUSIVO */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 50px !important;
  }

  .contact-hero {
    padding: 80px 20px 60px !important;
  }

  .contact-hero h1 {
    font-size: 2.2rem !important;
    line-height: 1.2;
  }

  .contact-hero p {
    font-size: 1.05rem;
    opacity: 0.85;
  }

  .contact-form {
    gap: 5px;
  }

  .input-group input,
  .input-group textarea {
    padding: 18px !important;
    border-radius: 14px !important;
    font-size: 16px;
  }

  #mensaje {
    min-height: 160px;
  }

  .contact-form .btn {
    margin-top: 20px;
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 40px;
  }

  .contact-info {
    text-align: center;
  }

  .contact-title {
    font-size: 1.6rem;
  }

  .contact-subtitle {
    font-size: 1rem;
    line-height: 1.6;
  }

  .whatsapp-btn {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    display: block;
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 40px;
  }

  .contact-email-pro {
    padding: 22px;
    border-radius: 16px;
  }

  .email-box {
    padding: 14px;
    border-radius: 12px;
  }

  .contact-benefits {
    gap: 18px;
    margin-top: 10px;
  }

  .benefit {
    padding: 20px;
    border-radius: 14px;
  }
}

@media (min-width: 992px) {
  .mobile-menu,
  .mobile-menu-btn {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ====================== ANIMACIONES SCROLL REVEAL ====================== */
.fade-up,
.fade-left,
.fade-right {
  opacity: 0;
  transition: all 0.9s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.fade-up { transform: translateY(50px); }
.fade-left { transform: translateX(-60px); }
.fade-right { transform: translateX(60px); }

.fade-up.visible,
.fade-left.visible,
.fade-right.visible {
  opacity: 1;
  transform: translate(0);
}

.fade-up.delay  { transition-delay: 0.1s; }
.fade-up.delay2 { transition-delay: 0.25s; }
.fade-up.delay3 { transition-delay: 0.4s; }

.contact-hero * {
  transition: none !important;
}