/* Paleta cálida sobre theme dark */
:root {
  /* Colores base */
  --bg: #0d0d0d;         /* Negro base */
  --bg-dark: #0a0a0a;    /* Negro más oscuro */
  --bg-card: #121212;    /* Negro para tarjetas */
  --bg-subtle: #1a1a1a;  /* Negro sutil para elementos secundarios */
  --bg-hover: #1f1f1f;   /* Negro para hover */
  
  /* Fondos para secciones */
  --section-hero-bg: #0a0a14;       /* Fondo para hero */
  --section-services-bg: #141414;   /* Fondo para servicios */
  --section-zones-bg: #0f0f14;      /* Fondo para zonas de entrega */
  --section-footer-bg: #121218;     /* Fondo para footer */
  
  /* Colores de acento */
  --primary: #ff3c00;     /* rojo‑anaranjado */
  --accent: #ffa500;      /* naranja */
  --highlight: #ffd500;   /* amarillo */
  --success: #28a745;     /* verde para acciones positivas */
  
  /* Colores para transparencias */
  --overlay-light: rgba(0, 0, 0, 0.5);  /* Overlay ligero */
  --overlay-medium: rgba(0, 0, 0, 0.7); /* Overlay medio */
  --overlay-dark: rgba(0, 0, 0, 0.9);   /* Overlay oscuro */
  --overlay-gradient: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1)); /* Degradado */
  
  /* Colores para texto */
  --text-light: #f5f5f5;  /* Texto claro */
  --text-muted: #9c9c9c;  /* Texto secundario */
  
  /* Colores para los slides del carousel */
  --slide1-bg: #2c1e4a;   /* Morado oscuro */
  --slide2-bg: #1e3a4a;   /* Azul oscuro */
  --slide3-bg: #4a1e1e;   /* Rojo oscuro */
  
  /* Dimensiones */
  --carousel-height: 70vh;
  --border-radius: 16px;
}

/* Estilos generales */
body {
  background-color: var(--bg);
  color: var(--text-light);
  font-family: 'Comfortaa', sans-serif;
}

/* Fondos de secciones */
.bg-services {
  background-color: var(--section-services-bg);
  position: relative;
  z-index: 1;
}

.bg-zones {
  background-color: var(--section-zones-bg);
  position: relative;
  z-index: 1;
}

.bg-footer {
  background-color: var(--section-footer-bg);
  position: relative;
  z-index: 1;
}

/* Fondo tecnológico para header+hero */
.tech-background {
  background-color: var(--section-hero-bg);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding-bottom: 2rem;
  overflow: hidden;
}

/* Canvas para fondo tecnológico animado */
.tech-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.navbar-transparent {
  background-color: transparent !important;
  /* Eliminamos el borde para integrar completamente */
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn, .nav-link {
  font-family: 'Comfortaa', sans-serif;
}

.bg-dark-subtle {
  background-color: var(--dark-subtle) !important;
}

/* Botones personalizados */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover, 
.btn-primary:focus {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* Botón de Instagram */
/* Iconos de navegación */
.nav-icon {
  color: white;
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.375rem 0.5rem;
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
}

.nav-icon:hover {
  color: #ff6b00;
  transform: translateY(-2px);
}

.nav-icon i {
  font-size: 1.3rem;
}

/* Textos con gradiente */
.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--highlight));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Sección hero */
.hero {
  background: transparent;
  padding: 3rem 1rem 6rem;
  position: relative;
  z-index: 1;
}

/* Carousel */
.rounded-carousel {
  border-radius: var(--border-radius);
  overflow: hidden;
  /*box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);*/
}

.carousel-content {
  height: var(--carousel-height);
  position: relative;
  overflow: hidden;
}

.carousel-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.slide-footer-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  z-index: 2;
  /*backdrop-filter: blur(3px);*/
}

.carousel-text {
  position: relative;
  z-index: 3;
}

.slide-text-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  z-index: 3;
}

.slide-title {
  color: #ffffff; /* Color blanco */
  font-size: 2rem; /* Tamaño más pequeño */
  margin-bottom: 0.5rem;
}

.carousel-item:nth-child(1) .carousel-content {
  background-color: #2c1e4a;
}

.carousel-item:nth-child(2) .carousel-content {
  background-color: #1e3a4a;
}

.carousel-item:nth-child(3) .carousel-content {
  background-color: #4a1e1e;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  z-index: 10;
}

.carousel-indicators {
  margin-bottom: 0.5rem;
  z-index: 10;
}

.carousel-indicators [data-bs-target] {
  background-color: var(--primary);
  opacity: 0.5;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 6px;
}

.carousel-indicators .active {
  opacity: 1;
}

/* Media queries para carousel */
@media (max-width: 768px) {
  :root {
    --carousel-height: 60vh;
  }
}

@media (max-width: 576px) {
  :root {
    --carousel-height: 50vh;
  }
  
  .display-4 {
    font-size: calc(1rem + 0.8vw);
  }
  
  .slide-title {
    font-size: 1.1rem;
    line-height: 1.2;
  }
  
  .lead {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }
  
  .slide-text-container {
    padding: 0.75rem;
    padding-bottom: 2.5rem; /* Más espacio en la parte inferior para los indicadores */
  }
  
  .slide-footer-overlay {
    height: 40%;
  }
  
  .carousel-indicators {
    bottom: 0.25rem;
  }
  
  .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    margin-right: 4px;
    margin-left: 4px;
  }
}

/* Estadísticas */
.stat {
  text-align: center;
  margin-bottom: 1rem;
}

.highlight-text {
  font-size: 2rem;
  font-weight: 600;
  color: var(--highlight);
  display: block;
}

/* Tarjetas */
.card {
  border: none !important;
  /*box-shadow: 0 8px 20px rgba(0,0,0,.3);*/
  transition: transform .3s;
}

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

/* Tarjetas de Servicios */
.service-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  /*box-shadow: 0 8px 20px rgba(0,0,0,.3);*/
  transition: transform .3s;
  height: 500px; /* Altura para tarjetas verticales */
  width: 280px; /* Ancho fijo para asegurar proporción vertical */
  margin: 0 auto; /* Centrar en la columna */
  display: flex;
  flex-direction: column;
  border: none !important;
}

.service-card:hover {
  transform: translateY(-6px);
}

.service-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.service-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  z-index: 2;
}

.service-content {
  position: relative;
  height: 100%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.service-footer {
  padding: 1rem;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.service-title {
  color: var(--accent);
  font-size: 1.25rem;
  margin: 0.5rem 0;
}

.service-text {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.service-card .icon-container {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.service-card .icon-container i {
  font-size: 1.5rem;
}

.service-card .service-icon-img {
  height: 60px;
  width: auto;
  margin-bottom: 0.5rem;
  border-radius: 10px; /* Bordes redondeados */
}

.text-accent {
  color: var(--accent) !important;
}

.text-highlight {
  color: var(--highlight) !important;
}

/* Mapa de Zonas de Entrega */
.mapa-container {
  height: 500px;
  border-radius: var(--border-radius);
  overflow: hidden;
  /*box-shadow: 0 8px 20px rgba(0,0,0,.3);*/
  border: none !important;
}

.zonas-info {
  background-color: var(--dark-accent);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  height: 100%;
  /*box-shadow: 0 8px 20px rgba(0,0,0,.3);*/
  border: none !important;
}

.zonas-legend {
  margin-top: 2rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.legend-color {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border-radius: 4px;
  border: none !important;
}

/* Control de Capas del Mapa */
.zonas-control {
  background: transparent;
}

.zonas-control-container {
  position: relative;
}

.zonas-toggle-btn {
  width: 40px !important;
  height: 40px !important;
  background-color: rgba(33, 33, 33, 0.8);
  /*border: 2px solid rgba(255,255,255,0.2);*/
  border-radius: 4px;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  /*box-shadow: 0 1px 5px rgba(0,0,0,0.4);*/
  color: white;
  /*backdrop-filter: blur(2px);*/
  overflow: hidden !important; /* Evitar que los elementos internos sobresalgan */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.zonas-toggle-btn:hover {
  background-color: rgba(42, 42, 42, 0.9);
  /*border-color: rgba(255,255,255,0.3);*/
}

.zonas-menu {
  position: absolute;
  top: 45px;
  left: 0;
  width: 200px;
  background-color: rgba(33, 33, 33, 0.85);
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.6);
  padding: 10px;
  display: none;
  z-index: 1000;
  color: white;
  /*border: 1px solid rgba(255,255,255,0.1);*/
  backdrop-filter: blur(3px);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.zonas-menu-title {
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
  /*border-bottom: 1px solid rgba(255,255,255,0.1);*/
  padding-bottom: 5px;
  color: var(--primary);
}

/* Controles de zoom */
.zonas-zoom-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.zonas-zoom-btn {
  width: 30px;
  height: 30px;
  background-color: rgba(60, 60, 60, 0.7);
  /*border: 1px solid rgba(255,255,255,0.2);*/
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: white;
  margin: 0 5px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.zonas-zoom-btn:hover {
  background-color: rgba(80, 80, 80, 0.8);
}

.zonas-divider {
  height: 1px;
  background-color: rgba(255,255,255,0.1);
  margin: 10px 0;
}

.zonas-checkbox-container {
  margin-bottom: 8px;
}

.zonas-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: white;
}

.zona-checkbox {
  margin-right: 8px;
  accent-color: var(--primary);
}

.zona-color {
  width: 16px;
  height: 16px;
  /*border-radius: 3px;*/
  margin-right: 8px;
  display: inline-block;
  /*border: 1px solid rgba(255,255,255,0.3);*/
}

/* Ajustes para móvil */
@media (max-width: 768px) {
  .zonas-menu {
    width: 180px;
    right: -5px;
  }
}

/* Animación Scroll Reveal */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: none;
}

/* Formulario */
.form-control:focus {
  /*box-shadow: 0 0 0 0.25rem rgba(255, 60, 0, 0.25);*/
  border-color: var(--primary);
}

/* Navbar */
.navbar-dark .navbar-nav .nav-link {
  position: relative;
}

.navbar-dark .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .3s;
}

.navbar-dark .navbar-nav .nav-link:hover::after {
  width: 100%;
}

/* Menú móvil a pantalla completa */
@media (max-width: 991.98px) {
  .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
  }

  .navbar-collapse.show {
    transform: translateY(0);
  }

  .navbar-nav {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
  }

  .navbar-nav .nav-item {
    margin: 1rem 0;
  }

  .navbar-nav .nav-link {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
  }

  .nav-icon {
    margin: 0.5rem;
    font-size: 1.5rem;
  }

  .navbar-toggler {
    z-index: 1001;
  }
}

/* Logo SVG */

/* Estilos comunes para todos los controles del mapa */
.leaflet-control-container .leaflet-control {
  background: none !important;
  box-shadow: none !important;
  margin: 10px !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Botón de pantalla completa */
.leaflet-control-fullscreen {
  background: none !important;
  box-shadow: none !important;
}

.leaflet-control-fullscreen a,
.leaflet-control-fullscreen-button {
  width: 40px !important;
  height: 40px !important;
  background-color: rgba(33, 33, 33, 0.8) !important;
  background-image: none !important;
  border-radius: 4px !important;
  color: white !important;
  backdrop-filter: blur(2px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important; /* Evitar que los elementos internos sobresalgan */
}

.leaflet-control-fullscreen a:hover,
.leaflet-control-fullscreen-button:hover {
  background-color: rgba(42, 42, 42, 0.9) !important;
  /*border-color: rgba(255,255,255,0.3) !important;*/
}

/* Asegurarse de que el icono sea visible */
.leaflet-control-fullscreen a .bi-arrows-fullscreen,
.leaflet-control-fullscreen-button .bi-arrows-fullscreen {
  color: white !important;
  font-size: 18px !important;
}

/* Unificar tamaño de los botones de control */
.zonas-toggle-btn {
  width: 40px !important;
  height: 40px !important;
  overflow: hidden !important; /* Evitar que los elementos internos sobresalgan */
}
.logo-svg {
  height: 30px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

/* Estilos del Footer */
.footer {
  background: linear-gradient(145deg, #1a1c23, #242730);
  color: #ffffff;
}

.footer-title {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background: #ff6b00; /* Color naranja del tema */
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 1rem;
}

.footer-links a {
  color: #b4b6bb;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 5px;
}

/* Estilos para la sección de Cooperación */
.coop-logo {
  display: block;
  margin-bottom: 0.5rem;
}

.coop-motto {
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--accent);
  font-weight: 500;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 20%;
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  margin-right: 10px;
  transition: all 0.3s ease;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.social-links a:hover {
  background: #ff6b00; /* Color naranja del tema */
  transform: translateY(-3px);
}

/* Iconos de redes sociales más grandes para la sección Nuestras Redes */
.social-links-large a {
  width: 50px;
  height: 50px;
  margin-right: 12px;
  margin-bottom: 12px;
}

.social-links-large i {
  font-size: 1.5rem;
}

.newsletter-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ffffff;
}

.newsletter-input:focus {
  background: rgba(255,255,255,0.15);
  border-color: #ff6b00; /* Color naranja del tema */
  color: #ffffff;
  box-shadow: none;
}

.btn-subscribe {
  background: #ff6b00; /* Color naranja del tema */
  border: none;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
}

.btn-subscribe:hover {
  background: #e05f00; /* Color naranja más oscuro */
  transform: translateY(-2px);
}

.footer-bottom {
  background: rgba(0,0,0,0.2);
}

.footer-bottom a {
  color: #ff6b00; /* Color naranja del tema */
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #ffffff;
}

/* Responsive logo */
@media (max-width: 576px) {
  .logo-svg {
    height: 24px;
  }
  
  .navbar-brand {
    font-size: 0.9rem;
  }
}

/* Leaflet Geocoder - estilo acorde al tema */
.leaflet-control-geocoder {
  background: transparent !important;
  box-shadow: none !important;
}

.leaflet-control-geocoder-icon {
  width: 40px !important;
  height: 40px !important;
  background: rgba(33,33,33,0.85) !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  box-shadow: 0 1px 5px rgba(0,0,0,0.6) !important;
}

.leaflet-control-geocoder-icon:before {
  content: "\f52a"; /* bootstrap-icons: search */
  font-family: "bootstrap-icons";
  font-size: 18px;
}

.leaflet-control-geocoder-form {
  margin-left: 6px;
}

.leaflet-control-geocoder-form input {
  height: 40px !important;
  min-width: 320px !important;
  max-width: 46vw !important;
  padding: 0 12px !important;
  background: rgba(33,33,33,0.85) !important;
  color: var(--text-light) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 6px !important;
  outline: none !important;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4) !important;
}

.leaflet-control-geocoder-form input::placeholder {
  color: var(--text-muted) !important;
}

.leaflet-control-geocoder-form input:focus {
  border-color: var(--primary) !important;
}

.leaflet-control-geocoder-alternatives {
  background: rgba(33,33,33,0.95) !important;
  color: var(--text-light) !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5) !important;
}

.leaflet-control-geocoder-alternatives li {
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

.leaflet-control-geocoder-alternatives a {
  color: var(--text-light) !important;
}

/* Ícono de geoposición con pulso */
.geopoint-marker {
  position: relative;
  width: 64px; /* tamaño solicitado */
  height: 64px;
  display: block;
}

.geopoint-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 30% 30%, #ff7a3a 0%, var(--primary) 60%, #b42d00 100%);
  border: 3px solid #ffffff;
  box-shadow: 0 3px 12px rgba(0,0,0,0.55);
}

.geopoint-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #ffffff;
}

.geopoint-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px; /* pulso acompaña al tamaño del logo */
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255,60,0,0.22);
  animation: geo-pulse 1.8s ease-out infinite;
}

@keyframes geo-pulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.7; }
  70% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* Imagen SVG del logo como marcador */
.geopoint-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  display: block;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.45));
}
