/* ===== VARIABLES DE COLOR (fácil de ajustar) ===== */
:root {
  --bg-primary: #1a2e2e;
  --bg-secondary: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #ddd8d8;
  --accent: #eda35d;
  --card-bg: #224156;
  --border-color: #333;
  --bgsecc-color: #47a78b;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --form-bg: #f8f9fa;
  --form-input-bg: #ffffff;
  --form-border: #ddd;
  --form-shadow: 0 4px 12px rgba(0,0,0,0.08);
  --form-label-color: var(--bg-primary);
  --form-input-text: #333;
  --form-accent: var(--accent);
  --bg-transparen: #00000000 ;
}


/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}


a {
  text-decoration: none;
  color: var(--accent);
}

/* ===== FUENTE DE GOOGLE ===== */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');


/* ===== HEADER ===== */
/* ✅ AHORA */
header {
  padding: 2rem 1.5rem 1.5rem;
  width: 100%;
  max-width: none;
  background-color: var(--bg-primary);
}


.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0 1.5rem; /* ← padding horizontal para no tocar el borde */
  width: 100%;
}


.logo {
  height: 65px;
  width: auto;
  border-radius: 30%;
  display: block;
}

.logo:hover {
  transform: rotate(360deg);
}

.rotating-logo {
  animation: rotateLogo 20s linear infinite;
  will-change: transform;
}

@keyframes rotateLogo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  background: linear-gradient(to right, #fff, #ccc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitulo {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0;
  padding: 0 1.5rem;
  text-align: left;
}


/* ===== SELECTOR DE IDIOMA (ícono + dropdown) ===== */
.language-selector {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  font-size: 14px;
}

.lang-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lang-icon {
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .lang-text {
    display: none;
  }
  .lang-icon {
    font-size: 1.2rem;
  }
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  font-size: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  list-style: none;
  padding: 8px 0;
  margin: 8px 0 0;
  min-width: 140px;
  z-index: 1000;
  display: none;
  color: var(--text-primary);
}

.lang-dropdown.show {
  display: block;
}

.lang-dropdown a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.lang-dropdown a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

/* ===== SERVICIOS ===== */
.servicios {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
  padding: 10px;
  max-width: 90%;
  margin: 0 auto 3rem;
}

@media (min-width: 768px) {
  .servicios {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .servicios {
    grid-template-columns: repeat(4, 1fr);
  }
}

.servicio {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.8rem 1.2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.servicio:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.servicio-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.15;
}

.servicio-contenido {
  position: relative;
  z-index: 2;
  padding: 5px;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  backdrop-filter: blur(2px);
}

.icono {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
}

.servicio h2 {
  font-size: 1.3rem;
  margin: 0.8rem 0;
  color: var(--text-primary);
}

.servicio p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.btn {
  display: inline-block;
  width: 100%;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s;
  text-align: center;
}

.btn:hover {
  background: var(--accent);
  color: #000;
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--card-bg);
  padding: 1rem 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-info,
.legal-section,
.qr-section {
  flex: 1;
  min-width: 220px;
}

.legal-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.05rem;
  color: var(--text-primary);
  text-align: center;
}

.legal-section li {
  margin: 0;
  width: 100%;
  max-width: 220px;
}

/* Estilo para los enlaces legales en el footer */
.legal-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem; /* espacio entre botones */
}

/* En móviles: vertical */
@media (max-width: 768px) {
  .legal-section ul {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
}


.footer-link,
.modal-trigger {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  transition: color 0.2s;
  justify-content: center;
  cursor: pointer;
  width: 100%;
  max-width: 220px;
  text-align: center;
  text-decoration: none;
}

.footer-link:hover,
.modal-trigger:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* QR */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 120px;
  gap: 0.6rem;
}

.footer-qr {
  width: 110px;
  height: auto;
  border: 1px solid #ddd;
  padding: 6px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.qr-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Responsive footer */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 1.8rem;
    text-align: center;
  }

  .footer-info,
  .legal-section,
  .qr-section {
    width: 100%;
    align-items: center;
  }

  .footer-info p,
  .footer-info {
    text-align: center;
  }

  .legal-section ul {
    align-items: center;
  }

  .legal-section li {
    width: auto;
  }
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  margin: 5% auto;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 1.5rem;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.8rem;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: #000;
}

#pdf-iframe {
  flex: 1;
  width: 100%;
  border: none;
}

#html-content {
  color: #333;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-align: justify;
}

#html-content p {
  margin: 0 0 1rem 0;
}

#html-content h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.2rem;
  color: #1a1a1a;
  text-align: center;
}


/*  ===============  whatsap y contactos ===========*/
/* ===== CONTACTO RÁPIDO: QR + WHATSAPP ===== */
.contact-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 300px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.contact-icon {
  width: 110px;
  height: auto;
  border: none;
  padding: 6px;
  background: transparent;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  display: block;
  text-align: center;
}

.contact-icon img {
  width: 100%;
  height: auto;
  display: block;
}

.contact-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
}

/* Asegurar que el enlace de WhatsApp no herede estilos no deseados */
.contact-item a {
  color: inherit;
  text-decoration: none;
}

.contact-item a:hover {
  opacity: 0.9;
}

/* Animación tipo veleta / indicador de viento */
@keyframes windVane {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(12deg); }   /* inclinación derecha */
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(-12deg); }  /* inclinación izquierda */
  100% { transform: rotate(0deg); }
}

/* Aplicar al ícono de WhatsApp */
.whatsapp-icon img,
.whatsapp-icon svg,
.whatsapp-icon i {
  animation: windVane 3s ease-in-out infinite;
  transform-origin: bottom center; /* pivota desde la base (como una veleta) */
  will-change: transform;
}


/* ======================================= MENÚ HAMBURGUESA Y LATERAL ===== */
.menu-toggle {
  position: fixed;
  top: 20px;
  right: 70px; /* Deja espacio para el selector de idioma */
  z-index: 101;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  appearance: none;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 1001;
  padding: 2rem 1.5rem;
  transition: transform 0.4s cubic-bezier(0.6, 0.05, 0.28, 1);
  transform: translateX(0);
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
}

.mobile-menu.open {
  transform: translateX(-100%);
}

.mobile-menu ul {
  list-style: none;
  margin-top: 2rem;
}

.mobile-menu li {
  margin-bottom: 1.2rem;
}

.mobile-menu a {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  padding: 8px 0;
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--accent);
}

.menu-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

.menu-overlay.active {
  display: block;
}

/* Ocultar menú en escritorio */
@media (min-width: 769px) {
  .menu-toggle,
  .mobile-menu,
  .menu-overlay {
    display: none;
  }
}



/* ===== HERO SECTION ===== */

.hero-section {
  position: relative;
  width: 100%;
  height: 70vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 5rem; /* ← Asegura espacio lateral en móviles */
}

.hero-content h1 {
  font-size: 2.4rem;
  font-weight: 750;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  max-width: 100%;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

.hero-btn {
  background: var(--accent);
  color: #000;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  max-width: 30%;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: none;
}

.hero-btn:hover {
  background: #d6904a;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}


.hero-subtitle {
  margin-top: 1.2rem;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  line-height: 1.5;
  padding: 0 1rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 60%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ajustes específicos para móviles */
@media (max-width: 768px) {
  .hero-section {
    height: auto;
    min-height: 60vh;
    padding-top: 2rem;
    margin: auto;
    padding-bottom: 2rem;
  }

  .hero-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: 0;
  }

    .hero-subtitle {
    font-size: 1rem;
    padding: 0 5px;
    margin-top: 1rem;
  }

  .hero-btn {
  background: var(--accent);
  color: #000;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  max-width: 100%;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: none;
}

.hero-btn:hover {
  background: #d6904a;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

}

/* ===== SERVICIOS - TARJETAS IGUALES ===== */

.services-cards-container,
.services-details-panel {
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  margin-top: 2rem;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  height: 220px; /* ← altura fija para igualar */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  padding: 1.5rem;
}

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

.service-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

@media (max-width: 768px) {
    .service-card {
        height: auto;
        min-height: 200px;
    }
}

.icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin: 0;
}

/* === CONTENEDOR PRINCIPAL DE SERVICIOS (80%) === */
.services-cards-container,
.services-details-panel {
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* === PANEL DE DETALLES === */
.services-details-panel {
  width: 100%;
  background: rgba(26, 46, 46, 0.65); /* ligeramente más transparente */
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0rem;
  margin-top: 0rem;
  display: none;
  backdrop-filter: blur(4px);
}

/* === CADA LÍNEA (ITEM) === */
.detail-item {
  background: var(--card-bg);
  border: 1px solid rgba(51, 51, 51, 0.6);
  border-radius: 12px;
  padding: 10px 10px 10px;
  margin-bottom: 1.3rem; /* ← menos espacio entre líneas */
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInFromLeft 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Retraso progresivo para efecto en cascada */
.detail-item:nth-child(1) { animation-delay: 0.1s; }
.detail-item:nth-child(2) { animation-delay: 0.2s; }
.detail-item:nth-child(3) { animation-delay: 0.3s; }
.detail-item:nth-child(4) { animation-delay: 0.4s; }

/* === CONTENIDO INTERNO DE LA LÍNEA === */
/* === LÍNEA COMPLETA: altura fija para coherencia === */
.detail-line {
  display: flex;
  gap: 1.6rem;
  align-items: stretch;
  height: 240px; /* ← altura fija, ligeramente mayor que la imagen */
}

/* === IMAGEN: ahora ocupa toda la altura del contenedor === */
.detail-image {
  width: 30%;
  height: 100%; /* ← usa el 100% de la altura del padre */
  flex-shrink: 0;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* === TEXTO: centrado verticalmente dentro del mismo alto === */
.detail-text {
  width: 70%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 0; /* elimina ajustes manuales */
}

.detail-text h4 {
  font-size: 1.25rem;
  margin: 0 0 0.0rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.detail-text p {
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* === ANIMACIÓN: deslizar desde la izquierda + fade === */
@keyframes slideInFromLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === BOTÓN DE CONTACTO === */
.contact-button-container {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.contact-btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 0.7rem 2.1rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.contact-btn:hover {
  background: #d6904a;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Video en el dorso de la tarjeta */
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  background: #000;
  transform: rotateY(180deg);
}

.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}


/* Fallback si el video no carga */
.video-fallback {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background: #111;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  padding: 0.5rem;
}

.video-fallback span {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.detail-text-content ul.benefits-list {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0.5rem 0;
  color: var(--text-primary);
  font-size: 0.97rem;
  line-height: 1.6;
}

.detail-text-content ul.benefits-list li {
  margin-bottom: 0.5rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin: 2rem auto 1.8rem;
  color: var(--text-primary);
  font-weight: 700;
  position: relative;
  padding: 0 1rem;
  box-sizing: border-box;
  max-width: 80%;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

.section-intro {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 auto 2rem;
  padding: 0 1.2rem;
  max-width: 800px;
  box-sizing: border-box;
}

/* ===== SECCIÓN ALIADOS / PARTNERS ===== */
#aliados {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.partners-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  padding: 0 1.5rem;
}

.partner-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 150px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  filter: grayscale(100%) opacity(0.85);
  transition: all 0.3s ease;
  text-decoration: none;
  overflow: hidden;
}

.partner-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ← clave: mantiene proporción y evita recortes */
  display: block;
}

.partner-logo:hover {
  transform: translateY(-6px);
  filter: grayscale(0%) opacity(1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  z-index: 2;
  position: relative;
}

/* Responsive: en móviles, puedes reducir ligeramente si es necesario */
@media (max-width: 768px) {
  .partner-logo {
    width: 130px;
    height: 90px;
  }
}

@media (max-width: 480px) {
  .partner-logo {
    width: 110px;
    height: 80px;
  }
}

/* ================================ SECCIÓN NOVEDADES ===== */
#novedades {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  padding: 0 1.5rem;
}

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.news-content {
  padding: 1.5rem;
}

.news-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.news-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.news-more-btn {
  width: auto;
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
}

/* Modal de novedades */
#newsModal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

#newsModal .modal-content {
  position: relative;
  margin: 4% auto;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  background: #1e1e1e;
  color: var(--text-primary);
  border-radius: 16px;
  overflow: auto;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

#newsModal h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-size: 1.8rem;
}

#newsModalContent {
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 1rem;
}

#newsModalContent img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#newsModalClose {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.8rem;
  color: #aaa;
  background: none;
  border: none;
  cursor: pointer;
}

#newsModalClose:hover {
  color: var(--accent);
}


/* ===== FORMULARIO DE CONTACTO ===== */
#contact-form-section {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.form-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--form-bg);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.form-group {
  margin-bottom: 1.6rem;
  position: relative;
}

.form-group label {
  position: absolute;
  top: -4px;
  left: 12px;
  background: rgba(255, 255, 255, 0.102); /* fondo semitransparente */
  padding: 0 5px;
  font-size: 0.85rem;
  color: #777;
  font-weight: 600;
  z-index: 2;
  pointer-events: none; /* permite hacer clic en el input debajo */
}


.required {
  color: #e74c3c;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid var(--form-border);
  border-radius: 10px;
  background: var(--form-input-bg);
  color: var(--form-input-text);
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  box-shadow: var(--form-shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Estilo cuando el campo tiene foco o valor */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--form-accent);
  box-shadow: 0 0 0 3px rgba(237, 163, 93, 0.2);
}

/* Opcional: resaltar la etiqueta al hacer foco */
.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group select:focus + label {
  color: var(--form-accent);
}

/* Grupo de teléfono */
.phone-group {
  position: relative;
}

.phone-group label {
    left: 0;
    transform: translateX(calc(90px + 6px)); /* 90px = ancho de countryCode + gap */
}

@media (min-width: 601px) {
    .phone-group label {
        left: 100px;
    }
}

/* Teléfono: código + número */
.phone-group .phone-input-wrapper {
  display: flex;
  gap: 12px;
}

.phone-group #countryCode {
  width: 90px;
  text-align: center;
  background: #f1f1f1;
  padding: 1rem 0;
  border: 1px solid var(--form-border);
  border-radius: 10px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  box-shadow: var(--form-shadow);
}

.phone-group #phone {
  flex: 1;
}

.form-submit-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  margin-top: 1rem;
}

.form-message {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  display: block;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  display: block;
}

/* Responsive */
@media (max-width: 600px) {
  .form-container {
    padding: 1.8rem;
  }

  .phone-group label {
    left: 1px; /* en móvil, vuelve a la izquierda */
  }

  .phone-group .phone-input-wrapper {
    flex-direction: column;
  }

  .phone-group #countryCode {
    width: 100%;
  }
}

/* ===== FORMULARIO DENTRO DEL HERO (SECCIÓN DE CONTACTO) ===== */
/* ===== FORMULARIO DE CONTACTO EN HERO - SIN SCROLL ===== */
#contacto .hero-content {
  max-width: 780px;
  width: 94%;
  height: 610px; /* altura fija en desktop */
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 22px;
  padding: 2rem; /* reducido */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden; /* ← evita scroll incluso si hay desbordamiento */
}


#contacto .section-title {
  color: var(--bg-primary);
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 1.2rem 0;
  text-align: center;
  line-height: 1.3;
}

#contacto .form-container {
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* distribuye el espacio */
}

/* Ajuste de grupos de formulario */
#contacto .form-group {
  margin-bottom: 0.9rem; /* reducido desde 1.6rem */
}

#contacto .form-group label {
  left: 10px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.031);
  padding: 0 4px;
  color: #555;
}

/* Inputs y textarea más compactos */
#contacto .form-group input,
#contacto .form-group select,
#contacto .form-group textarea {
  padding: 0.75rem 1rem; /* reducido desde 1rem */
  font-size: 0.95rem;
  height: auto;
  min-height: auto;
}

/* Textarea más corto */
#contacto .form-group textarea {
  min-height: 60px; /* en lugar de 5 filas */
  resize: none;
}


/* Botón más compacto */
#contacto .form-submit-btn {
  padding: 0.7rem 1.2rem;
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* Mensaje de éxito/error */
#contacto #formMessage {
  margin-top: 1rem;
  padding: 0.6rem;
  font-size: 0.95rem;
}

/* ===== MÓVILES: altura flexible y más espacio ===== */
@media (max-width: 768px) {
  #contacto .hero-content {
    height: auto; /* ← altura flexible en móvil */
    min-height: 520px; /* mínimo razonable */
    padding: 1.8rem 1.4rem;
    overflow: visible;
  }

  .hero-content h1 {
  margin: 160px;
  font-size: 2.8rem;
  font-weight: 750;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

  #contacto .form-group {
    margin-bottom: 1.2rem;
  }

  #contacto .form-group input,
  #contacto .form-group textarea,
  #contacto .form-group select {
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  #contacto .form-submit-btn {
    padding: 0.85rem;
    font-size: 1.1rem;
  }
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 100%;
  margin: 3rem auto;
  padding: 2rem 1.5rem;
}

.contact-info h2,
.contact-form-wrapper h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: var(--text-primary);
}

/* Datos de región */
.region-details {
  background: rgba(34, 65, 86, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.4rem;
  margin: 1.2rem 0;
}

.region-details p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

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

/* Acceso rápido (QR + WA) */
.quick-contact {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

/* Móvil */
@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .quick-contact {
    gap: 1.2rem;
  }
}


/* ===== FIN ===== */



/* ===== AJUSTE PARA MÓVILES: SERVICIOS ===== */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 1.6rem;
        padding: 0 1rem; /* Margen lateral para respirar */
    }

    .service-card {
        height: auto; /* Eliminar altura fija */
        min-height: 240px; /* Altura mínima razonable */
        padding: 1.8rem 1.2rem; /* Más espacio interno */
    }

    .card-inner {
        height: auto; /* Permitir que el contenido defina la altura */
        aspect-ratio: unset !important; /* Anular cualquier ratio fijo */
    }

    .card-front,
    .card-back {
        padding: 1.5rem 1rem;
        justify-content: center;
        align-items: center;
    }

    .service-card .icon {
        font-size: 2.8rem; /* Un poco más grande en móvil */
        margin-bottom: 1rem;
    }

    .service-card h3 {
        font-size: 1.45rem;
        text-align: center;
        line-height: 1.3;
    }

    /* Video en el dorso: que ocupe bien el espacio */
    .card-video,
    .video-fallback {
        width: 100%;
        height: 100%;
        border-radius: 12px;
    }

    /* Panel de detalles: mejor legibilidad */
    .detail-line {
        height: auto !important;
        flex-direction: column;
        gap: 1.2rem;
    }

    .detail-image {
        width: 100% !important;
        height: 160px !important;
        border-radius: 10px;
    }

    .detail-text {
        width: 100% !important;
        text-align: center;
    }

    .detail-text h4 {
        font-size: 1.3rem;
    }

    .detail-text p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Asegurar que el video en el dorso se muestre completo en móviles */

/* ===== SERVICIOS: LAYOUT ADAPTATIVO ===== */

/* Ocultar móvil en escritorio y viceversa */
.services-mobile-carousel {
    display: none;
}

@media (max-width: 900px) {
    .services-desktop-layout {
        display: none;
    }
    .services-mobile-carousel {
        display: block;
        position: relative;
        height: 500px;
        margin-top: 2rem;
        overflow: hidden;
        border-radius: 16px;
    }

    .mobile-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.8s ease;
        background-size: cover;
        background-position: center;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: white;
    }

    .mobile-slide.active {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.65);
        border-radius: 16px;
    }

    .mobile-content {
        position: relative;
        z-index: 2;
        padding: 0 1.5rem;
        max-width: 700px;
        width: 100%;
    }

    .mobile-icon {
        font-size: 2.8rem;
        margin-bottom: 1.2rem;
    }

    .mobile-slide h3 {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
        color: white;
    }

    .service-description,
    .service-benefit {
        color: rgba(255, 255, 255, 0.92);
        font-size: 1.05rem;
        line-height: 1.6;
        margin: 0.8rem 0;
    }

    .service-benefit {
        color: #f0c58a;
        font-weight: 600;
    }
}

/* ===== ESCRITORIO ===== */
@media (min-width: 901px) {
    .services-desktop-layout {
        display: flex;
        gap: 2.5rem;
        max-width: 1100px;
        margin: 2rem auto 0;
        padding: 0 2rem;
        align-items: flex-start;
    }

    .services-list {
        flex: 0 0 240px;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .service-list-item {
        width: 100%;
        padding: 1rem 1.2rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--text-secondary);
        font-size: 1.05rem;
        font-weight: 600;
        cursor: pointer;
        text-align: left;
        transition: all 0.25s ease;
    }

    .service-list-item:hover,
    .service-list-item.active {
        color: var(--accent);
        border-color: var(--accent);
        background: rgba(237, 163, 93, 0.15);
    }

    .service-icon {
        font-size: 1.6rem;
        flex-shrink: 0;
    }

    .services-preview {
        flex: 1;
        position: relative;
        min-height: 420px;
        overflow: hidden;
        border-radius: 16px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        display: flex;
    }

    .preview-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.8s ease;
        display: flex;
    }

    .preview-slide.active {
        opacity: 1;
        pointer-events: auto;
    }

    .preview-image {
        flex: 0 0 240px;
        overflow: hidden;
    }

    .preview-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .preview-content {
        padding: 2rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .preview-content h3 {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
        color: var(--text-primary);
    }

    .service-description {
        color: var(--text-secondary);
        line-height: 1.6;
        margin-bottom: 1.2rem;
    }

    .service-benefit {
        color: var(--accent);
        font-style: italic;
        margin: 0;
        font-size: 0.98rem;
    }

    
}

/* ===== NOTICIAS Y NOVEDADES ===== */
.guide-page .hero-section {
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.8)), url('img/guide-bg.jpg');
  color: white;
  padding: 4rem 1rem;
  text-align: center;
}
.guide-page .hero-section .subtitle {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}
.steps-section {
  padding: 3rem 1rem;
  background: var(--bg-light);
}
.step-card {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.step-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}
.software-highlight {
  padding: 4rem 1rem;
  text-align: center;
  background: var(--primary-color-light);
}
.highlight-content h2 {
  margin-bottom: 1rem;
}

/* ===== SECCIÓN COMUNICACIÓN / CALL CENTER ===== */
#comunicacion {
  padding-top: 3rem;
  padding-bottom: 3.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 1.2rem;
}

.center-text {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 2.2rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Grid de características */
.communication-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
  padding: 0 1.5rem;
}

.feature-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.feature-icon {
  font-size: 2.6rem;
  margin-bottom: 1.2rem;
  display: block;
}

.feature-item h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0.6rem 0;
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Beneficios */
.communication-benefits {
  max-width: 95%;
  margin: 3rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

.benefits-title {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 1.4rem;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(35%, 1fr));
  gap: 0.9rem;
  text-align: left;
}

.benefits-list li {
  background: rgba(71, 167, 139, 0.15);
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Aliados tecnológicos */
.tech-partners-section {
  margin: 3.5rem 0;
  padding: 0 1.5rem;
  text-align: center;
}

.integration-title {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.tech-partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.partner-card {
  background: rgba(26, 46, 46, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.8rem 1.2rem;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}

.partner-logo {
  height: 50px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.85);
  transition: filter 0.3s ease;
}

.partner-logo:hover {
  filter: grayscale(0%) opacity(1);
}

.partner-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  max-width: 280px;
}

/* CTA */
.communication-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .benefits-list {
    grid-template-columns: 1fr;
  }

  .tech-partners-grid {
    gap: 1.8rem;
  }

  .partner-card {
    width: 100%;
    max-width: none;
    padding: 1.4rem 1rem;
  }

  .feature-item {
    padding: 1.6rem 1.2rem;
  }
}

