:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --gray: #f7f5f0;
  --accent: #888888;
  --transition: all 0.5s cubic-bezier(0, 0.92, 0.86, 1.01);
  --primary: #8d897a;
  --secondary: #cdc8b9;
  --dark: #5b5b57;
}

@font-face {
  font-family: "Arial Narrow";
  src: url("/assets/ArialNarrow.woff2") format("woff2");
  font-display: swap;
}

/* @font-face {
  font-family: "Fette Engschrift";
  src: url("/assets/FetteEngschrift.woff2") format("woff2"),
    url("/assets/FetteEngschrift.woff")format("woff"),
    url("/assets/FetteEngschrift.ttf")format("truetype");
  font-display: swap;
} */

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

body {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1em;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  text-wrap: balance;
  font-weight: normal;
}

/* --- HEADER --- */
header {
  padding: 80px 40px 20px 40px;
  text-align: center;
  height: auto; /* Valor por defecto, asegura que crezca con el contenido */
  min-height: fit-content;
  overflow: hidden; /* Ayuda a contener elementos flotados internamente */
}

a {
  text-decoration: none;
  color: var(--secondary);
  font-weight: bold;
}

a:hover {
  color: black;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2em;
  font-family: "Oswald", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  /* font-family: "Fette Engschrift", Arial, sans-serif; */
  letter-spacing: -0.02em;
  color: var(--primary);
}
h2 {
  font-size: 1rem;
  line-height: 1em;
  color: var(--secondary);
}

.TitPpal {
  font-family: "Inter", sans-serif;
  font-size: 2.5rem;
  font-weight: 200;
  line-height: 2.5rem;
  padding: 1.5rem 0;
}

.SubtitPpal {
  letter-spacing: 1.3px;
  font-size: 0.62rem;
  font-weight: bold;
  margin: -15px 0 20px 0;
  padding-left: 5px;
}

.Ciudades {
  margin: 0;
  letter-spacing: 5px;
  font-family: "Fette Engschrift", Arial, sans-serif;
  font-size: 1rem;
  font-weight: bold;
  padding-top: 100px;
}

p {
}

/* --- MENÚ OVERLAY --- */
.menu-btn {
  position: fixed;
  top: 30px;
  right: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
  color: #000;
  /* Negro para contrastar con fondo blanco, o mix-blend-mode */
  mix-blend-mode: difference;
  color: #fff;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffffe9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay a {
  font-family: "Inter", sans-serif;
  font-size: 3rem;
  margin: 25px 0;
  color: #000;
  font-weight: 200;
}

/* CAROUSEL */

section#CarouselGrupoFleider {
  width: 100vw;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  position: relative;
}

/* Estilos para cuando el dispositivo está en horizontal */
@media screen and (orientation: landscape) {
  section#CarouselGrupoFleider {
    aspect-ratio: 3 / 2;
  }
}

#CarouselGrupoFleider .carousel,
#CarouselGrupoFleider .carousel-inner,
#CarouselGrupoFleider .carousel-item {
  width: 100%;
  height: 100%;
}

#CarouselGrupoFleider picture,
#CarouselGrupoFleider picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(0.998);
  transition: transform 6s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

#CarouselGrupoFleider .carousel-caption {
  left: 0;
  right: auto;
  bottom: 0;
  padding: 20px 20px 10px 20px;
  text-align: left;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}

#CarouselGrupoFleider .carousel-caption h5,
#CarouselGrupoFleider .carousel-caption p {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  color: var(--secondary);
}

.carousel-control-prev {
  min-width: 50px;
  left: 0px;
  color: #ffffff86;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0.5;
}
.carousel-control-next {
  min-width: 50px;
  right: 0px;
  color: #ffffff86;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  opacity: 0.5;
}

/* --- 4. ABOUT --- */
#About {
  padding: 0;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-img {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 0 40px 0;
}

.about-img img {
  width: 100%;
  height: auto;
}

.about-text {
  flex: 1;
  padding: 40px;
  min-width: 300px;
  font-size: 1.1rem;
  text-align: center;
}

/* --- 5. NEWSLETTER --- */
#Newsletter {
  background: #f4f4f4;
  padding: 80px 20px;
  text-align: center;
}

.news-form {
  margin-top: 30px;
  display: inline-flex;
  width: 100%;
  max-width: 500px;
  border-bottom: 1px solid #000;
}

.news-form input {
  flex: 1;
  padding: 15px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
}

.news-form button {
  padding: 15px 30px;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: bold;
  text-transform: uppercase;
}

.news-form button:hover {
  background: var(--primary);
  color: #fff;
}

/* --- 6. CONTACT --- */
#Contact {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.input-group {
  margin-bottom: 20px;
}

.input-group input,
.input-group textarea {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  padding: 15px;
  border: 1px solid #ccc;
  outline: none;
}

.input-group button {
  max-width: 600px;
  margin: 0 auto;
  background: #000;
  color: #fff;
  padding: 15px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  width: 100%;
}
.input-group button:hover {
  background: var(--primary);
  color: #fff;
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: 0;
  filter: grayscale(100%);
}

/* --- 7. RRSS --- */
#Social {
  padding: 50px 0;
  text-align: center;
}

.social-icons a {
  font-size: 1.5rem;
  margin: 0 15px;
  color: #000;
}

/* --- 8. FOOTER --- */

.main-footer {
  font-family: Arial, sans-serif;
  color: #888; /* Gris típico del diseño */
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.footer-divider {
  border: 0;
  border-top: 1px solid #000;
  margin: 20px auto;
  max-width: 600px;
}

.project-view {
  /* background: var(--dark); */
}

/* --- MASONRY GRID (Principal) --- */
.masonry-container {
  padding: 0 30px 30px;
  margin: 0 auto;
}

.masonry-grid {
  /* column-gap: 20px; */
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  justify-content: center;
}

.item {
  display: block;
  break-inside: avoid;
  margin-bottom: 20px;
  background: var(--gray);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.item img {
  display: block;
  transition: var(--transition);
  filter: grayscale(75%);
}

.item:hover img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.item2 {
  display: block;
  break-inside: avoid;
  margin-bottom: 20px;
  background: var(--gray);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.item2 img {
  display: block;
  transition: var(--transition);
  filter: grayscale(75%);
}

.item2:hover img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

/*  CSS REsponsive por tamaños*/

@media (min-width: 1201px) {
  .item img {
    height: 20vh;
  }
  .item2 img {
    height: 50vh;
  }
}
@media (max-width: 1200px) {
  .item img {
    height: 10vh;
  }
  .item2 img {
    height: 40vh;
  }
}
@media (max-width: 750px) {
  .item img {
    width: 70vw;
    height: auto;
  }
  .item2 img {
    width: 70vw;
    height: auto;
  }
}

/* --- FICHA TÉCNICA (Template de Proyecto) --- */
.project-info-container {
  margin: 80px auto;
  padding: 0 40px;
}

.project-main-title {
  font-weight: 200;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 40px;

  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.specs {
  /* background-color: #f7f5f0; */
  padding: 10px;
  text-align: center;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.spec-item {
  /* font-size: 0.75rem; */
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #333;
}

.spec-item strong {
  color: var(--accent);
  font-weight: 600;
  margin-right: 5px;
}

/* Contenedor de Logos asociados a Arquitectos */
.architect-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.logos-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin-top: 5px;
  justify-content: space-around;
}

.partner-logo {
  height: 1.4em;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.partner-logo:hover {
  opacity: 1;
}

.project-long-description {
  line-height: 1;
  color: var(--text);
  /* font-size: 0.95rem; */
  margin-bottom: 40px;
}

/* --- BOTÓN PDF --- */
.pdf-download-btn {
  display: flex;
  align-items: center;
  padding: 15px 30px;
  background: #000;
  color: #fff;
  text-decoration: none;
  /* font-size: 0.7rem; */
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: background 0.3s;
}

.pdf-download-btn:hover {
  background: #333;
  color: #fff;
}

/* --- GALERÍA DEL PROYECTO (Masonry Interno) --- */
.project-gallery-masonry {
  column-gap: 20px;
  padding: 0 40px 80px;
  margin: 0 auto;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  display: block;
}

/* --- ZOOM OVERLAY (GSAP & DRAGGABLE) --- */
.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  display: none; /* Se activa por JS */
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stage-zoom {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.8);
}

#modal-img {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  user-select: none;
}

/* Botones de navegación y cierre en Zoom */
.close-zoom {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 11000;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0.5;
  padding: 36px;
}

.close-zoom:hover {
  opacity: 1;
}

.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10500;
  padding: 20px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.nav-btn:hover {
  opacity: 1;
}
.nav-btn.prev {
  left: 0px;
  color: #ffffff86;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0.2;
}
.nav-btn.next {
  right: 0px;
  color: #ffffff86;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  opacity: 0.2;
}

.nav-btn:hover {
  opacity: 0.7;
}

/* Enlace de volver */
.back-link {
  position: fixed;
  top: 30px;
  left: 40px;
  text-decoration: none;
  color: var(--bg);
  /* font-size: 0.7rem; */

  z-index: 1000;
  background-color: #888888b5;
  padding: 10px 15px;
  vertical-align: middle;
}

/* CSS Tags*/

/* Estilos para los botones de filtrado (basados en el estilo PDF) */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  justify-content: center;
}

.tag-button {
  padding: 8px 16px;
  border: 1px solid #333; /* Ajustar según tu color de borde PDF */
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tag-button:hover {
  background-color: #f0f0f0;
}

/* Estado cuando el filtro está activado */
.tag-button.active {
  background-color: #333; /* Color sólido para indicar activo */
  color: #fff;
}

/* Botón especial 'Todos' */
.tag-button.btn-all {
  font-weight: bold;
  border-double: 3px;
}

/* Clase para ocultar proyectos que no coincidan */
.project-card.hidden {
  display: none !important;
}

/* Stats Numbers Section*/

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 250px;
}

.circle-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 20px;
}

.circle-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.circle-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 12;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
}

.stat-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  font-weight: 700;
  color: #000000;
  line-height: 1;
}

.stat-text {
  font-size: 16px;
  color: #666666;
  line-height: 1.4;
  max-width: 200px;
}

/* Responsive */
@media (max-width: 400px) {
  .stats-container {
    flex-direction: column;
    gap: 50px;
  }

  .stat-item {
    width: 100%;
  }

  .circle-container {
    width: 160px;
    height: 160px;
  }

  .stat-number {
    font-size: 36px;
  }

  .stat-text {
    font-size: 15px;
  }
}
