/* Componentes comunes a todas las páginas: encabezado, formulario de contacto,
   pie y ajustes de diseño. Se carga después de index.min.css para pisar lo viejo. */
:root {
  --gb-rojo: #A72608;
  --gb-azul: #1D3441;
  --gb-gris: #75838A;
  --gb-oscuro: #102430;
  --gb-crema: #FAF5EE;
}

/* ---------- Encabezado ---------- */
.gb-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 2px 14px rgba(16, 36, 48, 0.08);
  font-family: 'Montserrat', sans-serif;
}

.gb-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
}

.gb-logo img {
  display: block;
  width: 160px;
  height: auto;
}

.gb-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gb-links > li > a {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--gb-azul);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.gb-links > li > a:hover,
.gb-links > li > a.gb-activo {
  color: var(--gb-rojo);
}

.gb-links .dropdown-menu {
  margin-top: 0.4rem;
  padding: 0.5rem 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(16, 36, 48, 0.16);
}

.gb-links .dropdown-item {
  padding: 0.6rem 1.25rem;
  color: var(--gb-azul);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.gb-links .dropdown-item:hover,
.gb-links .dropdown-item:focus {
  background: rgba(167, 38, 8, 0.07);
  color: var(--gb-rojo);
}

.gb-redes {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gb-redes a {
  color: var(--gb-azul);
  font-size: 1.15rem;
  transition: color 0.2s, transform 0.2s;
}

.gb-redes a:hover {
  color: var(--gb-rojo);
  transform: translateY(-2px);
}

.gb-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(167, 38, 8, 0.35);
  border-radius: 8px;
  background: transparent;
}

.gb-menu-btn span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--gb-rojo);
}

@media (min-width: 992px) {
  .gb-offcanvas .offcanvas-body {
    display: flex;
    align-items: center;
    gap: 3rem;
  }
}

@media (max-width: 991.98px) {
  .gb-nav { padding: 0.6rem 1rem; }
  .gb-logo img { width: 140px; }
  .gb-menu-btn { display: flex; }

  .gb-offcanvas { width: min(320px, 85vw) !important; }
  .gb-offcanvas .offcanvas-header { padding: 1.25rem 1.5rem; background: none; }
  .gb-offcanvas .offcanvas-header img { width: 130px; height: auto; }
  .gb-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.5rem 1.5rem 2rem;
    background: none;
  }

  .gb-links { flex-direction: column; align-items: stretch; gap: 0; }
  .gb-links > li { border-bottom: 1px solid #eee; }
  .gb-links > li > a { display: block; padding: 1rem 0; font-size: 0.9rem; }
  .gb-links .dropdown-menu { position: static !important; transform: none !important; margin: 0 0 0.75rem; box-shadow: none; padding: 0; }
  .gb-links .dropdown-item { padding: 0.55rem 0.75rem; white-space: normal; }
  .gb-redes { margin-top: 2rem; gap: 1.5rem; }
  .gb-redes a { font-size: 1.5rem; }
}

/* ---------- Formulario de contacto ---------- */
.gb-contacto {
  padding: 4rem 1.25rem;
  background: #f3f1ee;
  font-family: 'Montserrat', sans-serif;
  scroll-margin-top: 80px;
}

.gb-contacto-inner {
  max-width: 860px;
  margin: 0 auto;
}

.gb-contacto-titulo {
  margin: 0;
  color: var(--gb-azul);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 600;
  text-align: center;
}

.gb-contacto-bajada {
  margin: 0.5rem 0 2rem;
  color: var(--gb-gris);
  font-size: 1rem;
  text-align: center;
}

.gb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}

.gb-campo {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.gb-campo span {
  color: var(--gb-azul);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.gb-campo-ancho {
  grid-column: 1 / -1;
}

.gb-campo input,
.gb-campo select,
.gb-campo textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d8d3cd;
  border-radius: 6px;
  background: #fff;
  color: var(--gb-oscuro);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gb-campo textarea {
  resize: vertical;
  min-height: 110px;
}

.gb-campo input:focus,
.gb-campo select:focus,
.gb-campo textarea:focus {
  outline: none;
  border-color: var(--gb-rojo);
  box-shadow: 0 0 0 3px rgba(167, 38, 8, 0.15);
}

.gb-form-pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.gb-form-legal {
  margin: 0;
  color: var(--gb-gris);
  font-size: 0.72rem;
  line-height: 1.4;
}

.gb-form-legal a { color: inherit; }

.gb-btn {
  flex-shrink: 0;
  padding: 0.85rem 2.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--gb-rojo);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s;
}

.gb-btn:hover { background: #8a1f06; }
.gb-btn:disabled { opacity: 0.6; cursor: wait; }

/* El aviso de reCAPTCHA va en el texto legal del formulario */
.grecaptcha-badge { visibility: hidden; }

@media (max-width: 600px) {
  .gb-contacto { padding: 3rem 1rem; }
  .gb-form-grid { grid-template-columns: 1fr; }
  .gb-form-pie { flex-direction: column-reverse; align-items: stretch; text-align: center; }
}

/* ---------- Pie ---------- */
.gb-footer {
  background: #fff;
  border-top: 1px solid #ece8e3;
  font-family: 'Montserrat', sans-serif;
}

.gb-footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 3rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.gb-footer-logo img {
  display: block;
  width: 180px;
  height: auto;
}

.gb-footer-empresas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.gb-footer-label {
  padding-right: 1.5rem;
  border-right: 1px solid #cfd4d7;
  color: var(--gb-gris);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.gb-footer-logos {
  display: flex;
  gap: 1rem;
}

.gb-footer-logos img {
  display: block;
  width: 72px;
  height: auto;
  transition: transform 0.2s;
}

.gb-footer-logos a:hover img { transform: translateY(-3px); }

.gb-footer-datos {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--gb-gris);
  font-size: 0.85rem;
  font-style: normal;
  line-height: 1.5;
}

.gb-footer-datos a {
  color: var(--gb-azul);
  text-decoration: none;
}

.gb-footer-datos a:hover { color: var(--gb-rojo); }
.gb-footer-datos .gb-redes { margin-top: 0.4rem; }

.gb-footer-legal {
  padding: 1rem 1.5rem;
  border-top: 1px solid #ece8e3;
  color: var(--gb-gris);
  font-size: 0.75rem;
  text-align: center;
}

@media (max-width: 991.98px) {
  .gb-footer-inner { grid-template-columns: 1fr; justify-items: center; gap: 2rem; text-align: center; }
  .gb-footer-empresas { flex-direction: column; gap: 1rem; }
  .gb-footer-label { padding: 0; border: 0; }
  .gb-footer-logos { flex-wrap: wrap; justify-content: center; }
  .gb-footer-datos { align-items: center; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.gb-whatsapp {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--gb-rojo);
  color: #fff;
  font-size: 1.9rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  transition: transform 0.2s;
}

.gb-whatsapp:hover {
  color: #fff;
  transform: scale(1.08);
}

@media (max-width: 600px) {
  .gb-whatsapp { right: 1rem; bottom: 1rem; width: 54px; height: 54px; }
}

/* ---------- Ajustes de diseño sobre los estilos existentes ---------- */

/* Home: el fondo con "PROYECTOS DESTACADOS" se superponía con el título */
.cuartaSeccion {
  background-image: url("fondoDiagonal.png");
  background-size: 100%;
}

/* Home: los 4 desarrollos en una sola fila */
@media (min-width: 601px) {
  .contenedorImgCuarta { padding-left: 0; gap: 1.5rem; }
  .contenedorImgProy1,
  .contenedorImgProy2 { width: 19vw; height: 28vw; }
}

/* Home: velo oscuro para que la frase sobre la foto se lea */
.imgParallax { position: relative; }
.imgParallax::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 36, 48, 0.2), rgba(16, 36, 48, 0.55));
}
.imgParallax > div { position: relative; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }

/* Home en celular: el título del slider se salía del recuadro */
@media (max-width: 600px) {
  .cartelSobreSlider { height: auto; padding: 0.9rem 0; }
  .titulosCartelSlider { margin-top: 0; }
  .titulosCartelSlider .tituloTransparente { display: none; }
  .titulo1Slider,
  .titulo2Slider { margin: 0; font-size: 1.35rem; line-height: 1.25; }

  /* Empresas en dos columnas en vez de una */
  .terceraSeccion { justify-content: center; padding-left: 4%; padding-right: 4%; }
  .containerLogo img { width: 42vw; }
}
