/* Global Styles */


body {
  scroll-behavior: smooth;
  position: relative;
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #004F7E, #00ABBB);
  z-index: 9999;
  width: 0;
  transition: width 0.1s ease-out;
}

/* Evita parpadeo en móviles */
img,
.hero-bg,
.shop-image,
.blog-image,
.testimonial-avatar {
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  height: 3px;
  background: linear-gradient(90deg, #00ABBB, #004F7E);
  width: 0;
  animation: growLine 1.2s ease-out forwards;
}

.pulse-icon {
  animation: counterUp 2s ease-in-out infinite;
}

.service-card,
.testimonial-card,
.blog-card,
.shop-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 79, 126, 0.15);
}

input:focus,
textarea:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0, 171, 187, 0.25) !important;
  border-color: #00ABBB !important;
}

.floating-whatsapp {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 25px;
  right: 25px;
  background-color: #25D366;
  color: white;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-whatsapp:hover {
  transform: scale(1.12) rotate(12deg);
  background-color: #128C7E;
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
}

.faq-answer.open {
  max-height: 200px;
}

/* Hero */
.hero-bg {
  background: url('../images/hero.jpg') center/cover no-repeat;
  position: relative;
  padding: 4rem 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 79, 126, 0.8), rgba(0, 171, 187, 0.8));
  z-index: 1;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 50px 50px;
  opacity: 0.15;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Contadores */
.stats-section {
  background: white;
  padding: 3rem 0;
}

.stats-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  min-width: 140px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #004F7E;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.stat-label {
  color: #586771;
  font-weight: 600;
  font-size: 1rem;
}

/* Sobre mi: foto en círculo */
.doctor-avatar {
  width: 264px;
  height: 264px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #004F7E;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Servicios */
.services-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* Móvil: 1 columna */
  gap: 1.5rem;
}

/* Tablet en adelante: 2 columnas */
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Escritorio en adelante: 3 columnas */
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  opacity: 0.01;
  /* Corrección clave */
}


.service-card.animate {
  opacity: 1;
  animation: staggerIn 0.7s ease-out forwards;
}

.service-btn {
  background: transparent;
  border: 1px solid #004F7E;
  color: #004F7E;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.service-btn:hover {
  background: #004F7E;
  color: white;
}

/* Testimonios */
.testimonials-carousel {
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-item {
  min-width: 100%;
  padding: 0 1rem;
}

.testimonial-card {
  padding: 1.5rem;
  border-radius: 1rem;
  border-left: 4px solid;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 550px;
  margin: 0 auto;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.read-more-btn {
  align-self: flex-start;
  background: transparent;
  border: 1px solid #004F7E;
  color: #004F7E;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.read-more-btn:hover {
  background: #004F7E;
  color: white;
}

/* Blog */
.blog-carousel {
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
}

.blog-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.blog-slide {
  min-width: 100%;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.blog-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  max-width: 420px;
  margin: 0 auto;
}

.blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-content {
  padding: 1.5rem;
}

.blog-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.blog-summary {
  color: #586771;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.blog-btn {
  background: #00ABBB;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background 0.2s;
}

.blog-btn:hover {
  background: #008A99;
}

/* Tienda - Tarjetas de producto */

#tienda {
  background-image:
    linear-gradient(45deg, rgba(0, 171, 187, 0.02) 25%, transparent 25%, transparent 75%, rgba(0, 171, 187, 0.02) 75%),
    linear-gradient(45deg, rgba(0, 171, 187, 0.02) 25%, transparent 25%, transparent 75%, rgba(0, 171, 187, 0.02) 75%);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
}

.shop-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  max-width: 280px;
  min-height: 380px;
  /* Altura fija para todas */
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 79, 126, 0.15);
}

/* Badge "Nuevo" */
.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #00ABBB;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  z-index: 2;
  /* No tapará el texto porque la imagen está arriba y el texto comienza abajo */
}

.shop-image {
  width: 100%;
  height: 160px;
  /* Altura fija para imágenes */
  object-fit: cover;
}

.shop-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.shop-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  min-height: 2.25rem;
  /* Asegura espacio para títulos de 1-2 líneas */
}

.shop-price {
  color: #004F7E;
  font-weight: 700;
  margin: 0.5rem 0;
}

.shop-content p.text-gray-600 {
  flex: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-btn {
  background: #FEDABC;
  color: #004F7E;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background 0.2s;
  width: 100%;
  margin-top: auto;
}

.shop-btn:hover {
  background: #FEE4CF;
}

.view-shop-btn {
  background: #00ABBB;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  transition: background 0.2s;
  margin-top: 2rem;
}

.view-shop-btn:hover {
  background: #008A99;
}

/* Menú móvil */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: white;
  z-index: 9998;
  transition: right 0.3s ease;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  padding: 2rem 1.5rem;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu .nav-link {
  display: block;
  padding: 0.75rem 0;
  color: #586771;
  font-weight: 500;
  border-bottom: 1px solid #eee;
  transition: color 0.2s;
}

.mobile-menu .nav-link:hover {
  color: #004F7E;
}

.close-menu {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #586771;
}

/* Carrusel genérico */
.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dot.active {
  background: #004F7E;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.carousel-btn.prev {
  left: 1rem;
}

.carousel-btn.next {
  right: 1rem;
}

@media (max-width: 768px) {
  .carousel-btn {
    display: none;
  }

  .testimonial-card {
    max-width: 95%;
  }

  .blog-slide {
    gap: 1rem;
  }

  .blog-card {
    max-width: 100%;
  }

  .shop-card {
    max-width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
}