/* ===== VARIABLES GLOBALES ===== */
:root {
  --azul: #007bff;
  --azul-oscuro: #004aad;
  --blanco: #ffffff;
  --gris: #f5f5f5;
  --negro: #222;
  --transicion: all 0.3s ease;
  font-family: 'Lucida bright';
}

body {
  margin: 0;
  background: var(--gris);
  color: var(--negro);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ===== LOADER ===== */
#loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--blanco);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader-icon {
  width: 80px;
  height: auto;
  animation: girar 2s linear infinite;
}

@keyframes girar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== ENCABEZADO ===== */
.header {
  width: 100%;
  background: linear-gradient(to right, #ffffff 15%, var(--azul) 55%, var(--azul-oscuro) 100%);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
}

.logo-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  width: 65px;
  height: auto;
  background: #fff;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/* ===== ENLACES ===== */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0.5rem 0;
}

.nav-links li a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transicion);
}

.nav-links li a:hover {
  color: #E3F2FD;
  transform: translateY(-2px);
}

/* ===== BOTÓN MENÚ ===== */
.menu-btn {
  color: #ffffff;
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 30;
}

/* ===== MENÚ MÓVIL ===== */
.menu-movil {
  display: none;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(to right, #ffffff 15%, var(--azul) 55%, var(--azul-oscuro) 100%);
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 25;
  padding: 0;
  animation: slideDown 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.menu-movil a {
  color: #fff;
  padding: 1rem 0;
  font-weight: 600;
  text-decoration: none;
  width: 100%;
  text-align: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

.menu-movil a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.03);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== SECCIONES ===== */
.section {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--blanco);
  margin-bottom: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.section h1, .section h2 {
  color: var(--azul-oscuro);
  margin-bottom: 1rem;
  font-family: 'Lucida bright';
}

/* ===== TARJETAS DE SERVICIOS ===== */
.servicios {
  background: var(--gris);
}

.servicio {
  display: flex;
  flex-direction: column; /* 🔹 Acomoda el texto debajo */
  align-items: center; /* 🔹 Centra horizontalmente */
  text-align: center; /* 🔹 Centra el contenido */
  gap: 1.5rem;
  background: #fff;
  border: 2px solid var(--azul);
  border-radius: 15px;
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 950px;
  transition: var(--transicion);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}


.servicio:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

/* ===== FAQ (ACORDEÓN) ===== */
.faq-container {
  max-width: 900px;
  margin: 3rem auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 2px solid var(--azul);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.faq-question {
  width: 100%;
  background: #f9fbff;
  color: var(--azul);
  border: none;
  padding: 1rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background: #ffffff;
  color: #333;
  padding: 0 1.2rem;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 1rem 1.2rem;
}

/* ===== CONTACTO ===== */
.contacto-contenido {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.foto-contacto {
  width: 120px;
  border-radius: 12px;
}

.btn-wpp {
  background: #25D366;
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  animation: parpadeo 2s infinite;
}

@keyframes parpadeo {
  0%, 100% { box-shadow: 0 0 8px #25D366; }
  50% { box-shadow: 0 0 20px #25D366; }
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  background: var(--azul-oscuro);
  color: var(--blanco);
  padding: 1rem 0;
  font-size: 0.9rem;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .menu-btn { display: block; }

  .servicio {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== CARRUSELES 3D (escritorio) + VISTA VERTICAL (responsive) ===== */

.categoria {
  margin-bottom: 5rem;
  padding-top: 2rem;
}

.categoria h2 {
  text-align: center;
  color: var(--azul-oscuro);
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

/* --- Versión Escritorio: Carrusel 3D --- */
.carousel-container {
  position: relative;
  perspective: 1000px;
  margin: 2.5rem auto 4rem;
  max-width: 900px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card3D {
  position: absolute;
  width: 260px;
  background: #fff;
  border: 2px solid var(--azul);
  border-radius: 15px;
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  transition: transform 0.8s ease, box-shadow 0.3s ease;
}

.card3D:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.card3D h3 {
  color: var(--azul-oscuro);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.card3D p {
  color: #333;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.precio {
  display: inline-block;
  background: linear-gradient(to right, var(--azul), var(--azul-oscuro));
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Flechas */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--azul-oscuro);
  z-index: 10;
  user-select: none;
  transition: transform 0.2s ease;
}

.carousel-btn.prev {
  left: -60px;
}

.carousel-btn.next {
  right: -60px;
}

.carousel-btn:active {
  transform: translateY(-50%) scale(1); /* no se mueve */
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.05);
}

/* --- Responsive: desactivar carrusel y mostrar tarjetas verticales --- */
@media (max-width: 768px) {
  .carousel-container {
    perspective: none;
    height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 95%;
  }

  .carousel {
  display: flex;
  align-items: center;
  justify-content: center; /* 🔹 Esta línea centra horizontalmente */
  gap: 1.5rem;
  flex-wrap: wrap; /* 🔹 Permite que se acomoden en responsive */
  text-align: center; /* 🔹 Centra el texto dentro de cada tarjeta */
}


  .card3D {
    text-align: center;
    position: static;
    width: 95%;
    max-width: 350px;
    margin: 0 auto;
    transform: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  }

  .carousel-btn {
    display: none !important; /* oculta flechas */
  }

 .categoria {
  margin-bottom: 6rem;
  padding-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center; /* 🔹 Centra el contenido */
  justify-content: center; /* 🔹 Alineación vertical */
  text-align: center;
}


  .categoria h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
  }

  .card3D h3 {
    font-size: 1rem;
  }

  .card3D p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .precio {
    font-size: 0.9rem;
  }

  html, body {
    overflow-x: hidden;
  }
}

.precio {
  display: inline-block;
  background: linear-gradient(to right, var(--azul), var(--azul-oscuro));
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer; /* indica que es clickeable */
  user-select: none;
  transition: all 0.3s ease;
}

/* ===== EFECTO DE BRILLO VERDE PARA EL BOTÓN DE WHATSAPP ===== */
@keyframes brilloVerde {
  0%, 100% {
    box-shadow: 0 0 8px #25D366;
  }
  50% {
    box-shadow: 0 0 18px #25D366;
  }
}

.brillo-verde a {
  animation: brilloVerde 2s infinite;
}

/* ===== BOTÓN DE WHATSAPP EN TARJETAS ===== */
.btn-wpp-tarjeta {
  display: inline-block;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.btn-wpp-tarjeta:hover {
  opacity: 0.85;
}

/* ===== EFECTO DE BRILLO VERDE ===== */
@keyframes brilloVerde {
  0%, 100% { box-shadow: 0 0 8px #25D366; }
  50% { box-shadow: 0 0 18px #25D366; }
}

.brillo-verde a {
  animation: brilloVerde 2s infinite;
}

.servicio-img {
  width: 45%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  object-fit: cover;
}

@media (max-width: 768px) {
  .servicio-img {
    width: 100%;
    max-height: 240px;
  }
}

:root {
  --azul: #007bff;
  --azul-oscuro: #004aad;
  --blanco: #ffffff;
  --gris: #f9fbff;
  --negro: #222;
  --transicion: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

body {
  margin: 0;
  background: var(--gris);
  color: var(--negro);
  line-height: 1.6;
}

/* ===== LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-icon {
  width: 80px;
  animation: girar 2s linear infinite;
}

@keyframes girar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== HEADER ===== */
.header {
  width: 100%;
  background: linear-gradient(to right, #ffffff 15%, var(--azul) 55%, var(--azul-oscuro) 100%);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.8rem 1.5rem;
}

.logo {
  width: 65px;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
}

/* Enlaces */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0.5rem 0;
}

.nav-links li a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transicion);
}

.nav-links li a:hover {
  color: #e3f2fd;
}

/* Menú móvil */
.menu-btn {
  color: #fff;
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
}

.menu-movil {
  display: none;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(to right, #ffffff 15%, var(--azul) 55%, var(--azul-oscuro) 100%);
}

.menu-movil a {
  color: #fff;
  text-decoration: none;
  padding: 1rem 0;
}

/* ===== SECCIONES ===== */
.section {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--blanco);
  margin: 1.5rem auto;
  border-radius: 12px;
  max-width: 1000px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.section h1, .section h2 {
  color: var(--azul-oscuro);
  font-family: 'Lucida bright';
  margin-bottom: 1rem;
}

.section p {
  font-size: 1rem;
  color: #333;
}

/* ===== BENEFICIOS ===== */
.lista-beneficios {
  list-style: none;
  text-align: left;
  margin: 2rem auto;
  max-width: 600px;
  font-size: 1rem;
  line-height: 1.8;
}

/* ===== MAPA ===== */
.map-container {
  margin-top: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ===== FOOTER ===== */
footer {
  background: var(--azul-oscuro);
  color: var(--blanco);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
}

/* ===== AJUSTE DE ESPACIADO ENTRE TARJETAS EN CARRUSEL 3D ===== */
.carousel-container {
  position: relative;
  perspective: 1200px;
  margin: 5rem auto; /* 🔹 más espacio vertical */
  max-width: 1000px;
  height: 460px; /* 🔹 aumenta la altura del carrusel */
  display: flex;
  align-items: center;
  justify-content: center;
}

.card3D {
  position: absolute;
  width: 280px;
  min-height: 360px; /* 🔹 garantiza espacio interior */
  background: #fff;
  border: 2px solid var(--azul);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  transition: transform 0.8s ease, box-shadow 0.3s ease;
}

.card3D p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card3D {
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
  cursor: pointer;
}

.card3D.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .carousel-container {
    height: 400px;
  }
  .card3D {
    width: 240px;
    min-height: 340px;
    padding: 1.2rem;
  }
}

@media (max-width: 600px) {
  .carousel-container {
    height: auto; /* 🔹 ajusta automáticamente en modo vertical */
    margin-bottom: 3rem;
  }
  .card3D {
    position: static;
    margin: 1rem auto;
    transform: none !important;
    width: 90%;
    max-width: 350px;
  }
}

.card3D {
  perspective: 1000px;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.card-inner.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
}

.card-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, #007bff, #004aad);
}

/* Desactivar cualquier efecto de giro en móviles */
@media (max-width: 768px) {
  .card3D, .card-inner, .card-front, .card-back {
    transform: none !important;
    transition: none !important;
    backface-visibility: visible !important;
  }
}

@media (max-width: 768px) {
  .categoria {
    margin-top: 1rem !important;   /* 🔹 reduce el espacio superior */
    margin-bottom: 3rem !important; /* 🔹 ajusta el espacio inferior */
    padding-top: 1rem !important;   /* 🔹 baja el título */
  }

  .categoria h2 {
    margin-top: 0 !important;
    margin-bottom: 1rem !important; /* 🔹 reduce espacio entre título y tarjetas */
    font-size: 1.2rem; /* opcional: mejora la lectura en móvil */
  }
}
