/* ==============================
   PÁGINA DE INICIO
   ============================== */

/* Hero Section con imagen de fondo completo y contenido a la derecha */
.home-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

/* Imagen de fondo que ocupa toda la pantalla */
.hero-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Capa de transparencia con gradiente actualizado - área de transparencia reducida */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 25%,
    rgba(255, 255, 255, 0.1) 30%,
    rgba(255, 255, 255, 0.8) 40%,
    #ffffff 45%,
    #ffffff 100%
  );
}

/* Contenedor del contenido posicionado en la mitad de 37%-100% */
.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-container {
  width: 65%;
  max-width: 900px;
  padding: 3rem 2rem;
  margin-left: 15%; /* Aumentado de 8% a 15% para mover más a la derecha */
  margin-right: -30%; /* Ajustado para compensar */
  text-align: center;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap; /* Evitar que el nombre se divida en líneas */
}

.hero-content h1 .first-name {
  color: #050f1f; /* Color para "Giovanni" */
}

.hero-content h1 .middle-name {
  color: #10375c; /* Color para "Andrés" */
}

.hero-content h1 .last-name {
  color: #10375c; /* Color para "Rodríguez" - Mismo que Andrés */
}

.hero-content h1 .surname {
  color: #050f1f; /* Color para "Acevedo" - Mismo que Giovanni */
}

/* Contenedor para "ABOGADO" - Tamaño original pero más ancho */
.profession-container {
  display: inline-block;
  margin: 0.5rem auto 1.5rem;
  padding: 0.4rem 2rem; /* Más padding horizontal */
  border: 1px solid #b00000;
  background-color: transparent;
  border-radius: 50px;
  width: 16rem; /* Más ancho que el original (era 12rem) */
  text-align: center;
}

.profession-text {
  font-size: 1rem; /* Tamaño original */
  font-weight: 600;
  letter-spacing: 1px;
  color: #071326;
}

.hero-content p {
  color: #071326;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-align: justify; /* Justificado */
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

/* Botones de acción */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center; /* Centrar los botones */
}

.hero-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.hero-button.primary {
  background-color: #10375c;
  color: white;
  border: 2px solid #10375c;
}

.hero-button.primary:hover {
  background-color: #0c2d48;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(16, 55, 92, 0.3);
}

.hero-button.secondary {
  background-color: transparent;
  color: #10375c;
  border: 2px solid #10375c;
}

.hero-button.secondary:hover {
  background-color: rgba(16, 55, 92, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(16, 55, 92, 0.1);
}

/* Contenido principal de la página de inicio */
.home-content {
  padding: 0;
}

/* ==============================
   SECCIÓN SERVICIOS CARRUSEL
   ============================== */

/* Añadiendo estilos para la nueva sección de servicios centrada con carrusel de galería */
.services-carousel-section {
  padding: 6rem 0;
  background-color: #f8f9fa;
}

.services-carousel-section.centered-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.services-carousel-section .content-container {
  width: 100%;
  max-width: 1200px;
  padding: 0 2rem;
  margin: 0 auto;
}

.services-carousel-section .section-header {
  text-align: center;
  margin-bottom: 1rem; /* Reduced from 2rem to 1rem to reduce space between text and carousel */
}

.services-carousel-section .section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #10375c;
  margin-bottom: 1rem;
}

.services-carousel-section .description-container {
  max-width: 800px;
  margin: 0 auto;
}

.services-carousel-section .section-header p {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

/* Carrusel de galería con ancho completo y flechas laterales */
.services-gallery-carousel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Flechas de navegación laterales con imágenes */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0;
}

.carousel-arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.carousel-arrow:hover img {
  transform: scale(1.1);
}

.carousel-arrow-left {
  left: -80px;
}

.carousel-arrow-right {
  right: -80px;
}

.carousel-container {
  overflow: hidden;
  border-radius: 15px;
  margin: 0 100px;
}

.services-track {
  display: flex;
  transition: transform 0.5s ease;
  gap: 2rem;
}

/* Tarjetas con dimensiones similares a página de servicios */
.services-gallery-carousel .service-card.clickable-card {
  flex: 0 0 calc(33.333% - 1.33rem); /* 3 cards on desktop */
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  min-height: 350px;
}

.services-gallery-carousel .service-card.clickable-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
}

.services-gallery-carousel .service-image {
  height: 200px;
  overflow: hidden;
}

.services-gallery-carousel .service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.services-gallery-carousel .service-card:hover .service-image img {
  transform: scale(1.05);
}

.services-gallery-carousel .service-content {
  padding: 1.5rem;
  height: calc(100% - 200px); /* Altura calculada para contenido uniforme */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.services-gallery-carousel .service-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #10375c;
  margin-bottom: 0.75rem;
}

.services-gallery-carousel .service-content p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0;
  flex-grow: 1;
}

/* Indicadores más pequeños y transparentes */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.indicator {
  width: 2px; /* Reducido de tamaño original */
  height: 2px; /* Reducido de tamaño original */
  border-radius: 50%;
  background: rgba(16, 55, 92, 0.3); /* Más transparencia */
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 6px; /* Área clickeable más grande */
}

.indicator.active {
  background: rgba(16, 55, 92, 0.7); /* Menos opaco que antes */
}

.indicator:hover {
  background: rgba(16, 55, 92, 0.6);
}

/* Controles del carrusel originales - ocultos ya que usamos flechas laterales */
.carousel-controls {
  display: none;
}

/* ==============================
   MODO OSCURO
   ============================== */

body.dark-mode .hero-overlay {
  background: linear-gradient(
    to right,
    rgba(7, 19, 38, 0) 0%,
    rgba(7, 19, 38, 0) 25%,
    rgba(7, 19, 38, 0.1) 30%,
    rgba(7, 19, 38, 0.8) 40%,
    #071326 45%,
    #071326 100%
  );
}

body.dark-mode .hero-content h1 .first-name {
  color: #ffffff; /* Color para "Giovanni" en modo oscuro */
}

body.dark-mode .hero-content h1 .middle-name {
  color: rgba(255, 255, 255, 0.64); /* Color para "Andrés" en modo oscuro */
}

body.dark-mode .hero-content h1 .last-name {
  color: rgba(255, 255, 255, 0.64); /* Color para "Rodríguez" en modo oscuro - Mismo que Andrés */
}

body.dark-mode .hero-content h1 .surname {
  color: #ffffff; /* Color para "Acevedo" en modo oscuro - Mismo que Giovanni */
}

body.dark-mode .profession-text {
  color: #ffffff; /* Color para "ABOGADO" en modo oscuro */
}

body.dark-mode .hero-content p {
  color: #ffffff;
}

body.dark-mode .hero-button.primary {
  background-color: #10375c;
  color: white;
  border: 2px solid #10375c;
}

body.dark-mode .hero-button.primary:hover {
  background-color: #1a4b7c;
}

body.dark-mode .hero-button.secondary {
  color: white;
  border: 2px solid white;
}

body.dark-mode .hero-button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .services-carousel-section {
  background-color: #0a1a2a;
}

body.dark-mode .services-carousel-section .section-header h2 {
  color: #ffffff;
}

body.dark-mode .services-carousel-section .section-header p {
  color: #b0b0b0;
}

body.dark-mode .services-gallery-carousel .service-card {
  background: #1a2332;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.dark-mode .services-gallery-carousel .service-card:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

body.dark-mode .services-gallery-carousel .service-content h3 {
  color: #ffffff;
}

body.dark-mode .services-gallery-carousel .service-content p {
  color: #b0b0b0;
}

/* Estilos de modo oscuro para flechas con imágenes */
body.dark-mode .carousel-arrow {
  background: transparent;
}

body.dark-mode .carousel-arrow-left img {
  content: url("../img/dark-caret-circle-izquierda.png");
}

body.dark-mode .carousel-arrow-right img {
  content: url("../img/dark-caret-circle-derecha.png");
}

body.dark-mode .carousel-arrow img {
  filter: none; /* Remove filter since we're using specific dark mode images */
}

body.dark-mode .carousel-arrow:hover img {
  filter: brightness(1.2); /* Slight brightness on hover */
}

/* Responsive */
@media (max-width: 1200px) {
  .content-container {
    width: 70%;
    margin-left: 10%; /* Ajustado para pantallas medianas */
    margin-right: -20%;
  }

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

  .profession-container {
    width: 14rem;
  }

  .services-gallery-carousel .service-card {
    flex: 0 0 calc(33.333% - 1.33rem);
  }

  .blog-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-carousel-section .section-header h2 {
    font-size: 2.2rem;
  }

  /* Ajustes responsive para flechas con más espacio */
  .carousel-arrow {
    width: 50px;
    height: 50px;
  }

  .carousel-arrow-left {
    left: -60px;
  }

  .carousel-arrow-right {
    right: -60px;
  }

  .carousel-container {
    margin: 0 80px;
  }
}

@media (max-width: 1024px) {
  .content-container {
    width: 75%;
    margin-left: 5%; /* Ajustado para tablets */
    margin-right: -15%;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .profession-container {
    width: 13rem;
  }

  .services-gallery-carousel .service-card {
    flex: 0 0 calc(33.333% - 1.33rem);
  }

  .blog-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* En móviles, ajustar para evitar superposición con header/footer */
  .home-hero {
    height: calc(100vh - 120px); /* Restar altura del header */
    min-height: 500px;
    margin-top: 80px; /* Espacio para el header */
  }

  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0) 37%,
      rgba(255, 255, 255, 0.5) 50%,
      #ffffff 100%
    );
  }

  .content-container {
    width: 90%;
    margin-left: 0;
    margin-right: 0;
    padding: 2rem 1rem;
    position: relative;
    text-align: center;
  }

  .hero-content {
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
  }

  .hero-content h1 {
    white-space: normal; /* Permitir división en móviles si es necesario */
    font-size: 2rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .profession-container {
    width: 12rem;
    min-width: 10rem;
    padding: 0.3rem 1.5rem;
  }

  .hero-content p {
    text-align: center; /* Centrado en móviles en lugar de justificado */
  }

  .services-carousel-section.centered-section {
    min-height: auto;
    padding: 3rem 0;
  }

  .services-gallery-carousel .service-card {
    flex: 0 0 100%;
  }

  .services-track {
    gap: 1rem;
  }

  .services-carousel-section .section-header h2 {
    font-size: 2rem;
  }

  .services-carousel-section .section-header {
    margin-bottom: 2rem;
  }

  .services-gallery-carousel {
    padding: 2rem 0;
  }

  .blog-preview-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-preview-section .section-header h2 {
    font-size: 2rem;
  }

  /* Hide arrows on mobile, use swipe instead */
  .carousel-arrow {
    display: none;
  }

  .carousel-container {
    margin: 0;
  }
}

@media (max-width: 480px) {
  .home-hero {
    height: calc(100vh - 100px);
    margin-top: 70px;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .hero-button {
    width: 100%;
    max-width: 250px;
    padding: 0.875rem 1.5rem;
  }

  .profession-container {
    width: 10rem;
  }

  .services-gallery-carousel .service-content {
    padding: 1rem;
  }

  .services-gallery-carousel {
    padding: 2rem 0;
  }

  .blog-preview-section {
    padding: 3rem 0;
  }

  .blog-preview-section .section-header h2 {
    font-size: 1.75rem;
  }

  .blog-preview-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

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

  .home-hero {
    margin-top: 60px;
  }

  .profession-container {
    width: 10rem;
  }
}
