/* ==========================================================================
   Ficha pública de una oficina (/oficina?o=<slug>)
   Reutiliza los tokens gc-* del resto del sitio.
   ========================================================================== */

/*
  El espaciado va aquí, no en `.section-padding`.

  El marcado lleva esa clase, pero está definida en `sobre-nosotros.css`, que
  esta página no carga: no aplicaba nada y el contenido quedaba pegado al pie.
  Arriba no se notaba porque el jumbotron trae su propio `mb-5`.
*/
.gc-of {
  background: var(--gc-bg, #f6f5f2);
  padding-block: clamp(1rem, 2vw, 1.75rem) clamp(3rem, 6vw, 5rem);
}
.gc-of__back {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  color: var(--gc-accent, #826111); font-family: 'Manrope', system-ui, sans-serif;
  font-size: .9rem; font-weight: 700; text-decoration: none;
}
.gc-of__back:hover { color: var(--gc-ink, #171b26); }

.gc-of__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.gc-of__main { min-width: 0; }
.gc-of__aside { min-width: 0; position: sticky; top: 96px; display: grid; gap: 18px; }

/* --- Portada --- */
.gc-of__hero {
  position: relative; height: 320px; border-radius: var(--gc-radius, 18px);
  overflow: hidden; background: #232c3d;
}
.gc-of__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gc-of__hero-sinfoto {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #55617a; font-size: 3rem;
}
.gc-of__hero-ov {
  position: absolute; inset: auto 0 0 0; padding: 26px;
  background: linear-gradient(180deg, transparent, rgba(11, 18, 32, .9));
}
.gc-of__eyebrow {
  display: block; font-size: .7rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gc-gold, #ffc107);
}
.gc-of__hero-ov h2 {
  margin: 6px 0 0; color: #fff; font-family: 'Manrope', system-ui, sans-serif;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -.02em;
}
.gc-of__hero-ov p { margin: 4px 0 0; color: #c9ced8; font-size: .95rem; }

/* Las fotos restantes van en una tira: la primera ya es la portada. */
.gc-of__galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.gc-of__galeria img {
  width: 100%; height: 120px; object-fit: cover; display: block;
  border-radius: 14px; border: 1px solid var(--gc-border, #e9e7e2);
}

/*
  Recortadas a 120 px no se ve lo que hay en ellas, así que se pueden abrir a
  tamaño completo. El indicador de lupa es lo que avisa de que son pulsables:
  una foto sin más no parece un botón.
*/
.gc-of__ampliar {
  position: relative; display: block; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: 14px; overflow: hidden; width: 100%;
}
.gc-of__ampliar::after {
  content: '\f00e';                       /* fa-magnifying-glass-plus */
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; right: 8px; bottom: 8px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(11, 18, 32, .62); color: #fff; font-size: .72rem;
  opacity: 0; transition: opacity .18s ease;
}
.gc-of__ampliar:hover::after,
.gc-of__ampliar:focus-visible::after { opacity: 1; }
.gc-of__ampliar:focus-visible { outline: 2px solid var(--gc-accent, #826111); outline-offset: 2px; }

/* --- Visor a tamaño completo --- */
.gc-of__visor {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(11, 18, 32, .92);
  animation: gcVisorEntra .18s ease both;
}
.gc-of__visor[hidden] { display: none; }
.gc-of__visor img {
  max-width: min(1100px, 100%); max-height: 100%;
  object-fit: contain; border-radius: 10px; display: block;
}
.gc-of__visor-cerrar {
  position: absolute; top: 18px; right: 18px;
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; line-height: 1;
  transition: background .18s ease;
}
.gc-of__visor-cerrar:hover { background: rgba(255, 255, 255, .28); }
@keyframes gcVisorEntra { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gc-of__visor { animation: none; } }

/* --- Bloques de texto --- */
.gc-of__bloque {
  margin-top: 22px; padding: 24px; background: var(--gc-surface, #fff);
  border: 1px solid var(--gc-border, #e9e7e2); border-radius: var(--gc-radius, 18px);
  box-shadow: var(--gc-shadow, 0 18px 40px -34px rgba(23, 27, 38, .5));
}
.gc-of__bloque h3 {
  margin: 0 0 12px; font-family: 'Manrope', system-ui, sans-serif;
  font-size: 1.1rem; font-weight: 800; color: var(--gc-ink, #171b26);
}
.gc-of__texto { margin: 0; color: var(--gc-muted, #6b7280); font-size: .96rem; line-height: 1.75; }

.gc-of__servicios { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gc-of__servicios li { display: flex; align-items: flex-start; gap: 10px; color: var(--gc-muted, #6b7280); font-size: .95rem; line-height: 1.6; }
.gc-of__servicios li i { margin-top: 4px; flex: none; color: #3d9a63; }

/* --- Responsable --- */
.gc-of__jefe { display: flex; gap: 18px; flex-wrap: wrap; }
.gc-of__jefe img, .gc-of__jefe-sinfoto {
  width: 128px; height: 128px; flex: none; border-radius: 18px; object-fit: cover;
  border: 1px solid var(--gc-border, #e9e7e2); background: #f4f2ee;
}
.gc-of__jefe .gc-of__ampliar { width: 128px; flex: none; border-radius: 18px; }
.gc-of__jefe .gc-of__ampliar img { display: block; }
.gc-of__jefe-sinfoto { display: inline-flex; align-items: center; justify-content: center; color: #b9bcc4; font-size: 2rem; }
.gc-of__jefe-datos { min-width: 0; flex: 1; }
.gc-of__jefe-datos b { display: block; font-family: 'Manrope', system-ui, sans-serif; font-size: 1.05rem; color: var(--gc-ink, #171b26); }
.gc-of__jefe-cargo {
  display: block; margin: 2px 0 8px; color: var(--gc-accent, #826111);
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.gc-of__jefe-datos p { margin: 0 0 10px; color: var(--gc-muted, #6b7280); font-size: .92rem; line-height: 1.65; }
.gc-of__jefe-contacto { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.gc-of__jefe-contacto a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gc-ink, #171b26); font-size: .9rem; text-decoration: none;
  /* Un correo largo no tiene espacios donde partir y en móvil se salía de la
     tarjeta. `anywhere` le deja cortar por donde haga falta. */
  max-width: 100%; overflow-wrap: anywhere;
}
.gc-of__jefe-contacto a:hover { color: var(--gc-accent, #826111); }
.gc-of__jefe-contacto i { color: var(--gc-accent, #826111); font-size: .82rem; }

/* --- Ficha lateral --- */
.gc-of__ficha {
  padding: 24px; background: var(--gc-surface, #fff);
  border: 1px solid var(--gc-border, #e9e7e2); border-radius: var(--gc-radius, 18px);
  box-shadow: var(--gc-shadow, 0 18px 40px -34px rgba(23, 27, 38, .5));
}
.gc-of__ficha h3 {
  margin: 0 0 16px; font-family: 'Manrope', system-ui, sans-serif;
  font-size: 1.05rem; font-weight: 800; color: var(--gc-ink, #171b26);
}
.gc-of__dato { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--gc-border, #e9e7e2); }
.gc-of__dato:last-of-type { border-bottom: 0; }
.gc-of__dato-ic {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 193, 7, .16); color: var(--gc-accent, #826111); font-size: .85rem;
}
.gc-of__dato-k { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--gc-muted, #6b7280); }
.gc-of__dato-v { display: block; margin-top: 2px; color: var(--gc-ink, #171b26); font-size: .92rem; line-height: 1.5; word-break: break-word; }
.gc-of__dato-v a { color: inherit; text-decoration: none; }
.gc-of__dato-v a:hover { color: var(--gc-accent, #826111); }

.gc-of__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 16px; padding: 12px 20px; border-radius: 999px;
  background: var(--gc-gold, #ffc107); color: var(--gc-ink, #171b26);
  font-family: 'Manrope', system-ui, sans-serif; font-size: .9rem; font-weight: 800;
  text-decoration: none; transition: transform .18s ease, box-shadow .18s ease;
}
.gc-of__btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .55); color: var(--gc-ink, #171b26); }

.gc-of__cta { padding: 24px; text-align: center; background: var(--gc-ink, #171b26); border-radius: var(--gc-radius, 18px); }
.gc-of__cta-ic {
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: rgba(255, 193, 7, .16); color: var(--gc-gold, #ffc107); font-size: 1.1rem;
}
.gc-of__cta h4 { margin: 12px 0 4px; font-family: 'Manrope', system-ui, sans-serif; font-size: 1rem; font-weight: 800; color: #fff; }
.gc-of__cta p { margin: 0 0 14px; color: #9ba8ba; font-size: .88rem; line-height: 1.55; }
.gc-of__cta-btn {
  display: inline-block; padding: 10px 24px; border-radius: 999px;
  background: var(--gc-gold, #ffc107); color: var(--gc-ink, #171b26);
  font-family: 'Manrope', system-ui, sans-serif; font-size: .88rem; font-weight: 800; text-decoration: none;
}

/* --- Slug inexistente --- */
.gc-of__vacio { max-width: 520px; margin: 0 auto; text-align: center; padding: 40px 20px; }
.gc-of__vacio-ic {
  width: 72px; height: 72px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: rgba(255, 193, 7, .16); color: var(--gc-accent, #826111); font-size: 1.8rem;
}
.gc-of__vacio h2 { margin: 16px 0 8px; font-family: 'Manrope', system-ui, sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--gc-ink, #171b26); }
.gc-of__vacio p { color: var(--gc-muted, #6b7280); }
.gc-of__vacio .gc-of__btn { width: auto; padding-inline: 26px; }

@media (max-width: 991.98px) {
  .gc-of__grid { grid-template-columns: 1fr; }
  .gc-of__aside { position: static; }
  .gc-of__hero { height: 240px; }
}
