/* General */ 
body, html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Figtree', sans-serif;
  overflow-x: hidden;
}





/* Encabezado transparente */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  height: 60px;
}

#header.scrolled {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
}

#logo img {
  height: 50px;
}

#mainNav ul {
  display: flex;
  list-style: none;
  gap: 40px;
}

#mainNav a {
  color: #fbfbfb;
  font-size: 20px;
  font-weight: 700;
  transition: color 0.3s ease;
  text-decoration: none;
  position: relative;
}

#mainNav a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #890000;
  transition: width 0.3s ease;
}

#mainNav a:hover::after {
  width: 100%;
}

#header.scrolled #mainNav a {
  color: #333;
}


/* The Overlay (background) */
.overlay-movil {
  /* Height & width depends on how you want to reveal the overlay (see JS below) */   
  height: 100%;
  width: 0;
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  background-color: rgb(0,0,0); /* Black fallback color */
  background-color: rgba(0,0,0, 0.9); /* Black w/opacity */
  overflow-x: hidden; /* Disable horizontal scroll */
  transition: 0.5s; /* 0.5 second transition effect to slide in or slide down the overlay (height or width, depending on reveal) */
}

/* Position the content inside the overlay */
.overlay-movil-content {
  position: relative;
  top: 25%; /* 25% from the top */
  width: 100%; /* 100% width */
  text-align: center; /* Centered text/links */
  margin-top: 30px; /* 30px top margin to avoid conflict with the close button on smaller screens */
}

/* The navigation links inside the overlay */
.overlay-movil a {
  padding: 8px;
  text-decoration: none;
  font-size: 36px;
  color: #818181;
  display: block; /* Display block instead of inline */
  transition: 0.3s; /* Transition effects on hover (color) */
}

/* When you mouse over the navigation links, change their color */
.overlay-movil a:hover, .overlay-movil a:focus {
  color: #f1f1f1;
}

/* Position the close button (top right corner) */
.overlay-movil .closebtn {
  position: absolute;
  top: 20px;
  right: 45px;
  font-size: 60px;
  cursor: pointer;
  color: rgb(255, 255, 255);
}



/* Estilo del botón hamburguesa */
button-menu {  
  display: none;
  font-size: 24px;
  color: #ffffff; /* Color del ícono */
  background-color: #6f0000; /* Fondo del botón */
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

button-menu:hover {
  background-color: #a80000; /* Fondo al pasar el mouse */
  transform: scale(1.1); /* Efecto de agrandar */
}

button-menu:focus {
  outline: none; /* Elimina el borde al hacer clic */
}



@media screen and (max-width: 500px) {

  #header {    
    height: 50px;
  }

  #logo img {
    height: 35px;
  }

  #mainNav{
    display: none !important; /* Oculta las secciones */
  }

  .overlay-movil a {font-size: 20px}
  .overlay-movil .closebtn {
    font-size: 40px;
    top: 15px;
    right: 35px;
  }

  button-menu{
    display: block;
  }
}



/* Inicio */
#inicio {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 0;
  z-index: 1;
}

#fondoImagen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

#inicio section {
  position: relative;
  z-index: 1;
}

#inicio h1 {
  font-size: 5rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

#inicio p {
  font-size: 1.75rem;
  margin-bottom: 54px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  width: 1200px;
}

.cta-button {
  border-radius: 6px;
  background-color: #6f0000;
  border: none;
  color: #FFFFFF;
  text-align: center;
  font-size: 28px;
  padding: 20px;
  width: 200px;
  transition: all 0.5s;
  cursor: pointer;
  margin: 5px;
}

.cta-button span {
  cursor: pointer;
  display: inline-block;
  position: relative;
  transition: 0.5s;
}

.cta-button span:after {
  content: '\00bb';
  position: absolute;
  opacity: 0;
  top: 0;
  right: -20px;
  transition: 0.5s;
}

.cta-button:hover span {
  padding-right: 25px;
}

.cta-button:hover span:after {
  opacity: 1;
  right: 0;
}

.cta-button:hover {
  background-color: #a80000;  /* Color de fondo */
  color: #ffffff; /* Cambia el color del texto */
  width: 250px;
}


/* Responsivo */
@media screen and (max-width: 480px) {
  #inicio h1 {
    font-size: 2.5rem;
  }

  #inicio p {
    font-size: 1.2rem;
    width: 350px;
  }

  .cta-button {
    width: 150px;
    font-size: 18px;
    padding: 12px;
  }
}




/* Fondo blanco para el contenido principal */
#content-wrapper {
  background-color: #fff;
  padding: 50px 20px;
}

#content-wrapper section {
  padding: 50px 0;
}


#content-wrapper h2 {
  color: #333;
}

#content-wrapper p {
  color: #555;
}





/* Sección ¿Quiénes somos? */
#quienes-somos {
  background-color: #f8f8f8;
  padding: 60px 20px !important; /* Se mantiene un padding cómodo */
  margin: 0 auto;
}

.content-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1400px; /* Max ancho de la sección */
  margin: 0 auto;
  gap: 30px; /* Reduce el espacio entre el texto y la imagen */
  padding: 0 20px; /* Espacio interno para evitar que el contenido toque los bordes */
}

.text-content {
  max-width: 650px; /* No reduce el tamaño del texto */
  color: #333;
}

.text-content h2 {
  font-size: 2.5rem; /* Título grande */
  font-weight: 600;
  text-align: left;
  color: #a70000 !important;
}

.text-content p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #555;
  text-align: left;
  margin-bottom: 20px;
  text-align: justify;
  
}

footer {
  font-size: 1rem;
  text-align: right;
  color: #555;
  margin-top: 10px;
}

blockquote {
  font-size: 1.2rem;
  font-style: italic;
  color: #555;
  border-left: 5px solid #a80000;
  padding-left: 45px; /* Ajuste del espacio entre la barra y el texto */
  margin: 20px 0;
  position: relative;
}


blockquote:before {
  content: open-quote;
  font-size: 3rem;
  color: #a80000;
  position: absolute;
  left: 12px; /* Ajusta la distancia de la comilla de apertura */
  top: -10px;  /* Ajusta la comilla de apertura para no empalmarse */
}

blockquote:after {
  content: close-quote;
  font-size: 3rem;
  color: #a80000;
  position: absolute;
  right: 20px; /* Ajusta la distancia de la comilla de cierre */
  bottom: 5px; /* Ajusta la comilla de cierre para que no se empalme */
}
.image-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.image-content img {
  width: 100%;
  max-width: 800px; /* Tamaño máximo de la imagen */
  height: auto;
}


@media screen and (max-width: 480px) {
  #quienes-somos {
    background-color: #f8f8f8;
    padding: 10px 20px !important; /* Reduce el padding superior */
    margin-top: -20px; /* Ajusta hacia arriba la posición de la sección */
  }

  .content-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 10px;
  }

  .text-content {
    max-width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }

  .text-content h2 {
    font-size: 1.77rem;
  }

  .text-content p {
    font-size: 1rem;
    line-height: 1.5;
  }

  blockquote {
    font-size: 1rem;
    padding-left: 15px;
  }

  blockquote:before {
    font-size: 2.5rem;
    left: 6px; /* Ajusta la distancia de la comilla de apertura */
    top: -10px;  /* Ajusta la comilla de apertura para no empalmarse */
  }
  
  blockquote:after {
    font-size: 2.5rem;
    right: 10px; /* Ajusta la distancia de la comilla de cierre */
    bottom: 20px; /* Ajusta la comilla de cierre para que no se empalme */
  }

  .image-content img {
    max-width: 90%;
    height: auto;
  }
}










/* Seccion servicios */
#servicios {
  background-color: #f8f8f8;
  padding: 60px 20px;
  text-align: center; /* Centra el contenido */
}

.services-header h2 {
  font-size: 3rem;
  font-weight: 700;
  color: #a70000;
  margin-bottom: 10px;
}

.services-header p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 40px;
}


/* Contenedor del carrusel */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1400px; /* Ajusta el tamaño máximo del carrusel */
  margin: 0 auto; /* Centra el carrusel */
}

/* Carrusel */
.slider-for {
  position: relative;
}

/* Asegurando que todas las imágenes se ajusten igual */
.carousel-item {
  position: relative;
  margin: 0 10px;
  height: 300px !important; /* Mantén una altura fija */
  border-radius: 8px;
  overflow: hidden;
  display: flex; /* Asegura que las imágenes estén centradas */
  justify-content: center; /* Centrado horizontal */
  align-items: center; /* Centrado vertical */
}

.carousel-item img {
  width: 100%; /* Asegura que la imagen ocupe todo el ancho del contenedor */
  height: 100%; /* Asegura que la imagen ocupe todo el alto del contenedor */
  object-fit: cover; /* Recorta la imagen para que llene completamente el contenedor sin distorsionarse */
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

/* Overlay con transparencia */
.carousel-item .overlay-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgb(255, 255, 255);
  opacity: 1;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-item:hover .overlay-carousel {
  background-color: #8a0202a0;
}

.carousel-item:hover {
  transform: scale(1.05);
}

.carousel-item p {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff !important;
}


button.slick-prev, button.slick-next  {
  position: absolute;
  top: 50%;
  z-index: 10;  
  color: rgb(255, 255, 255) !important;  
  cursor: pointer;
  transition: background-color 0.3s ease;
  outline: none;
  box-shadow: none;
  transform: translateY(-50%);
  width: 100px; /* Ajusta el ancho del botón */
  height: 50px; /* Ajusta la altura del botón */
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%; /* Si quieres los botones circulares */
}

button.slick-prev {
  left: 10px;
}

button.slick-next {
  right: 10px;
}

/* Ajusta el tamaño del SVG dentro del botón */
.slick-prev svg, .slick-next svg {
  width: 24px; /* Tamaño del icono de la flecha */
  height: 24px;
  fill: currentColor;
  transition: fill 0.3s ease;
  cursor: pointer;
}


.slick-prev::before {
  content: none !important;  /* Elimina el contenido generado por ::before */
}
.slick-next::before {
  content: none !important;  /* Elimina el contenido generado por ::before */
}


@media screen and (max-width: 480px) {
  /* Ajusta la sección de servicios */
  #servicios {
    padding: 40px 15px; /* Reduce el espacio superior/inferior y los márgenes laterales */
  }

  .services-header h2 {
    font-size: 2rem; /* Reduce el tamaño del título */
  }

  .services-header p {
    font-size: 1.2rem; /* Reduce el tamaño del texto descriptivo */
    margin-bottom: 20px;
    margin-left: 10px;
    margin-right: 10px;
  }

  /* Carrusel */
  .carousel-container {
    max-width: 100%; /* Asegura que ocupe el ancho completo de la pantalla */
  }

  .carousel-item {
    height: 200px; /* Reduce la altura de las imágenes en dispositivos pequeños */
    margin: 0 5px; /* Reduce el margen entre los elementos */
  }

  .carousel-item img {
    object-fit: cover;
  }

  .carousel-item p {
    font-size: 1rem; /* Reduce el tamaño del texto en la superposición */
  }

  /* Botones de navegación */
  button.slick-prev, button.slick-next {
    width: 40px; /* Tamaño más pequeño de los botones */
    height: 40px;
  }

  .slick-prev svg, .slick-next svg {
    width: 16px; /* Tamaño más pequeño del icono */
    height: 16px;
  }

  button.slick-prev {
    left: 5px; /* Ajusta la posición del botón en pantallas pequeñas */
  }

  button.slick-next {
    right: 5px; /* Ajusta la posición del botón en pantallas pequeñas */
  }
}







/* Seccion abogados */
#abogados {
  text-align: center;
  padding: 40px 0;
}

#abogados h2 {
  font-size: 2.5rem;
  color: #a70000;
  margin-bottom: 20px;
}

.abogados-header p {
  font-size: 1.4rem;
  color: #555;
  margin-bottom: 40px;
}

.abogados-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap; /* Para adaptarse mejor en pantallas pequeñas */
}

.abogado-item {
  position: relative;
  width: 400px;
  height: 500px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.abogado-item:hover {
  transform: scale(1.05);
}

.abogado-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.overlay-abogados {
  position: absolute;
  top: 0; /* Para que cubra toda la imagen */
  left: 0;
  right: 0;
  bottom: 0; /* Para que cubra toda la imagen */
  background-color: rgba(154, 0, 0, 0.75); /* Transparencia y color */
  color: white;
  display: flex; /* Usamos flexbox para centrar contenido */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px; /* Espaciado interno */
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.abogado-item:hover .overlay-abogados {
  transform: translateY(0);
}

.overlay-abogados p {
  font-size: 1.5rem; /* Tamaño adecuado para el nombre */
  margin: 10px 0;
  color: white !important;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-icon {
  font-size: 1.5rem;
  color: white;
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: #ffd700; /* Cambiamos a un color visible como dorado */
}

.leer-mas {
  display: inline-block; /* Cambiamos a inline-block para ajustar mejor el espaciado */
  margin-top: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem; /* Ajustamos el tamaño */
}

.leer-mas:hover {
  text-decoration: underline;
  color: #ffd700; /* A juego con el hover de los íconos */
}





/* --- SECCIÓN CONTACTO --- */
#contacto {
  background-color: #f4f4f4;
  padding: 60px 20px;
}

.contacto-header {
  text-align: center;
  margin-bottom: 40px;
}
.contacto-header h2 {
  font-size: 3rem;
  font-weight: 700;
  color: #a70000;
  margin-bottom: 10px;
}
.contacto-header p {
  font-size: 1.2rem;
  color: #555;
}

/* Contenedor de 2 columnas */
.contacto-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Columna Izquierda: Info y Mapa */
.info-ubicacion {
  flex: 1;
  min-width: 300px;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.datos-oficina h3 {
  color: #a70000;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.datos-oficina p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.datos-oficina i {
  color: #a70000;
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.mapa-container {
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
}

/* Columna Derecha: Formulario */
.form-despacho {
  flex: 1;
  min-width: 300px;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  border-top: 5px solid #a70000; /* Detalle estético superior */
}

.form-despacho h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.input-box {
  margin-bottom: 15px;
}

.input-box input, 
.input-box textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: 'Figtree', sans-serif;
  font-size: 1rem;
  transition: border 0.3s;
  box-sizing: border-box; /* Importante para que no se salga */
}

.input-box input:focus, 
.input-box textarea:focus {
  border-color: #a70000;
  outline: none;
}

.btn-enviar-form {
  background-color: #a70000;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s;
}

.btn-enviar-form:hover {
  background-color: #800000;
}

/* --- CORRECCIÓN PARA MÓVIL (CONTACTO Y MAPA) --- */
@media screen and (max-width: 768px) {
  
  /* 1. Reducir el espacio gris a los lados */
  #contacto {
    padding: 40px 10px !important; /* Antes era 20px, ahora 10px para ganar espacio */
  }

  /* 2. Alinear la columna perfectamente */
  .contacto-wrapper {
    flex-direction: column;
    align-items: center; /* Asegura que todo esté centrado */
    width: 100%;
    gap: 30px;
  }

  /* 3. Ajustar las tarjetas blancas (Mapa y Formulario) */
  .info-ubicacion, .form-despacho {
    width: 100% !important;    /* Forzar a usar todo el ancho */
    min-width: unset !important; /* Eliminar el bloqueo de 300px */
    padding: 20px !important;    /* Reducir relleno interno (antes 30px) */
    box-sizing: border-box;      /* Vital: evita que el padding agrande la caja */
    margin: 0 auto;              /* Centrado extra por seguridad */
  }

  /* 4. Ajustar tamaño de textos en móvil para que no empujen */
  .form-despacho h3, .datos-oficina h3 {
    font-size: 1.5rem;
  }
}