:root {
  --color1: #4c4a42; /* gris oscuro */
  --gris-claro: #e5e5e5;
  --fondo: #f2f2f2;
  --titulos: 35px;
  --subtitulos: 20px;
  --margenes: 60px;
  --espacios: 10px;
  --espacios-contenido: 45px;
  --texto-secundario: #86877b;
  --gradient-start: #6e4f32af;
  --gradient-mid: #a58967a9;
  --gradient-end: #cdc8bc79;
  --radius: 8px;
  --transition: .25s ease;
  --max-width: 1000px;
  --breakpoint-md: 900px;
  --breakpoint-sm: 700px;
  --nav-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', system-ui, sans-serif;
  background: var(--fondo);
  color: #222;
  line-height: 1.4;
}

img {
  vertical-align:top;
  display: block;
  max-width: 100%;
}

/* Preloader */
.hidden {
  overflow: hidden;
}
.centrado {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.lds-facebook,
.lds-facebook div {
  box-sizing: border-box;
}
.lds-facebook {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-facebook div {
  display: inline-block;
  position: absolute;
  left: 8px;
  width: 16px;
  background: currentColor;
  animation: lds-facebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
}
.lds-facebook div:nth-child(1) {
  left: 8px;
  animation-delay: -0.24s;
}
.lds-facebook div:nth-child(2) {
  left: 32px;
  animation-delay: -0.12s;
}
.lds-facebook div:nth-child(3) {
  left: 56px;
  animation-delay: 0s;
}
@keyframes lds-facebook {
  0% {
    top: 8px;
    height: 64px;
  }
  50%, 100% {
    top: 24px;
    height: 32px;
  }
}

/* Header */
header {
  width: 100%;
  min-height: 600px;
  background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-mid), var(--gradient-end)), url('img/fondo2.jpg') center/cover fixed no-repeat;
  position: relative;
}
nav {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 0 0 10px rgba(0,0,0,.3);
  z-index: 10;
  transition: background .3s, color .3s;
}
.nav1 {
  background: rgba(255,255,255,0.9);
  color: #222;
}
.nav2 {
  background: #fff;
  color: #000;
}
.contenedor-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 80px;
  gap: 1rem;
}
.logo img {
  height: 60px;
  display: block;
}
.enlaces ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.enlaces a {
  text-decoration: none;
  font-size: 16px;
  padding: 5px 0;
  position: relative;
  color: inherit;
  transition: color .2s;
}
.enlaces a:hover {
  color: var(--color1);
}
.enlaces a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--color1);
  transition: width .25s;
}
.enlaces a:hover::after,
.enlaces a.active::after {
  width: 100%;
}
.iconos button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Hero text */
.textos {
  width: 100%;
  height: 100%;
  padding-top: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  color: #fff;
}
.textos h1 {
  font-size: 50px;
  margin-bottom: 0;
}
.textos h2 {
  font-size: 32px;
  font-weight: 300;
}

/* Contenedores generales */
.contenedor {
  max-width: var(--max-width);
  width: 90%;
  margin: 0 auto;
  padding: var(--margenes) 0;
  text-align: center;
}

/* Títulos y líneas */
.contenedor h2,
.contenedor h3 {
  font-size: var(--titulos);
  margin-bottom: var(--espacios);
  color: var(--color1);
}
.contenedor p {
  font-size: var(--subtitulos);
  font-weight: 300;
  color: var(--color1);
}
.after {
  position: relative;
}
.after::after {
  content: '';
  display: block;
  width: 100px;
  height: 2px;
  background: var(--color1);
  margin: var(--espacios) auto var(--espacios-contenido);
}

/* Sección servicios con fondo y overlay */
.servicios {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.servicios-section {
  position: relative;
  padding: 2rem 0 4rem;
  background: url('img/arquitectura2.png') center/cover no-repeat;
  overflow: hidden;
}
.servicios-section .overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 35, 0.65);
  backdrop-filter: blur(8px);
  z-index: 0;

}
.contenido-servicios {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.header-servicios {
  position: relative;
  z-index: 2;
}
.header-servicios h2 {
  font-size: 2rem;
  margin-bottom: 4px;
  color: #ffffff; /* ✅ blanco */
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}
.header-servicios .subtitulo {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff; /* ✅ blanco */
  margin-bottom: 8px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.header-servicios .subtitulo::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: #ffffff; /* ✅ blanco */
  margin: 6px auto 0;
  border-radius: 2px;
}
.caja-servicios {
  flex: 1 1 0;
  min-width: 240px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5rem;
  padding: 1rem 1rem 0;
}
.caja-servicios img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: .5rem;
}
.caja-servicios h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff; /* ✅ blanco */
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}
.caja-servicios p {
  margin: 0;
  font-size: .9rem;
  color: #ffffff; /* ✅ blanco */
  line-height: 1.6;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}


/* Footer */
footer {
  position: relative;
  padding: 3rem 0 2rem;
  color: #fff;
}
.footer-bg {
  position: relative;
  background: url('img/arquitectura1.jpg') center/cover no-repeat;
  overflow: hidden;
}
.footer-bg .overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 35, 0.6);
  backdrop-filter: blur(8px);
  z-index: 0;
}
.footer-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.branding {
  display: flex;
  align-items: center;
  gap: .75rem;
  justify-content: center;
}
.logo-footer {
  width: 60px;
  flex: 0 0 auto;
}
.logo-footer img {
  width: 100%;
  display: block;
}
.titulo-footer {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-text {
  font-size: .9rem;
  opacity: .9;
  margin: .5rem 0 0;
}
.red-social {
  margin-top: .5rem;
}
.red-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,.5);
  border-radius: 50%;
  padding: 6px;
  text-decoration: none;
  transition: transform .2s;
}
.red-social a img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(1.2);
}
.red-social a:hover {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1000px) {
  .textos h1 {
    font-size: 56px;
  }
  .textos h2 {
    font-size: 26px;
  }
}

@media (max-width: 900px) {
  .contenedor-nav {
    flex-wrap: wrap;
  }
  .enlaces ul {
    gap: .5rem;
    flex-wrap: wrap;
  }
  .cont-work {
    width: 100%;
  }
  .card {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 700px) {
  .enlaces {
    position: fixed;
    top: 80px;
    left: 0;
    background: #6e4f32;
    width: 0;
    height: 100%;
    overflow: hidden;
    transition: width .3s ease;
    z-index: 20;
    display: flex;
    flex-direction: column;
  }
  .enlaces ul {
    flex-direction: column;
    width: 100%;
  }
  .enlaces a {
    display: block;
    width: 100%;  
    padding: 18px;
    background: transparent !important;
    color: #fff;
    
  }
  .iconos {
    display: block;
  }
  .textos {
    padding-top: 160px;
  }
  .textos h1 {
    font-size: 48px;
  }
  .textos h2 {
    font-size: 24px;
  }
}

/* Botón flotante de WhatsApp */
.btn-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background-color: #25D366;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-whatsapp img {
  width: 35px;
  height: 35px;
}

.btn-whatsapp:hover {
  background-color: #1ebe5d;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

/* -------------------- SECCIÓN GALERÍA -------------------- */
.galeria {
  text-align: center;
  margin: 3rem auto;
}

.galeria h2 {
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--color1);
}

.galeria-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.galeria-item{
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.galeria-link{
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
  width: 100%;
  position: relative;
}

/* Imagen dentro del item */
.galeria-item img{
  width: 100%;
  height: 220px;      /* altura fija */
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease-in-out;
}



.galeria-grid img:hover {
  transform: scale(1.05);
}

/* overlay (oscurecer al hover) */
.galeria-item .overlay{
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}

.galeria-item:hover img{
  transform: scale(1.05);
}
.galeria-item:hover .overlay{
  opacity: 1;
}

/* leyenda dentro de la tarjeta */
.galeria-caption{
  position: absolute;
  left: 16px;
  bottom: 18px;
  z-index: 5;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45);
  max-width: calc(100% - 32px);
}
.galeria-caption h3{ margin: 0 0 6px; font-size: 1.05rem; }
.galeria-caption p{ margin: 0; font-size: .9rem; opacity: .95; }

/* Cuando el nav está fijo, evitamos que el ancla quede debajo */
.proyecto {
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

/* responsive */
@media (max-width: 700px){
  .galeria-item img { height: 180px; }
  .galeria-caption h3 { font-size: 1rem; }
  .galeria-caption p { font-size: .85rem; }
}
