/* ==========================================================================
   VARIABLES & SETUP
   ========================================================================== */
:root {
  --primary-color: #0b5394; /* Azul Médico Profundo (Confianza) */
  --secondary-color: #22babb; /* Cian Limpio (Higiene y Salud) */
  --accent-color: #fca311; /* Naranja/Dorado (Mantiene los botones atractivos) */
  --text-dark: #2c3e50;
  --text-light: #546e7a;
  --bg-color: #f8fbfb; /* Blanco Clínico */
  --white: #ffffff;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 230px; /* Compensa la altura del header sticky */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: auto;
  padding: 15px 0;
  gap: 15px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.logo p {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px; /* Espacio más grande entre cada imagen */
  width: 100%;
}

.market-logo img {
  max-height: 180px; /* Más grande para que destaque */
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: none; /* A color para mayor claridad */
}

.market-logo:hover img {
  transform: scale(1.1);
}

.logo span {
  color: var(--secondary-color);
}

.logo img {
  max-height: 140px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ==========================================================================
   HERO CAROUSEL
   ========================================================================== */
.hero {
  position: relative;
  height: calc(100vh - 80px);
  min-height: 500px;
  overflow: hidden;
}

.carousel {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
}

.slide.no-overlay::before {
  display: none;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 0 20px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 1s ease 0.5s;
}

.slide-content.dark-text {
  color: var(--text-dark);
}

.slide.active .slide-content {
  transform: translateY(0);
  opacity: 1;
}

.slide-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.slide-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
}

.btn-primary:hover {
  background-color: #004494;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 86, 179, 0.6);
}

.btn-secondary {
  background-color: var(--accent-color);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background-color: #ffc13b;
  transform: translateY(-2px);
}

/* Carousel Controls */
.carousel-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.3); /* Fondo oscuro semitransparente */
  padding: 10px 20px;
  border-radius: 30px; /* Forma de pastilla/cápsula */
  backdrop-filter: blur(4px); /* Efecto cristal moderno */
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background-color: var(--white);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* ==========================================================================
   PRODUCT CATEGORIES
   ========================================================================== */
.categories-section {
  padding: 100px 0;
  background-color: var(--bg-color);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.category-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

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

.category-img-container {
  height: 200px;
  overflow: hidden;
  background-color: #e9ecef;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-img-container img {
  transform: scale(1.1);
}

.category-info {
  padding: 15px;
  text-align: center;
}

.category-info h3 {
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 15px;
}

/* Enlaces de Marketplaces dentro de la tarjeta */
.card-market-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.mini-market-logo {
  height: 25px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
  filter: grayscale(100%) opacity(0.8);
}

.mini-market-logo:hover {
  transform: scale(1.15);
  filter: grayscale(0%) opacity(1);
}

.category-card:hover .category-info h3 {
  color: var(--primary-color);
}

/* ==========================================================================
   MISION Y VISION
   ========================================================================== */
.about-section {
  padding: 100px 0;
  background-color: var(--white);
}

.about-block {
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-left: 15px;
  margin-bottom: 25px;
}

.section-title.border-green {
  color: #059669; /* Verde exacto */
  border-left: 4px solid #059669;
}

.section-title.border-blue {
  color: #3b82f6; /* Azul exacto */
  border-left: 4px solid #3b82f6;
}

.about-text p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.mission-features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.feature-box {
  flex: 1;
  min-width: 200px;
  background-color: #f6f5ee; /* Beige claro de la imagen */
  padding: 25px 20px;
  border-radius: 8px;
  text-align: center;
}

.feature-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-box .text-green { color: #059669; }
.feature-box .text-blue { color: #3b82f6; }
.feature-box .text-orange { color: #d97706; }

.feature-box p {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.4;
}

.about-divider {
  border: 0;
  height: 1px;
  background-color: #e2e8f0;
  margin: 50px auto;
  max-width: 900px;
}

.why-choose-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #d97706;
  text-transform: uppercase;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.why-choose-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.check-icon {
  background-color: #d1fae5;
  color: #059669;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.why-text h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.why-text p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-light);
  margin: 0;
}

.mt-40 {
  margin-top: 40px;
}

/* ==========================================================================
   CONTACTO Y UBICACION
   ========================================================================== */
.contact-section {
  padding: 100px 0;
  background-color: var(--bg-color);
}

.contact-container {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-info {
  padding: 50px;
  background-color: var(--primary-color);
  color: var(--white);
}

.contact-info h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 30px;
  opacity: 0.9;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-method i {
  font-size: 1.5rem;
  background-color: rgba(255, 255, 255, 0.2);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-map {
  min-height: 400px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.btn-whatsapp:hover {
  background-color: #128C7E;
  transform: translateY(-2px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background-color: #1a1a1a;
  color: #fff;
  padding: 50px 0 20px;
  text-align: center;
}

.footer-content {
  margin-bottom: 30px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.footer-logo span {
  color: var(--secondary-color);
}

.copyright {
  color: #888;
  font-size: 0.9rem;
  border-top: 1px solid #333;
  padding-top: 20px;
}

/* ==========================================================================
   FLOATING WHATSAPP
   ========================================================================== */
.floating-wa {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: var(--transition);
}

.floating-wa:hover {
  transform: scale(1.1);
  background-color: #128C7E;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .header-top-row {
    gap: 30px;
  }
  
  .market-logo img {
    max-height: 120px;
  }

  .slide-content h1 {
    font-size: 2.5rem;
  }

  .about-grid,
  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-top-row {
    flex-direction: row; /* Mantener en fila como en escritorio */
    justify-content: center;
    gap: 15px;
    padding-top: 10px;
  }

  .market-logo img {
    max-height: 45px; /* Más pequeños para que quepan */
  }

  .logo img {
    max-height: 60px; /* Logo principal un poco más grande que los otros */
  }
  
  .logo p {
    font-size: 0.55rem; /* Texto de Life Quality más pequeño */
    letter-spacing: 1px;
  }

  .nav-links {
    display: flex; /* Mostrar links en móvil */
    gap: 20px;
    margin-top: 5px;
  }

  .slide-content h1 {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 15px;
  }
  
  .slide-content p {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  /* Ajustes para que los textos sean legibles sobre las imágenes en móvil */
  .slide-content {
    margin-left: 0 !important;
    text-align: center !important;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro por defecto */
    border-radius: 12px;
  }
  
  .slide-content.dark-text {
    background-color: rgba(255, 255, 255, 0.85); /* Fondo claro para los oscuros */
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
  
  .contact-info {
    padding: 30px 20px;
  }
  
  .contact-info h2 {
    font-size: 1.5rem;
  }
  
  .carousel-controls {
    bottom: 15px;
  }
}

@media (max-width: 480px) {
  .slide-content h1 {
    font-size: 1.5rem;
  }
}