/* Portada de la home: carrusel de renders */
.gb-hero {
  position: relative;
  height: clamp(460px, 82vh, 860px);
  overflow: hidden;
  background: var(--gb-oscuro);
  font-family: 'Montserrat', sans-serif;
  color: #fff;
}

.gb-hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.gb-hero-slide.activo {
  opacity: 1;
}

.gb-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 7s ease-out;
}

.gb-hero-slide.activo img {
  transform: scale(1);
}

/* Degradé para que el texto se lea sobre cualquier foto */
.gb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 36, 48, 0.82) 0%, rgba(16, 36, 48, 0.45) 45%, rgba(16, 36, 48, 0) 75%),
    linear-gradient(0deg, rgba(16, 36, 48, 0.55) 0%, rgba(16, 36, 48, 0) 35%);
  pointer-events: none;
}

.gb-hero-contenido {
  position: absolute;
  top: 50%;
  left: max(1.5rem, calc((100vw - 1320px) / 2 + 1.5rem));
  z-index: 2;
  max-width: 560px;
  transform: translateY(-50%);
}

.gb-hero-pre {
  display: inline-block;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--gb-rojo);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gb-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 4rem);
  font-weight: 300;
  line-height: 1.08;
  color: #fff;
}

.gb-hero h1 strong {
  display: block;
  font-weight: 700;
}

.gb-hero-bajada {
  margin: 1.25rem 0 2rem;
  max-width: 440px;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.gb-hero-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gb-hero-botones a {
  text-decoration: none;
}

.gb-btn-sec {
  display: inline-block;
  padding: 0.85rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s;
}

.gb-btn-sec:hover {
  background: #fff;
  color: var(--gb-azul);
}

a.gb-btn {
  display: inline-block;
  color: #fff;
}

a.gb-btn:hover { color: #fff; }

/* Epígrafe de cada render, abajo a la derecha */
.gb-hero-epigrafe {
  position: absolute;
  right: max(1.5rem, calc((100vw - 1320px) / 2 + 1.5rem));
  bottom: 2rem;
  z-index: 2;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity 0.4s;
}

.gb-hero-epigrafe strong {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gb-hero-epigrafe:hover { color: #fff; text-decoration: underline; }

.gb-hero-puntos {
  position: absolute;
  bottom: 2.1rem;
  left: max(1.5rem, calc((100vw - 1320px) / 2 + 1.5rem));
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}

.gb-hero-puntos button {
  width: 34px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background-color 0.3s, width 0.3s;
}

.gb-hero-puntos button.activo {
  width: 54px;
  background: var(--gb-rojo);
}

@media (max-width: 768px) {
  .gb-hero { height: 78vh; min-height: 520px; }
  .gb-hero::after {
    background: linear-gradient(0deg, rgba(16, 36, 48, 0.9) 0%, rgba(16, 36, 48, 0.55) 45%, rgba(16, 36, 48, 0.1) 75%);
  }
  .gb-hero-contenido {
    top: auto;
    right: 1.25rem;
    bottom: 5.5rem;
    left: 1.25rem;
    transform: none;
  }
  .gb-hero-bajada { margin: 0.9rem 0 1.4rem; }
  .gb-hero-botones a { padding: 0.75rem 1.4rem; font-size: 0.78rem; }
  .gb-hero-epigrafe { right: 1.25rem; bottom: 1.6rem; max-width: 55%; font-size: 0.72rem; text-align: right; }
  .gb-hero-puntos { left: 1.25rem; bottom: 1.9rem; }
  .gb-hero-puntos button { width: 22px; }
  .gb-hero-puntos button.activo { width: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .gb-hero-slide, .gb-hero-slide img { transition: none; transform: none; }
}

/* Aire entre "Nuestros desarrollos" y el formulario */
.gb-contacto { margin-top: 4rem; }

/* Sin bajada, el título necesita aire antes de los botones */
.gb-hero h1 + .gb-hero-botones { margin-top: 2rem; }

/* Flechas para cambiar de imagen */
.gb-hero-flecha {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(16, 36, 48, 0.25);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(4px);
  transition: background-color 0.2s, border-color 0.2s;
}

.gb-hero-flecha:hover {
  border-color: var(--gb-rojo);
  background: var(--gb-rojo);
}

.gb-hero-prev { left: 1.25rem; }
.gb-hero-next { right: 1.25rem; }

/* El texto arranca después de la flecha izquierda */
@media (min-width: 769px) {
  .gb-hero-contenido { left: max(5.5rem, calc((100vw - 1320px) / 2 + 1.5rem)); }
}

@media (max-width: 768px) {
  .gb-hero-flecha { top: 38%; width: 42px; height: 42px; font-size: 1.5rem; }
  .gb-hero-prev { left: 0.75rem; }
  .gb-hero-next { right: 0.75rem; }
}
