/* =============================================================================
   ESTILOS PARA CARRUSELES Y GALERÍAS DE FOTOGRAFÍAS
   ============================================================================= */

/* Hero Carousel */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Controles del carrusel */
.carousel-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-dot.active {
  background-color: var(--color-primary);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.carousel-arrow:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.carousel-arrow.prev {
  left: 20px;
}

.carousel-arrow.next {
  right: 20px;
}

/* Galería de operaciones mejorada */
.operations-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Controles para filtrar por municipio */
.operations-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.operation-filter {
  background: var(--color-white);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.operation-filter.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.operation-filter:hover {
  transform: translateY(-2px);
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.gallery-overlay p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Lightbox para galería */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.3s ease;
}

.lightbox-close:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Carrusel de testimonios */
.testimonials-carousel {
  position: relative;
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-slide {
  display: none;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

.testimonial-slide.active {
  display: block;
}

.testimonial-quote {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-gray);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
}

.testimonial-info h4 {
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.testimonial-info p {
  color: var(--color-gray);
  font-size: 0.9rem;
  margin: 0;
}

/* Carrusel por municipios */
.municipality-carousel {
  position: relative;
  margin-top: 2rem;
}

.municipality-slides {
  display: flex;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.municipality-slide {
  min-width: 100%;
  transition: transform 0.5s ease;
}

.municipality-slide img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.municipality-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.municipality-nav button {
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.municipality-nav button.active,
.municipality-nav button:hover {
  background: var(--color-primary);
  color: white;
}

/* =============================================================================
   ESTILOS PARA SECCIÓN DE TARIFAS
   ============================================================================= */

.tariffs-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tariff-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.tariff-header h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.tariff-header p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Tabla de tarifas */
.tariff-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background-color: var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.tariff-row {
  display: contents;
}

.tariff-cell {
  background-color: var(--color-white);
  padding: 1rem 0.75rem;
  text-align: center;
  font-size: 0.9rem;
}

.tariff-row.header .tariff-cell {
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.85rem;
}

.tariff-row:not(.header):hover .tariff-cell {
  background-color: var(--color-neutral);
}

/* Información de tarifas comerciales */
.tariff-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: var(--color-neutral);
  border-radius: var(--border-radius-small);
  border-left: 4px solid var(--color-primary);
}

.info-label {
  font-weight: 500;
  color: var(--color-text);
}

.info-value {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1.1rem;
}

/* Servicios especiales */
.special-services {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: var(--color-neutral);
  border-radius: var(--border-radius-small);
  transition: all 0.3s ease;
}

.service-item:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateX(5px);
}

.service-name {
  font-weight: 500;
}

.service-price {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1.05rem;
}

.service-item:hover .service-price {
  color: var(--color-white);
}

/* Footer de tarifas */
.tariff-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-border);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.tariff-notes {
  background-color: var(--color-neutral);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--color-accent);
}

.tariff-notes h4 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.tariff-notes ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tariff-notes li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.4;
}

.tariff-notes li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

.tariff-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: center;
}

.tariff-actions .btn {
  text-align: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-carousel {
    height: 250px;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .carousel-arrow.prev {
    left: 10px;
  }

  .carousel-arrow.next {
    right: 10px;
  }

  .operations-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .testimonials-carousel {
    padding: 2rem 1rem;
  }

  .testimonial-author {
    flex-direction: column;
    gap: 0.5rem;
  }

  .lightbox-content {
    max-width: 95%;
  }

  .tariff-table {
    grid-template-columns: repeat(2, 1fr);
    font-size: 0.8rem;
  }

  .tariff-cell {
    padding: 0.75rem 0.5rem;
  }

  .tariff-footer {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tariff-actions {
    order: -1;
  }
}

@media (max-width: 480px) {
  .hero-carousel {
    height: 200px;
  }

  .carousel-controls {
    bottom: 10px;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
  }

  .testimonial-quote {
    font-size: 1rem;
  }

  .tariff-table {
    grid-template-columns: 1fr;
  }

  .tariff-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
  }

  .info-row {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .service-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}
