/* Hero logo circle button styles (final para sobrescribir) */
#circle-dark {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 60% 40%, #222 0%, #111 80%, #000 100%);
  box-shadow:
    0 8px 32px 0 #000a,
    0 2px 8px 0 #222,
    inset 0 2px 24px 0 #444,
    inset 0 -8px 32px 0 #000c,
    0 0 12px 2px #fff2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  animation: circle-3d-rotate 4s infinite linear;
  perspective: 400px;
  text-decoration: none; /* Evita el subrayado en el enlace */
}
#circle-dark::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 24px;
  width: 72px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(120deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.05) 100%);
  opacity: 0.7;
  filter: blur(1px);
  pointer-events: none;
}
#circle-dark:hover {
  box-shadow:
    0 16px 48px 0 #fff,
    0 0 32px 8px #b80000,
    0 8px 32px 0 #000a,
    0 2px 8px 0 #222,
    inset 0 2px 24px 0 #444,
    inset 0 -8px 32px 0 #000c;
  transform: scale(1.08) rotateY(8deg);
}
@keyframes circle-3d-rotate {
  0% {
    transform: scale(1) rotateY(0deg) rotateX(0deg);
  }
  30% {
    transform: scale(1.03) rotateY(8deg) rotateX(2deg);
  }
  60% {
    transform: scale(1.06) rotateY(-8deg) rotateX(-2deg);
  }
  100% {
    transform: scale(1) rotateY(0deg) rotateX(0deg);
  }
}

.navbar-hamburger {
  display: none;
}

.navbar-links {
  display: flex;
  align-items: center;
}
.navbar-links .nav-link {
  background: none;
  border: none;
  color: #111;
  font-size: 1em;
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 600;
  margin-left: 24px;
  cursor: pointer;
  transition: color 0.3s;
  padding-bottom: 2px;
  text-decoration: none;
}
  
.navbar-links .nav-link:hover {
  color: #b80000;
}

@media (max-width: 900px) {
  .navbar-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    margin-left: 16px;
  }
  .navbar-hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: #222;
    margin: 4px 0;
    border-radius: 2px;
    transition: background 0.3s;
  }
  .navbar-links {
    position: absolute;
    top: 60px;
    left: 50%; /* 1. Posiciona el menú en el centro horizontal */
    transform: translateX(-50%); /* 2. Ajusta para un centrado perfecto */
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 16px 0;
    display: none;
    flex-direction: column;
    align-items: center;
    width: 90vw; /* 3. Dale un ancho responsivo */
    max-width: 280px; /* 4. Limita el ancho máximo */
    z-index: 200;
  }
  .navbar-links.open {
    display: flex;
  }
  .navbar-links .nav-link {
    margin: 8px 0;
    font-size: 1.1em;
    margin-left: 0; /* Resetea el margen que se hereda de la vista de escritorio */
    width: 100%;
    text-align: center;
    padding: 8px 16px;
  }

  .lang-switcher {
    margin-left: 0;
    margin-top: 16px;
    padding-top: 8px; /* Reducido para mejor ajuste */
    width: 80%;
    justify-content: center;
  }

  #circle-dark {
    margin: 0;
    max-width: 220px;
    max-height: 220px;
    z-index: 1;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  background: #FAF9F6; /* Blanco Perla */
  color: #111;
  font-family: 'Inter', sans-serif; /* Establecer Inter como fuente base para el cuerpo */
  margin: 0;
  padding: 0;
}

.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
background: rgba(245, 245, 245, 0.75); /* Gris suave con efecto cristal */
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-bottom: 1.5px solid rgba(200,200,200,0.25);
box-shadow: 0 4px 24px rgba(0,0,0,0.08);
border-radius: 0 0 24px 24px;
}

.navbar-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px; /* Espacio entre el logo y el texto */
  font-weight: 600;
  font-size: 1.1em;
  font-family: 'Playfair Display', serif;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  text-transform: none;
  transition: -webkit-text-fill-color 0.3s, color 0.3s;
  text-decoration: none; /* Quita el subrayado del enlace */
  color: #222;
}
.navbar-logo:hover {
  -webkit-text-fill-color: #b80000;
  color: #b80000;
}

.navbar-logo img {
  height: 36px; /* Ajusta el tamaño según tu logo */
  width: auto;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.navbar-logo:hover img {
  transform: rotate(-15deg) scale(1.1);
}

@keyframes logo-glow {
  0% {
    box-shadow: 0 0 8px 0 #bbb;
  }
  50% {
    box-shadow: 0 0 18px 2px #fff, 0 0 8px 0 #bbb;
  }
  100% {
    box-shadow: 0 0 8px 0 #bbb;
  }
}

/* --- Language Switcher --- */
.lang-switcher {
  display: flex;
  align-items: center;
  margin-left: 24px; /* Mismo margen que los otros nav-links */
}

.lang-option {
  font-family: 'Poppins', sans-serif;
  font-weight: 600; /* Mismo grosor que nav-link */
  font-size: 1em;   /* Mismo tamaño que nav-link */
  color: #555;     /* Un poco más oscuro para mejor integración */
  text-decoration: none;
  transition: color 0.3s;
  cursor: pointer;
}

/* El hover es el mismo que en los otros botones */
.lang-option:not(.active):hover {
  color: #b80000;
}

.lang-option.active {
  color: #111;
  cursor: default;
}

.lang-separator {
  color: #ddd;
  margin: 0 4px;
  font-size: 1em; /* Mismo tamaño para consistencia */
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  padding-top: 80px;
}

.section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  margin-bottom: 60px;
}

.hero {
  height: 100vh;
  margin-top: -80px; /* Compensa el padding-top de main */
  padding-top: 80px; /* Empuja el contenido para que no quede bajo el navbar */
  box-sizing: border-box;
  justify-content: center;
}

section.hero {
  margin-bottom: 0 !important;
}
.hero-content {
  min-height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 32px;
  background: #F5F5F5; /* Gris suave para contraste */
  padding-top: 60px;
  padding-bottom: 60px;
  border-radius: 24px;
}

.hero-content h1 {
  font-family: 'Syne', 'Space Grotesk', sans-serif;
  font-size: 4.5em;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 0;
  margin-top: 0;
  color: inherit;
  perspective: 800px;
  transform-style: preserve-3d;
}
.hero-main {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  background: linear-gradient(135deg, #111111 30%, #888888 50%, #111111 70%); /* Negro brillante más oscuro */
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 5px rgba(0,0,0,0.15);
  animation: shine-effect 5s linear infinite;
  opacity: 0.9; /* Opacidad para suavizar el texto */
  display: inline-block; /* Necesario para que transform funcione */
  transition: transform 0.3s ease-out;
  transform: rotateX(calc(var(--scroll-rotation, 0) * 1deg));
}
.hero-secondary {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  background: linear-gradient(135deg, #111111 30%, #888888 50%, #111111 70%); /* Negro brillante más oscuro */
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 5px rgba(0,0,0,0.15);
  animation: shine-effect 5s linear infinite;
  opacity: 0.9; /* Opacidad para suavizar el texto */
  font-style: normal !important;
  letter-spacing: 0px;
  margin-top: -0.4em;
  font-size: 1em;
  display: inline-block; /* Necesario para que transform funcione */
  transition: transform 0.3s ease-out;
  transform: rotateX(calc(var(--scroll-rotation, 0) * -1deg));
}

.scroll-down-indicator {
  display: block;
  width: 24px;
  height: 24px;
  margin-top: 32px;
  position: relative;
  text-decoration: none;
}

.scroll-down-indicator span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-left: 2px solid #888;
  border-bottom: 2px solid #888;
  transform: rotate(-45deg);
  animation: bounce-arrow 2s infinite;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

.scroll-down-indicator:hover span {
  border-color: #b80000;
  animation-play-state: paused;
}

@keyframes shine-effect {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

@keyframes bounce-arrow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(-45deg);
  }
  40% {
    transform: translateY(8px) rotate(-45deg);
  }
  60% {
    transform: translateY(4px) rotate(-45deg);
  }
}
@media (max-width: 900px) {
  .hero-content h1 {
    font-size: 2.3em;
    letter-spacing: -1px;
  }
}

.hero-accent {
  color: #b80000;
  font-style: italic;
}
.hero-subtitle {
  font-size: 1.25em;
  color: #555;
  font-weight: 500;
  margin-top: 2px;
  margin-bottom: 2px;
}

/* Journey / Timeline Section */
.journey {
  background: #1a1a1a;
  color: #f0f0f0;
  min-height: auto; /* Override default section height */
  padding: 80px 0;
  margin-bottom: 0;
  border-radius: 24px;
}

.journey-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
}

.journey-container h2 {
  font-family: 'syne', serif;
  font-size: 3em;
  margin-bottom: 80px;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

/* The vertical line */
.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: #333;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  border-radius: 2px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
  box-sizing: border-box;
  margin-bottom: 50px;
}

/* The circle on the timeline */
.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: -12px;
  background-color: #f0f0f0;
  border: 4px solid #b80000;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  z-index: 1;
}

/* Position items to the left */
.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

/* Position items to the right */
.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

/* Fix the circle for right-aligned items */
.timeline-item:nth-child(even)::after {
  left: -12px;
}

.timeline-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  margin-bottom: 16px;
}

.timeline-caption {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9em;
  font-style: italic;
  color: #b0b0b0;
  text-align: inherit;
  margin-top: 8px; /* Ajustado para dar espacio sobre el epígrafe */
  margin-bottom: 16px;
  padding: 4px 12px; /* Añadido padding vertical para que el fondo se vea mejor */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
  will-change: opacity, transform;
  display: inline-block; /* Para que el fondo se ajuste solo al texto */
  background-color: #2c2c2c; /* Fondo para que el epígrafe destaque */
  border-radius: 8px; /* ¡Aquí está el borde redondeado! */
  max-width: 100%; /* Asegura que la etiqueta no se salga del contenedor */
  box-sizing: border-box; /* Incluye el padding en el cálculo del ancho */
}

.timeline-image, .timeline-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.timeline-image img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}

.timeline-item:hover .timeline-image img {
  transform: scale(1.05);
}

.timeline-content {
  /* Animar desde los lados en escritorio */
  transform: translateX(40px);
}

.timeline-item:nth-child(even) .timeline-content {
  transform: translateX(-40px);
}

.timeline-item.is-visible .timeline-image,
.timeline-item.is-visible .timeline-content,
.timeline-item.is-visible .timeline-caption {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.timeline-item.is-visible .timeline-content {
  padding: 10px;
}

.timeline-content h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 8px;
  color: #fff;
}

.timeline-item.is-visible .timeline-content p {
  transition-delay: 0.2s; /* Retraso para el párrafo */
}

.timeline-content p {
  font-family: 'Special Elite', monospace; /* ¡Nuestra nueva fuente! */
  font-size: 1.1em; /* Un poco más grande para que se lea bien */
  line-height: 1.7; /* Más espacio entre líneas, típico de máquina de escribir */
  color: #ddd; /* Un gris un poco más claro para mejorar el contraste */
  margin: 0;
  /* Opcional: un pequeño truco para que no se vea tan perfecta */
  letter-spacing: 0.5px;
}

.timeline-content strong {
  color: #b80000;
  font-weight: 700;
}
@media (max-width: 900px) {
  .timeline::after {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 60px;
    padding-right: 15px;
    text-align: left;
  }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-item::after {
    left: 10px;
  }

  /* En móvil, la animación es siempre desde abajo */
  .timeline-content, .timeline-item:nth-child(even) .timeline-content {
    transform: translateY(30px);
  }
}

.hero-logo {
  width: 120px;
  height: 120px;
  background: #111;
  border-radius: 50%;
  margin: 0 auto 24px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.hero h1 {
  font-size: 2.5em;
  margin-bottom: 18px;
  font-weight: 700;
}
.hero .italic {
  font-style: italic;
}
.hero p {
  font-size: 1.15em;
  color: #222;
  margin-bottom: 32px;
}
.hero-btn {
  background: #fff;
  color: #111;
  border: 2px solid #111;
  padding: 12px 32px;
  font-size: 1em;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  margin-top: 0;
  margin-bottom: 0;
}
.hero-btn:hover {
  background: #111;
  color: #fff;
  transform: scale(1.05);
}

.advantage-content {
  width: 100%;
  text-align: center;
}

.advantage-title {
  /* Replicando el estilo del h1 del hero */
  font-family: 'Syne', 'Space Grotesk', sans-serif;
  font-size: 4.5em;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 48px; /* Aumentado el espacio antes del subtítulo */
  /* Estilo simplificado: texto negro, sin animación */
  color: #111;
}

.advantage-title .word-wrapper {
  display: inline-block;
  overflow: hidden; /* Oculta la palabra hasta que se anime */
  vertical-align: bottom; /* Alinea las palabras correctamente */
}

.advantage-title .word {
  display: inline-block;
  /* Hacemos el texto visible por defecto, manteniendo el efecto de brillo */
  transform: translateY(0);
  opacity: 1;
}

.advantage-title .word-accent {
  /* Restauramos el color para la palabra acentuada, quitando el efecto de brillo */
  color: #b80000;
}

.advantage-list {
  max-width: 700px; /* Constriñe el ancho para mejor legibilidad */
  margin: 0 auto; /* Centra la lista */
  text-align: left; /* Sobrescribe el text-align: center del contenedor */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.advantage-title.is-visible ~ .advantage-list {
  opacity: 1;
  transform: translateY(0);
}

.advantage-separator {
  border: none;
  height: 1px;
  background-color: #e0e0e0;
  margin: 0;
}
.contact {
  background: linear-gradient(135deg, #2a2a2a 0%, #111111 100%);
  color: #FAF9F6;
  border-radius: 24px;
}
.contact-content {
  width: 100%;
  text-align: center;
}
.contact-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 3em;
  margin-bottom: 24px;
  color: #FAF9F6;
}
.contact-pitch {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2em;
  line-height: 1.7;
  color: #d1d1d1; /* Gris claro para contraste suave */
  max-width: 600px;
  margin: 0 auto 40px auto; /* Aumenta el margen inferior para más espacio */
  text-shadow: none;
}
.contact-buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 32px 0;
}
.contact-btn {
  background: transparent;
  color: #FAF9F6;
  border: 2px solid #FAF9F6;
  padding: 12px 32px;
  font-size: 1em;
  border-radius: 30px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  display: inline-flex;
  align-items: center;
}
.contact-btn:hover {
  background: #b80000;
  color: #FAF9F6;
  transform: scale(1.05);
  border-color: #b80000;
  box-shadow: 0 4px 20px rgba(184, 0, 0, 0.4); /* Sombra sutil del color del botón */
}

.contact-btn:active {
  transform: scale(0.98); /* Efecto de presionar */
  transition: transform 0.1s ease;
}

.site-footer {
  background-color: #b80000;
  color: #FAF9F6;
  padding: 32px 16px;
  text-align: center;
  border-radius: 24px 24px 0 0;
}

.site-footer p {
  margin: 0 0 8px 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.1em;
}
.site-footer .copyright {
  font-size: 0.9em;
  font-weight: 400;
  opacity: 0.8;
  margin: 0;
}

/* Overlay efecto apagar la luz */
#overlay-dark {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none; /* No se puede hacer clic cuando está inactivo */
  /* Usamos Grid para superponer el círculo y el texto fácilmente */
  display: none; /* Oculto por defecto, sin transición */
  place-items: center;
  background-color: rgba(10, 10, 10, 0.98); /* Fondo oscuro casi opaco */
}
#overlay-dark.is-active {
  display: grid; /* Se muestra al instante al añadir la clase */
  pointer-events: auto; /* Se puede interactuar cuando está activo */
}

/* Eliminamos las reglas de #circle-light que ya no se usan para este efecto */

.overlay-quote {
  position: relative;
  z-index: 1;
  color: #e0e0e0;
  font-family: 'Special Elite', monospace;
  font-size: 1.4em;
  line-height: 1.6;
  text-align: center;
  max-width: 550px;
  padding: 20px;
  /* Efecto de resplandor / luz */
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.7), 0 0 12px rgba(255, 255, 255, 0.5);
  /* Estado inicial: invisible */
  opacity: 0;
  transform: scale(0.95);
  /* La animación de la cita empieza con retraso, después de que la pantalla se apaga */
  transition: opacity 1s ease-out 0.2s, transform 1s ease-out 0.2s;
}

#overlay-dark.is-active .overlay-quote {
  /* Estado final: visible */
  opacity: 1;
  transform: scale(1);
}

.overlay-quote span {
  display: block;
  margin-top: 1em;
  font-size: 0.7em;
  opacity: 0.7;
  font-family: 'Poppins', sans-serif;
  text-shadow: none; /* El autor no necesita el resplandor */
}

@media (max-width: 900px) {
  main {
    max-width: 100%;
    padding: 0 8px;
  }
  .navbar-content {
    padding: 12px 8px;
  }
  .section {
    margin-bottom: 40px;
  }
  .advantage-title {
    font-size: 2.3em;
    letter-spacing: -1px;
    margin-bottom: 16px;
  }
  .transition-content {
    flex-direction: column;
    gap: 24px;
  }
  .advantage-item {
    gap: 16px;
    padding: 20px 0;
  }
  .advantage-item__icon {
    font-size: 1.8em;
  }
  .advantage-item__text h3 {
    font-size: 1.3em;
  }
  .advantage-item__text p {
    font-size: 1em;
  }
  .contact-content h2 {
    font-size: 2.4em;
  }
  .contact-pitch {
    font-size: 1.1em;
    line-height: 1.6;
  }
}

@media (max-width: 600px) {
  .overlay-quote {
    font-size: 1.2em;
  }
  /* Ajuste para títulos largos en móvil */
  .project-detail-header h1 {
    font-size: 2.1em;
    line-height: 1.15;
    word-break: break-word; /* Seguridad extra para palabras muy largas */
  }
  .journey-container h2 {
    font-size: 2.0em;
    line-height: 1.2;
    margin-bottom: 40px; /* Reducimos también el margen para mejor espaciado */
  }
  /* Ajuste para sección de contacto en móvil */
  .contact-content h2 {
    font-size: 2.0em;
    line-height: 1.25;
  }
  .contact-pitch {
    font-size: 1.0em;
  }
}

/* --- Ajustes para la página de Proyectos --- */
.page-projects main {
  max-width: 100%; /* Permite que el contenedor principal sea de ancho completo */
  padding: 0;      /* Elimina el padding superior y lateral */
}

/* --- Estilos para la nueva sección de Proyectos --- */

/* Ajustes generales para la sección de proyectos */
#projects-showcase {
  flex-direction: column; /* Apila el header y la cuadrícula */
  justify-content: center; /* Centra el contenido verticalmente */
  padding-top: 120px; /* Más espacio arriba para compensar el navbar */
  padding-bottom: 80px;
  min-height: auto; /* La altura se ajustará al contenido */
}

/* Header de la sección de proyectos */
.projects-header {
  background: none; /* Quitamos el fondo gris de .hero-content */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0; /* Sin padding extra */
  margin-bottom: 60px; /* Espacio entre el título y las tarjetas */
}

/* Mejora la interacción del título con efecto scramble */
.projects-header .hero-content h1 span {
  cursor: pointer;
  user-select: none; /* Evita que el texto se seleccione al pasar el ratón */
}

p.projects-subtitle {
  max-width: 600px; /* Para que no sea demasiado ancho en pantallas grandes */
}

/* Cuadrícula de Proyectos */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
  width: 100%;
}

/* Tarjeta de Proyecto Individual */
.project-card {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.05);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.07), 0 12px 32px rgba(0,0,0,0.07);
}

/* Contenedor de la Imagen */
.project-card-image-container {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative; /* Para posicionar el gradiente de superposición */
}

/* Superposición de gradiente sobre la imagen para una transición suave */
.project-card-image-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20%; /* Altura del gradiente reducida */
  background: linear-gradient(to top, #111111 15%, transparent 90%);
}

.project-card-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Asegura que la imagen cubra el área sin deformarse */
  transition: transform 0.4s ease;
}

.project-card:hover .project-card-image-container img {
  transform: scale(1.05);
}

/* Contenido de la Tarjeta (texto) */
.project-card-content {
  background: linear-gradient(to top, #b80000 3px, #111111 3px); /* Fondo oscuro con línea roja inferior */
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Permite que el contenido crezca y empuje el CTA hacia abajo */
}

.project-card-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4em;
  color: #f0f0f0; /* Texto claro de marca */
  margin: 0 0 8px 0;
}

.project-card-content p {
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
  line-height: 1.6;
  color: #ddd; /* Gris claro para buena legibilidad */
  margin: 0 0 24px 0;
  flex-grow: 1; /* Ocupa el espacio disponible */
}

/* Call to Action (CTA) */
.project-card-cta {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 30px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  text-decoration: none;
  align-self: center; /* Centra el botón horizontalmente */
  text-align: center;
  color: #fff; /* Texto blanco */
  border: 2px solid rgba(255, 255, 255, 0.8); /* Borde blanco semi-transparente */
  /* Efecto de brillo constante */
  background: linear-gradient(135deg, #b80000 35%, #e04040 50%, #b80000 65%);
  background-size: 250% auto;
  animation: shine-effect 4s linear infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255, 100, 100, 0.7); /* Brillo rojo en hover */
}

/* Responsive */
@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: 1fr; /* Una columna en móviles */
    gap: 24px;
  }
}

/* --- Estilos para la cabecera de los Casos de Estudio --- */
.project-detail-header {
  padding: 60px 16px 40px 16px;
  text-align: center;
  background-color: #f5f5f5;
}

.project-detail-header .container {
  max-width: 800px;
  margin: 0 auto;
}

.project-label {
  display: inline-block;
  background-color: #b80000;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.9em;
  padding: 6px 16px;
  border-radius: 30px; /* Bordes redondeados estilo "píldora" */
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.project-detail-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: 3.5em;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin: 0;
  color: #111;
}

/* Responsive para la cabecera del detalle */
@media (max-width: 900px) {
  .project-detail-header h1 {
    font-size: 2.5em;
  }
}

/* --- Estilos para los Casos de Estudio --- */
.project-detail {
  padding: 80px 0;
  min-height: auto;
}

.project-detail .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

.project-header {
  text-align: center;
  margin-bottom: 60px;
}

.project-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 3em;
  margin: 0 0 8px 0;
}

.project-header .project-tagline {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2em;
  color: #555;
}

.star-section {
  margin-bottom: 48px;
}

.star-section h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8em;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.star-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #b80000;
  color: #fff;
  border-radius: 50%;
  font-family: 'Syne', sans-serif;
  font-size: 1.2em;
}

.star-section p {
  font-family: 'Inter', sans-serif;
  font-size: 1.1em;
  line-height: 1.8;
  color: #333;
}

/* --- Project Navigation (Prev/Next) --- */
.project-navigation {
  padding: 0;
  margin-top: 60px;
  border-top: 1px solid #e0e0e0;
  min-height: auto;
  display: block;
}

.project-nav-container {
  display: flex;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

.project-nav-link {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: color 0.3s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
}

.project-nav-link:hover {
  color: #b80000;
  transform: translateY(-2px);
}

.project-nav-link.next {
  margin-left: auto; /* Pushes the 'next' link to the far right */
}

/* Mini Carousel de Proceso */
.mini-carousel {
  position: relative;
  margin-top: 24px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.mini-carousel .carousel-wrapper {
  width: 300%; /* 3 slides */
}

.mini-carousel .mini-slide {
  width: calc(100% / 3); /* 3 slides */
  height: auto;
  background: #eee;
}

.mini-carousel .mini-slide img {
  width: 100%;
  display: block;
}

.mini-carousel .carousel-btn {
  width: 40px;
  height: 40px;
  font-size: 18px;
}
