/* ENCABEZADO CON FONDO AZUL Y IMAGEN TRASLÚCIDA */
.servicios-destacados {
  position: relative;
  background-color: #1d2d44;
  color: #ffffff;
  padding: 4rem 2rem;
  text-align: center;
  overflow: hidden;
  z-index: 0;
}

.servicios-destacados::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/servicios.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

.servicios-destacados h2,
.servicios-destacados p {
  position: relative;
  z-index: 1;
}

.servicios-destacados h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.servicios-destacados p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  color: #f1f1f1;
}

/* ==== CARRUSEL DE SERVICIOS ==== */
.carrusel-recomendado {
  position: relative;
  width: 100vw;
  height: 325px;
  margin: 0 auto;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

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

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

.slide.activo {
  opacity: 1;
  pointer-events: auto;
}

.contenido {
  background-color: rgba(0, 0, 0, 0.55);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  color: #ffffff;
  max-width: 80%;
}

.contenido h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ffd700;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}

.contenido p {
  font-size: 1.1rem;
  color: #f0f0f0;
}

.slide .contenido {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide.activo .contenido {
  opacity: 1;
  transform: translateY(0);
}

/* Indicadores (puntitos) */
.indicadores {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  z-index: 11;
}

.punto {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 6px;
  background-color: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.punto.activo {
  background-color: #d8b806;
}

/* Botones de navegación */
.btn {
  background-color: rgba(29, 45, 68, 0.7);
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.3s ease, filter 0.3s ease;
  outline: none;
  box-shadow: none;
}

.btn.anterior {
  left: 15px;
}

.btn.siguiente {
  right: 15px;
}

.btn:hover,
.btn:focus {
  background-color: rgba(29, 45, 68, 0.85);
  filter: brightness(0.9);
}

.btn:active {
  background-color: rgba(29, 45, 68, 0.9);
  filter: brightness(0.8);
  outline: none;
  box-shadow: none;
}

/* ==== SECCIÓN DE SERVICIOS CON IMÁGENES DE FONDO ==== */
.todos-los-servicios {
  background-color: #ffffff;
  padding: 4rem 2rem;
}

.servicios-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
}

.servicio {
  position: relative;
  color: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 320px;
  flex: 1 1 320px;  
  min-height: auto; /* CAMBIO: ajustar al contenido */
  box-shadow: 0 4px 12px rgba(216, 184, 6, 0.7); 
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible; /* CAMBIO: mostrar texto completo */
  cursor: default;
  transition: transform 0.3s ease;
  background-size: cover;
  background-position: center;
}

/* Overlay oscuro para mejorar legibilidad */
.servicio::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 0;
  border-radius: 12px;
}

.servicio h3, .servicio p {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem 0;
}

.servicio h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem; 
  font-weight: bold;
}

.servicio p {
  font-size: 1.15rem;
  line-height: 1.8; /* Ligeramente más espacio */
  margin-top: 0.5rem;
}

/* Imágenes específicas para cada servicio */
.servicio0 { background-image: url('assets/auditoriaexpress.jpg'); }
.servicio1 { background-image: url('assets/asesoriascontables.jpg'); }
.servicio2 { background-image: url('assets/asesoriastributarias.jpg'); }
.servicio3 { background-image: url('assets/asesoriaslaborales.jpg'); }
.servicio4 { background-image: url('assets/asesoriajuridica.avif'); }
.servicio5 { background-image: url('assets/creaciondesociedades.jpg'); }
.servicio6 { background-image: url('assets/informatica.webp'); }

/* ===== Responsivo ===== */
@media (max-width: 900px) {
  .servicios-grid {
    flex-direction: column;
    align-items: center;
  }
  
  .servicio {
    max-width: 90%;
    padding: 1.5rem; /* Ajuste de padding */
  }
}

@media (max-width: 768px) {
  .carrusel-recomendado {
    height: 300px;
  }

  .contenido h2 {
    font-size: 1.5rem;
  }

  .contenido p {
    font-size: 1rem;
  }

  .btn {
    font-size: 1.5rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .carrusel-recomendado {
    height: 250px;
  }

  .contenido {
    padding: 1rem;
  }

  .contenido h2 {
    font-size: 1.2rem;
  }

  .contenido p {
    font-size: 0.95rem;
  }

  .servicio {
    min-height: auto;
    max-width: 95%;
  }
}
