/* ==============================
   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;
}

/* Contenedor especifico para el hero - no afecta otros content-container */
.hero-content .content-container {
  width: 65%;
  max-width: 900px;
  padding: 3rem 2rem;
  margin-left: 15%;
  margin-right: -30%;
  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: 20px;
}

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

.services-gallery-carousel .service-card.clickable-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  aspect-ratio: 2.5 / 4;
  flex-shrink: 0;
}

.services-gallery-carousel .service-card.clickable-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  color: inherit;
}

.services-gallery-carousel .service-image {
  width: 100%;
  height: 60%;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.services-gallery-carousel .service-image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, #10375c, #0c2d48);
}

.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;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 40%;
}

.services-gallery-carousel .service-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #10375c;
  margin-bottom: 0.75rem;
  margin-top: 1rem;
  text-align: center;
}

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

/* 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-color: #071326;
  border-color: #1f2937;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

body.dark-mode .services-gallery-carousel .service-image {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

body.dark-mode .services-gallery-carousel .service-image::after {
  background: linear-gradient(to right, #64b5f6, #1976d2);
}

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

body.dark-mode .services-gallery-carousel .service-content p {
  color: rgba(255, 255, 255, 0.8);
}

/* 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) {
  .hero-content .content-container {
    width: 70%;
    margin-left: 10%;
    margin-right: -20%;
  }

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

  .profession-container {
    width: 14rem;
  }

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

  .carousel-arrow {
    width: 50px;
    height: 50px;
  }

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

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

@media (max-width: 1024px) {
  .hero-content .content-container {
    width: 75%;
    margin-left: 5%;
    margin-right: -15%;
  }

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

  .profession-container {
    width: 13rem;
  }

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

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

  .carousel-arrow {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 768px) {
  /* En moviles, ajustar para evitar superposicion con header/footer */
  .home-hero {
    height: calc(100vh - 120px);
    min-height: 500px;
    margin-top: 80px;
  }

  .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%
    );
  }

  .hero-content .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;
    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;
  }

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

  .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;
  }

  .carousel-arrow {
    display: none;
  }

  .carousel-container {
    margin: 0;
    width: 100%;
    border-radius: 15px;
  }

  .services-track {
    cursor: grab;
  }
}

@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;
  }
}
