/* =========================================================
   ESTUDIO BERMAN - Estilos
   ========================================================= */
/* ---------- Tipografía (Poppins, servida desde el propio sitio: docs/fonts/) ----------
   font-display: swap muestra el texto enseguida con la letra de respaldo y cambia cuando Poppins llega.
   "Poppins Fallback" es Arial ajustada a las medidas de Poppins, así el texto casi no se mueve al cambiar. */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica'), local('Liberation Sans');
  size-adjust: 112.35%;
  ascent-override: 93.46%;
  descent-override: 31.15%;
  line-gap-override: 8.9%;
}

/* ---------- Variables (cambiás la paleta acá) ---------- */
:root {
  --marca: #177abc;
  /* color exacto del logo: para detalles (barras, líneas, íconos) */
  --grad-logo: linear-gradient(90deg, #1b84cc, #145f96);
  /* encabezado de "Nosotros" */
  --teal-900: #0e2740;
  /* fondos oscuros y footer */
  --teal-700: #174f82;
  /* botones oscuros, títulos */
  --teal-500: #1b6aa8;
  /* botón principal del hero */
  --teal-100: #e8f1f9;
  --tinta: #152233;
  --gris: #556579;
  --fondo: #f3f6f9;
  --linea: #dbe3ec;
  --blanco: #ffffff;
  --ancho: 1200px;
  --alto-header: 80px;
  --fuente: 'Poppins', 'Poppins Fallback', 'Segoe UI', Arial, sans-serif;
}

/* ---------- Variables (cambiás la paleta acá) ---------- */
/* :root {
 root: viejo
  --grad-logo: linear-gradient(90deg, #46bbc1, #517c82);
  --teal-900: #0f3d4e;     fondos oscuros y footer
  --teal-700: #17566b;     botones oscuros, títulos
  --teal-500: #1f7186;     botón principal del hero
  --teal-100: #e6eff8;
  --tinta: #1d2b33;
  --gris: #5c6b74;
  --fondo: #f5f8fa;
  --linea: #dfe7eb;
  --blanco: #ffffff;
  --ancho: 1200px;
  --alto-header: 80px;
  --fuente: 'Poppins', 'Segoe UI', Arial, sans-serif;
} */

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--alto-header);
}

body {
  font-family: var(--fuente);
  color: var(--tinta);
  line-height: 1.6;
  background: var(--blanco);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 3px;
}

/* ---------- Íconos ---------- */
.icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--lg {
  width: 42px;
  height: 42px;
  stroke-width: 1.3;
  color: var(--teal-700);
}

/* ---------- Utilidades ---------- */
.contenedor {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 5%;
}

.rotulo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--teal-700);
  margin-bottom: .8rem;
}

.rotulo::before {
  content: '';
  width: 24px;
  height: 3px;
  background: var(--teal-500);
}

.rotulo--claro {
  color: #bed5e8;
}

.rotulo--claro::before {
  background: #6fb3c4;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.5rem;
  border-radius: 50px;
  border: 2px solid transparent;
  font-size: .9rem;
  font-weight: 600;
  transition: transform .2s, background .3s, color .3s, border-color .3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--teal {
  background: var(--teal-500);
  color: #fff;
}

.btn--teal:hover {
  background: var(--teal-700);
}

.btn--oscuro {
  background: var(--teal-700);
  color: #fff;
}

.btn--oscuro:hover {
  background: var(--teal-900);
}

.btn--borde {
  border-color: var(--teal-700);
  color: var(--teal-700);
  background: transparent;
}

.btn--borde:hover {
  background: var(--teal-700);
  color: #fff;
}

.btn--borde-claro {
  border-color: #8fc0cd;
  color: #fff;
  background: transparent;
}

.btn--borde-claro:hover {
  background: #fff;
  color: var(--teal-900);
}

.link-flecha {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--teal-700);
}

.link-flecha:hover .icon {
  transform: translateX(4px);
}

.link-flecha .icon {
  transition: transform .2s;
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--alto-header);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 0 5%;
  background: var(--blanco);
  transition: box-shadow .3s;
}

.header.con-sombra {
  box-shadow: 0 2px 12px rgba(15, 40, 70, .12);
}

.logo img {
  height: 58px;
  width: auto;
}

.nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: .4rem 0;
  font-size: .85rem;
  font-weight: 500;
  color: var(--tinta);
  transition: color .3s;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--teal-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}

.nav a:hover {
  color: var(--teal-500);
}

.nav a:hover::after,
.nav a.activo::after {
  transform: scaleX(1);
}

.nav a.activo {
  color: var(--teal-700);
}

.nav-contacto {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.8rem;
  color: var(--tinta);
  width: 44px;
  height: 44px;
  line-height: 1;
}

/* Menú del inicio: transparente sobre la portada, blanco al bajar (main.js agrega "con-sombra") */
.header--hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  transition: background .3s, box-shadow .3s;
}

.header--hero.con-sombra {
  background: var(--blanco);
  box-shadow: 0 2px 12px rgba(15, 40, 70, .12);
}

.header--hero:not(.con-sombra) .menu-toggle {
  color: #fff;
}

@media (min-width: 1101px) {

  .header--hero:not(.con-sombra) .nav a,
  .header--hero:not(.con-sombra) .nav a.activo {
    color: #fff;
  }

  .header--hero:not(.con-sombra) .nav a::after {
    background: #fff;
  }
}

/* =========================================================
   HERO / SLIDER (portada a pantalla completa)
   Sin overflow:hidden: lo necesita el "sticky" del texto. El recorte lo hace clip-path.
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  /* en celulares descuenta la barra del navegador */
  display: flex;
  align-items: center;
  padding: calc(var(--alto-header) + 20px) 5% 20px;
  /* los 20px: separación botón/franja (main.js la lee) */
  color: #fff;
  background: var(--teal-900);
  clip-path: inset(0);
  /* recorta la imagen fija al tamaño de la portada */
}

/* La imagen NO se mueve al hacer scroll: la página sube por encima */
.slides {
  position: fixed;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background: var(--teal-900) center/cover no-repeat;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.activa {
  opacity: 1;
}

/* Capa oscura: más fuerte a la izquierda para que se lea el texto */
.slides::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 28, 48, .78) 0%, rgba(10, 28, 48, .35) 50%, rgba(10, 28, 48, .05) 100%);
}

/* Sombra suave arriba para que se lea el menú sobre cualquier foto */
.slides::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 28, 48, .6), rgba(10, 28, 48, 0));
}

/* Para cuando pongas un video de portada */
.slides video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* El texto se frena bajo el menú (lo hace el navegador); main.js solo lo desvanece */
.hero-contenido {
  position: sticky;
  top: calc(var(--alto-header) + 16px);
  z-index: 2;
  max-width: 520px;
}

.hero-marca {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  margin-bottom: .6rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.08;
  font-weight: 600;
}

.hero-linea {
  display: block;
  width: 60px;
  height: 3px;
  background: #7fc0d1;
  margin: 1.4rem 0;
}

.hero-texto {
  font-size: 1.1rem;
  max-width: 380px;
  margin-bottom: 1.8rem;
}

/* Puntitos del slider, centrados abajo */
.hero-controles {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 1.4rem;
  display: flex;
  justify-content: center;
}

.hero-dots {
  display: flex;
  gap: .45rem;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .5);
  transition: width .3s, background .3s;
}

.hero-dots button.activo {
  width: 22px;
  border-radius: 8px;
  background: #fff;
}

/* =========================================================
   FRANJA DE CATEGORÍAS
   ========================================================= */
.categorias {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--fondo);
  padding: 2rem 5%;
}

.cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  padding: .5rem 1rem;
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  color: var(--teal-700);
  border-left: 1px solid var(--linea);
  transition: transform .3s;
}

.cat:first-child {
  border-left: 0;
}

.cat:hover {
  transform: translateY(-4px);
}

/* =========================================================
   OBRAS DESTACADAS (y listados de obras / novedades)
   ========================================================= */
.obras {
  padding: 4rem 0;
}

.obras-cabecera {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.titulo {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--teal-700);
  position: relative;
  padding-top: 1rem;
}

.titulo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 3px;
  background: var(--teal-500);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.4rem;
}

/* Hueco reservado mientras js/obras-lista.js dibuja las tarjetas: así la página no salta cuando aparecen */
#lista-obras:has(> noscript:only-child) {
  min-height: 70vh;
}

#obras-destacadas:has(> noscript:only-child) {
  min-height: 280px;
}

.obra-card {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}

.obra-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(15, 40, 70, .16);
}

.obra-card a {
  display: block;
  height: 100%;
}

.obra-card.filtrada {
  display: none;
}

.obra-img {
  position: relative;
  aspect-ratio: 3 / 2;
  /* proporción fija: la tarjeta ocupa su lugar antes de que llegue la foto y la página no salta */
  overflow: hidden;
  background: var(--teal-100);
}

.obra-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.obra-card:hover .obra-img img {
  transform: scale(1.06);
}

.tag {
  position: absolute;
  left: .8rem;
  bottom: .8rem;
  padding: .15rem .8rem;
  border-radius: 20px;
  background: #fff;
  color: var(--teal-700);
  font-size: .72rem;
  font-weight: 600;
}

/* Etiquetas de la tarjeta de obra: categoría y "UT" juntas, abajo a la izquierda de la foto */
.obra-img .obra-etiquetas {
  position: absolute;
  top: auto;
  right: auto;
  left: .8rem;
  bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.obra-img .obra-etiquetas .tag {
  position: static;
}

.obra-img .obra-etiquetas .tag-ut {
  position: static;
  display: block;
  width: auto;
  height: auto;
  padding: .15rem .8rem;
  border-radius: 20px;
  background: #fff;
  color: var(--teal-700);
  font-size: .72rem;
  font-weight: 600;
}

.obra-cuerpo {
  padding: 1rem 1rem 1.1rem;
}

.obra-cuerpo h3 {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 1rem;
  min-height: 2.6em;
}

.obra-lugar {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  color: var(--gris);
}

.obra-flecha {
  margin-left: auto;
  color: var(--teal-700);
  transition: transform .2s;
}

.obra-card:hover .obra-flecha {
  transform: translateX(4px);
}

/* Indicador de obra en ejecución */
/* Punto de estado de la obra (esquina de la tarjeta): naranja = iniciando, verde = en ejecución, azul = terminada */
.punto,
.en-curso {
  position: absolute;
  top: .8rem;
  left: .8rem;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.punto--inicio {
  background: linear-gradient(90deg, #f59e2c, #fbc66a);
}

.punto--terminado {
  background: linear-gradient(90deg, #2f7fd0, #78b6ee);
}

.punto--obra,
.en-curso {
  background: linear-gradient(90deg, #89d957, #c9e265);
  animation: titilar 2s ease-in-out infinite;
  /* solo el verde titila: indica trabajo en curso */
}

.punto--inline,
.en-curso--inline {
  position: static;
  flex-shrink: 0;
}

@keyframes titilar {

  0%,
  100% {
    filter: brightness(1);
    box-shadow: 0 0 0 0 rgba(201, 226, 101, 0);
  }

  50% {
    filter: brightness(1.18);
    box-shadow: 0 0 4px 1px rgba(201, 226, 101, .45);
  }
}

/* =========================================================
   NOSOTROS
   ========================================================= */
.nosotros {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  align-items: center;
  background: var(--fondo);
}

.nosotros-img {
  height: 100%;
  min-height: 300px;
  background: var(--teal-100);
}

.nosotros-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nosotros-texto {
  padding: 3rem 3rem;
}

.nosotros-texto h2 {
  font-size: 1.6rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--teal-700);
  margin-bottom: 1rem;
}

.nosotros-texto p:not(.rotulo) {
  font-size: .88rem;
  color: var(--gris);
  margin-bottom: 1.4rem;
}

.datos {
  margin: 2rem 5% 2rem 0;
  padding: 1.2rem 1.6rem;
  background: #eef3f8;
  border-radius: 6px;
}

.datos li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  font-size: .85rem;
  line-height: 1.4;
}

.datos li+li {
  border-top: 1px solid var(--linea);
}

.datos .icon--lg {
  width: 34px;
  height: 34px;
}

.datos strong {
  display: block;
  font-weight: 600;
}

.datos strong:only-child {
  display: inline;
}

/* =========================================================
   FRANJA OSCURA (trayectoria + trabajos)
   ========================================================= */
.franja {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 5%;
  background: var(--teal-900);
  color: #fff;
}

.franja h2 {
  font-size: 1.7rem;
  line-height: 1.25;
  font-weight: 600;
  margin-bottom: .8rem;
}

.franja-historia p:not(.rotulo) {
  font-size: .82rem;
  color: #cfe0ee;
  margin-bottom: 1.4rem;
}

.linea-tiempo {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: .5rem;
}

.linea-tiempo::before {
  /* la línea horizontal */
  content: '';
  position: absolute;
  top: 1.75rem;
  left: 4px;
  right: 4px;
  height: 2px;
  background: #4a86b5;
}

.linea-tiempo li {
  position: relative;
  flex: 1;
  padding-right: .6rem;
  font-size: .72rem;
  color: #b8cfe3;
}

.linea-tiempo li::before {
  /* el punto de cada año */
  content: '';
  position: absolute;
  top: 1.5rem;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
}

.linea-tiempo b {
  display: block;
  font-size: .95rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1.6rem;
}

.franja-trabajos {
  border-left: 1px solid #1d5f93;
  padding-left: 2.5rem;
}

.franja-trabajos h2 {
  font-size: 1.3rem;
}

.sectores {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  margin-top: 1.6rem;
}

.sectores li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  text-align: center;
}

.sectores .icon--lg {
  color: #fff;
  width: 34px;
  height: 34px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--teal-900);
  color: #d6e4f0;
  padding: 1.8rem 5% 1rem;
  font-size: .75rem;
}

.footer-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-marca {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.footer-marca img {
  height: 44px;
  width: auto
}

/*.footer-marca img { height: 52px; width: 52px; border-radius: 50%; object-fit: cover; } */
/* .footer-marca strong { display: block; color: #fff; font-size: .95rem; }*/
.footer-nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.footer-nav a,
.footer-datos a {
  transition: color .2s;
}

.footer-nav a:hover,
.footer-datos a:hover {
  color: #fff;
}

.footer-datos {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-datos span {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.footer-datos a .icon {
  width: 20px;
  height: 20px;
}

.footer-pie {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid #1d5f93;
  font-size: .68rem;
  color: #9db9d3;
}

/* ---------- Formulario (para contacto.html) ---------- */
.form {
  display: grid;
  gap: 1rem;
  max-width: 600px;
}

.form input,
.form textarea {
  padding: .9rem;
  border: 1px solid #c9d5db;
  border-radius: 4px;
  font: inherit;
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-msg {
  font-weight: 600;
}

/* ---------- Animación de aparición al hacer scroll (la maneja main.js) ---------- */
.oculto {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s, transform .6s;
}

.oculto.visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   PÁGINAS INTERNAS (obras, novedades, etc.)
   ========================================================= */
.page-hero {
  background: var(--teal-900);
  color: #fff;
  padding: 3.5rem 0;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
}

.page-hero p:not(.migas) {
  max-width: 560px;
  margin-top: .8rem;
  color: #cfe0ee;
}

.migas {
  font-size: .78rem;
  color: #9db9d3;
  margin-bottom: 1rem;
}

.migas a:hover {
  color: #fff;
}

/* Filtros */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1.8rem;
}

.filtro {
  padding: .45rem 1.2rem;
  border-radius: 50px;
  border: 1.5px solid var(--linea);
  background: #fff;
  color: var(--teal-700);
  font-size: .82rem;
  font-weight: 600;
  transition: background .3s, color .3s, border-color .3s;
}

.filtro:hover {
  border-color: var(--teal-500);
}

.filtro.activo {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: #fff;
}

/* Banda final con llamado a contactar */
.cta-banda {
  background: var(--fondo);
  padding: 3.5rem 0;
  text-align: center;
}

.cta-banda h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--teal-700);
  margin-bottom: .5rem;
}

.cta-banda p {
  color: var(--gris);
  margin-bottom: 1.5rem;
}

/* Video de YouTube incrustado (obras y novedades) */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 2rem 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--teal-900);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--teal-900);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: #fff;
    box-shadow: 0 8px 16px rgba(15, 40, 70, .12);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s;
  }

  .nav.abierto {
    max-height: 420px;
  }

  .nav a {
    padding: 1rem 5%;
    border-top: 1px solid var(--linea);
  }

  .nav a::after {
    display: none;
  }

  .nav-contacto {
    display: block;
  }

  .nosotros {
    grid-template-columns: 1fr 1fr;
  }

  .datos {
    grid-column: 1 / -1;
    margin: 0 5% 2rem;
  }

  .franja {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .franja-trabajos {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid #1d5f93;
    padding-top: 2rem;
  }
}

@media (max-width: 760px) {
  .categorias {
    grid-template-columns: 1fr 1fr;
    row-gap: 1.5rem;
  }

  .cat:nth-child(3) {
    border-left: 0;
  }

  .obras-cabecera {
    flex-direction: column;
    align-items: flex-start;
  }

  .nosotros {
    grid-template-columns: 1fr;
  }

  .nosotros-img {
    min-height: 220px;
  }

  .nosotros-texto {
    padding: 2rem 5%;
  }

  /* Línea de tiempo vertical en celular */
  .linea-tiempo {
    flex-direction: column;
    gap: 0;
    padding-left: 1.6rem;
  }

  .linea-tiempo::before {
    display: none;
  }

  /* se apaga la línea horizontal */
  .linea-tiempo li {
    flex: none;
    padding: 0 0 1.4rem;
    font-size: .85rem;
  }

  .linea-tiempo li:last-child {
    padding-bottom: 0;
  }

  .linea-tiempo li::before {
    top: .35rem;
    left: -1.6rem;
    z-index: 1;
  }

  /* el punto de cada año */
  .linea-tiempo li:not(:last-child)::after {
    /* tramo de línea hasta el siguiente punto */
    content: '';
    position: absolute;
    z-index: 0;
    top: calc(.35rem + 4.5px);
    left: calc(-1.6rem + 3.5px);
    width: 2px;
    height: 100%;
    background: #4a86b5;
  }

  .linea-tiempo b {
    margin-bottom: .15rem;
    font-size: 1.05rem;
  }

  .sectores {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.8rem 0;
  }

  .sectores li {
    flex: 0 0 33.333%;
  }

  /* Pie de página en celular: se apila y se centra. Los enlaces van de a 3 por fila, igual que los sectores de arriba */
  .footer-fila,
  .footer-pie {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-nav {
    width: 100%;
    justify-content: center;
    gap: 1rem 0;
  }

  .footer-nav a {
    flex: 0 0 33.333%;
    text-align: center;
  }

  .footer-datos {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-datos span {
    flex: 0 0 100%;
    justify-content: center;
  }

  .hero-controles {
    bottom: 1rem;
  }
}

/* Respeta a quienes tienen desactivadas las animaciones en su sistema */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }

  .oculto {
    opacity: 1;
    transform: none;
  }

  .punto--obra,
  .en-curso {
    animation: none;
  }
}

/* Encabezado de página con foto de fondo (se usa con la clase page-hero--img)
   Mismo efecto que la portada del inicio: la foto queda quieta, la página sube por encima
   y el texto se desvanece (lo hace main.js). Sin overflow:hidden por el "sticky"; recorta clip-path.
   main.js ajusta --arriba-hero y --alto-hero para que la foto calce justo con la franja. */
.page-hero--img {
  position: relative;
  min-height: clamp(320px, 46vh, 460px);
  display: flex;
  align-items: flex-end;
  padding: 3.5rem 0;
  clip-path: inset(0);
}

.page-hero--img .contenedor {
  position: sticky;
  top: calc(var(--alto-header) + 16px);
  /* el texto se frena bajo el menú (main.js lo desvanece) */
  z-index: 2;
  width: 100%;
}

.hero-fondo {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--arriba-hero, 0px);
  height: var(--alto-hero, clamp(320px, 46vh, 460px));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-fondo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 28, 48, .9) 0%, rgba(10, 28, 48, .65) 55%, rgba(10, 28, 48, .4) 100%);
}

.page-hero--img .migas {
  color: #d6e4f0;
}

.page-hero--img h1 {
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

/* Menú transparente sobre la franja (clase header--hero en el <header>): se deja lugar para que no tape el texto */
.header--hero~main .page-hero {
  padding-top: calc(var(--alto-header) + 2rem);
}

.header--hero~main .hero-fondo::before {
  /* sombra suave arriba para que se lea el menú */
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 160px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 28, 48, .6), rgba(10, 28, 48, 0));
}

/* Filtros de obras: dos filas (categoría y tipo) */
.filtros-bloque {
  margin-bottom: 1.2rem;
}

.filtros-bloque .filtros {
  margin-bottom: .8rem;
}

.filtros-rotulo {
  align-self: center;
  margin-right: .3rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gris);
}

.sin-resultados {
  padding: 2rem 0;
  text-align: center;
  color: var(--gris);
}

@media (max-width: 600px) {
  .filtros-rotulo {
    flex-basis: 100%;
  }
}

/* Botones de filtro con puntito de color (filtro de estado) */
.filtro .punto {
  display: inline-block;
  flex-shrink: 0;
  transform: translateY(4px);
}

/* Da contraste al color azul y naranja para que no se pierdan y se vean mas en fondos de su mismo color */
.obra-img .punto--inicio,
.obra-img .punto--terminado {
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

/* resaltado en obras */
.resaltado {
  background-color: rgba(23, 122, 188, 0.18);
  color: #123c4c;
  padding: 2px 5px;
  border-radius: 3px;
}

.logo img {
  height: 46px;
}

/* ---------- Barra de filtros de Obras: desplegable + controles segmentados ---------- */
.barra-filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.6rem;
  margin-bottom: 1rem;
}

.campo-filtro {
  display: grid;
  gap: .35rem;
}

.campo-filtro .filtros-rotulo {
  margin: 0;
}

.filtro-select {
  min-width: 15rem;
  padding: .6rem 2.4rem .6rem 1rem;
  border: 1.5px solid var(--linea);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2330585a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 14px;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--teal-700);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .3s;
}

.filtro-select:hover {
  border-color: var(--teal-500);
}

.segmentado {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 1.5px solid var(--linea);
  border-radius: 8px;
  background: #fff;
}

.segmentado .filtro {
  padding: .4rem .9rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.segmentado .filtro:hover {
  background: var(--teal-100);
}

.segmentado .filtro.activo {
  background: var(--teal-700);
  color: #fff;
}

.resultados-filtro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  min-height: 2rem;
  margin-bottom: 1.4rem;
}

.contador-obras {
  margin: 0;
  font-size: .85rem;
  font-weight: 700;
  color: var(--tinta);
}

.filtros-activos {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.etiqueta-filtro {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .8rem;
  border: 0;
  border-radius: 50px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s, color .3s;
}

.etiqueta-filtro:hover {
  background: var(--teal-700);
  color: #fff;
}

.etiqueta-filtro .punto {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
}

.borrar-filtros {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gris);
  font-size: .8rem;
  text-decoration: underline;
  cursor: pointer;
}

.borrar-filtros:hover {
  color: var(--teal-700);
}

@media (max-width: 600px) {

  .campo-filtro,
  .filtro-select {
    width: 100%;
  }

  .segmentado {
    display: flex;
  }

  .segmentado .filtro {
    flex: 1 1 auto;
    justify-content: center;
    padding: .4rem .5rem;
  }

  .desplegable {
    width: 100%;
  }
}

/* Videos verticales (tipo Reels / Shorts): una fila de tarjetas 9:16 */
.videos-verticales {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  padding-bottom: .5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.video--vertical {
  flex: 0 0 min(250px, 68vw);
  aspect-ratio: 9 / 16;
  margin: 0;
  scroll-snap-align: start;
}

/* =========================================================
   DESCARGA DEL CATÁLOGO DE OBRAS
   ========================================================= */

.page-hero--img {
  position: relative;
}

.obras-descarga {
  position: absolute;
  z-index: 3;
  right: 3.5%;
  bottom: 2rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;

  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;

  transition: opacity 0.25s ease;
}

.obras-descarga-texto {
  display: inline-block;
}

.obras-descarga-icono {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;

  transition: transform 0.25s ease;
}

.obras-descarga:hover {
  opacity: 0.85;
}

.obras-descarga:hover .obras-descarga-icono {
  transform: translateY(2px);
}

.obras-descarga:hover {
  opacity: 0.85;
}

.obras-descarga:hover .obras-descarga-icono {
  transform: translateY(3px);
}

.obras-descarga:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
  border-radius: 4px;
}

/* Adaptación para tabletas y celulares */
@media (max-width: 760px) {
  .obras-descarga {
    right: 5%;
    bottom: 1.25rem;
    left: 5%;

    justify-content: flex-start;
    gap: 0.8rem;

    font-size: 0.9rem;
  }

  .obras-descarga-icono {
    width: 30px;
    height: 30px;
  }

  .page-hero--img {
    padding-bottom: 5rem;
  }
}

/* Celulares pequeños */
@media (max-width: 380px) {
  .obras-descarga {
    font-size: 0.82rem;
  }

  .obras-descarga-icono {
    width: 27px;
    height: 27px;
  }
}

/* Respeta las preferencias de movimiento del usuario */
@media (prefers-reduced-motion: reduce) {

  .obras-descarga,
  .obras-descarga-icono {
    transition: none;
  }
}

/* =========================================================
   PÁGINA 404 (404.html)
   ========================================================= */
.page-hero .error-codigo {
  margin-bottom: .2rem;
  font-size: clamp(4.5rem, 16vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: rgba(255, 255, 255, .2);
}

.page-hero--404 .btn {
  margin-top: 1.4rem;
}

.error-accesos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  padding: 3.5rem 0;
}

.error-acceso {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.5rem;
  border: 1px solid var(--linea);
  border-radius: 6px;
  background: var(--blanco);
  color: var(--tinta);
  transition: transform .3s, box-shadow .3s;
}

.error-acceso strong {
  font-weight: 600;
  color: var(--teal-700);
}

.error-acceso span {
  font-size: .88rem;
  color: var(--gris);
}

.error-acceso:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 40, 70, .16);
}

/* =========================================================
   CORAZÓN DE FAVORITO (js/favoritos.js)
   No favorita: corazón blanco al 75 % (igual que el botón de compartir) · favorita: corazón rosa macizo.
   Va arriba a la derecha de la foto en las tarjetas, y a la izquierda
   del botón de compartir en la ficha de la obra.
   ========================================================= */
.fav-btn {
  --fav-gris: rgba(255, 255, 255, .75);   /* igual que el círculo del botón de compartir */
  --fav-rosa: #ff56d5;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  /* sombra suave para que el corazón se lea también sobre fotos claras u oscuras */
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .22));   /* sombra parecida a la del botón de compartir */
  transition: transform .2s ease;
}

/* Corazón macizo de un solo color: gris si no es favorita, rosa si lo es */
.fav-btn .icon {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--fav-gris);
  stroke: none;
}

.fav-btn:not([aria-pressed="true"]):hover .icon,
.fav-btn:not([aria-pressed="true"]):focus-visible .icon {
  fill: #fff;   /* como el botón de compartir: al pasar el cursor pasa a blanco sólido */
}

.fav-btn[aria-pressed="true"] .icon {
  fill: var(--fav-rosa);
}

.fav-btn:hover {
  transform: scale(1.12);
}

.fav-btn:active {
  transform: scale(.94);
}

.fav-btn:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 50%;
}

/* En la tarjeta: arriba a la derecha de la foto (fuera del enlace, así no abre la obra) */
.obra-card {
  position: relative;
}

.fav-btn--tarjeta {
  position: absolute;
  top: .2rem;
  right: .2rem;
  z-index: 3;
  width: 40px;
  height: 40px;
  padding: 8px 7px;
}

/* En la ficha: a la izquierda del botón de compartir (usa las mismas medidas que .obra-compartir-boton) */
.fav-btn--ficha {
  position: absolute;
  right: 56px;
  bottom: calc(var(--sube) + var(--aire));
  width: 44px;
  height: 44px;
}

@media (prefers-reduced-motion: reduce) {
  .fav-btn {
    transition: none;
  }

  .fav-btn:hover,
  .fav-btn:active {
    transform: none;
  }
}

/* ---------- Desplegable de Estado (obras.html): lista con el puntito de color de cada estado ---------- */
.desplegable {
  position: relative;
  min-width: 15rem;
}

.desplegable-boton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  width: 100%;
  padding: .6rem 1rem;
  border: 1.5px solid var(--linea);
  border-radius: 8px;
  background: #fff;
  font-size: .82rem;
  font-weight: 600;
  color: var(--teal-700);
  text-align: left;
  transition: border-color .3s, box-shadow .3s;
}

.desplegable-boton:hover,
.desplegable.abierto .desplegable-boton {
  border-color: var(--teal-500);
}

.desplegable.abierto .desplegable-boton {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(23, 80, 130, .12);
}

.desplegable-valor {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.desplegable-flecha {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
  transition: transform .25s;
}

.desplegable.abierto .desplegable-flecha {
  transform: rotate(180deg);
}

.desplegable-lista {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1.5px solid var(--linea);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(14, 39, 64, .16);
}

/* "display" pisa al atributo hidden: sin esta regla la lista quedaría siempre abierta */
.desplegable-lista[hidden] {
  display: none;
}

.desplegable-lista:not([hidden]) {
  animation: desplegar .15s ease-out;
}

@keyframes desplegar {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Cada opción reutiliza la clase .filtro (así la maneja main.js), pero con aspecto de fila de lista */
.desplegable-opcion.filtro {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  padding: .6rem .8rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--teal-700);
  text-align: left;
}

.desplegable-opcion.filtro:hover,
.desplegable-opcion.filtro:focus-visible {
  background: var(--teal-100);
}

.desplegable-opcion.filtro:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: -2px;
}

.desplegable-opcion.filtro.activo {
  background: var(--teal-100);
  color: var(--teal-700);
}

.desplegable-texto {
  flex: 1;
}

.desplegable-check {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
  visibility: hidden;
}

.desplegable-opcion.activo .desplegable-check {
  visibility: visible;
}

/* Los puntos acá van alineados con el texto (sin el desplazamiento que usaban en los botones) */
.desplegable .punto {
  display: inline-block;
  transform: none;
}

.desplegable .punto--inicio,
.desplegable .punto--terminado {
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

@media (prefers-reduced-motion: reduce) {

  .desplegable-lista:not([hidden]),
  .desplegable-flecha {
    animation: none;
    transition: none;
  }
}

/* ---------- Botón flotante de WhatsApp ----------
   Lo crea js/main.js solo si config/sitio.json tiene un número en "whatsapp". El visor de fotos (<dialog>) queda por encima. */
.whatsapp-flotante {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 3.5rem;
  min-height: 3.5rem;
  padding: 0.75rem;
  border-radius: 999px;
  background: #0f7a6b;               /* contraste 5,2:1 con el texto blanco */
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-flotante svg { width: 1.75rem; height: 1.75rem; flex: none; }
.whatsapp-flotante span { display: none; }
.whatsapp-flotante:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.whatsapp-flotante:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px #0f7a6b; }
@media (min-width: 761px) {
  .whatsapp-flotante { padding: 0.75rem 1.25rem; }
  .whatsapp-flotante span { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .whatsapp-flotante { transition: none; } .whatsapp-flotante:hover { transform: none; } }
@media print { .whatsapp-flotante { display: none; } }

/* =========================================================
   ESTUDIO BERMAN - logo (dos versiones) y portada con fotos
   ========================================================= */
.logo img { height: 52px; width: auto; }
.logo .logo-sobre-foto { display: none; }
.header--hero:not(.con-sombra) .logo .logo-sobre-foto { display: block; }
.header--hero:not(.con-sombra) .logo .logo-sobre-blanco { display: none; }
@media (max-width: 760px) { .logo img { height: 44px; } }
.footer-marca img { height: 48px; width: auto; }

/* =========================================================
   LISTADO DE OBRAS: tarjetas horizontales (foto a la izquierda, texto a la derecha)
   Solo en obras.html (#lista-obras). En el inicio y en "obras relacionadas" siguen las tarjetas de siempre.
   ========================================================= */
.obra-extracto-cat,
.obra-extracto,
.obra-ver { display: none; }

#lista-obras { grid-template-columns: 1fr; gap: 1.4rem; }
@media (min-width: 900px) { #lista-obras { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; } }

#lista-obras .obra-card a { display: flex; flex-direction: column; }
@media (min-width: 560px) {
  #lista-obras .obra-card a { flex-direction: row; align-items: stretch; }
  #lista-obras .obra-img { flex: 0 0 44%; aspect-ratio: auto; min-height: 220px; }
}
#lista-obras .obra-img .obra-etiquetas { display: none; }
#lista-obras .obra-cuerpo { flex: 1; min-width: 0; padding: 1.3rem 1.4rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
#lista-obras .obra-extracto-cat { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--marca); }
#lista-obras .obra-cuerpo h3 { font-size: 1.15rem; line-height: 1.3; margin: 0; min-height: 0; padding-right: 2.2rem; }
#lista-obras .obra-lugar { margin-top: .1rem; }
#lista-obras .obra-flecha { display: none; }
#lista-obras .obra-extracto { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: .35rem; font-size: .86rem; line-height: 1.55; color: var(--gris); }
#lista-obras .obra-ver { display: inline-flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: .6rem; font-size: .86rem; font-weight: 600; color: var(--marca); }
#lista-obras .obra-ver .icon { width: 16px; height: 16px; transition: transform .2s; }
#lista-obras .obra-card:hover .obra-ver .icon { transform: translateX(4px); }
#lista-obras .obra-card:hover { transform: translateY(-4px); }
@media (min-width: 560px) {
  #lista-obras .fav-btn--tarjeta { color: var(--gris); }
}
#lista-obras .fav-btn { --fav-gris: #cfdae6; filter: none; }
#lista-obras .fav-btn:not([aria-pressed="true"]):hover .icon,
#lista-obras .fav-btn:not([aria-pressed="true"]):focus-visible .icon { fill: #9db9d3; }
@media (max-width: 559px) {
  #lista-obras .fav-btn { --fav-gris: rgba(255, 255, 255, .8); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
}
