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

body {
  font-family: 'Montserrat', sans-serif;
  background: #f5f5f5;
  color: #333;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo img {
  height: 50px;
}

/* NAV */
nav {
  display: flex;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover {
  color: #a67c52;
}

/* HAMBURGER */
.hamburger {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
}

/* HERO */
.hero {
  height: 90vh;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
              url("imagenes/mesa.jpeg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.hero-content h1 {
  font-size: 48px;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 20px;
}

.btn {
  background: #a67c52;
  color: white;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  background: #8c6239;
}

/* SECCIONES */
section {
  padding: 60px 30px;
  text-align: center;
}

h2 {
  margin-bottom: 40px;
  font-size: 32px;
}

/* SERVICIOS */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.servicio {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  transition: 0.3s;
}

.servicio:hover {
  transform: translateY(-5px);
}

/* GALERIA MEJORADA */
.galeria {
  padding: 60px 20px;
  background-color: #f5f2ee;
  text-align: center;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.galeria-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.3s ease;
}

/* HOVER MÁS PRO */
.galeria-grid img:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  filter: brightness(0.95);
}

/* SUBGALERIAS */
.subgaleria {
  margin-top: 40px;
}

.subgaleria h3 {
  text-align: left;
  max-width: 1100px;
  margin: 0 auto 15px auto;
  font-size: 22px;
  color: #5a3e2b;
  
}



.galeria {
  margin-bottom: 50px;
}

.eslogan-madera {
  margin-top: 50px;
}

/* ESLOGAN */
.eslogan-madera {
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
              url("imagenes/rustico.jpeg") center/cover;
  color: white;
  padding: 50px 50px;
}

.eslogan-madera h2 {
  font-size: 36px;
  font-family: Georgia, serif;
}

/* CONTACTO */
.contacto {
  background: white;
}

.info-contacto p {
  margin: 10px 0;
}

.info-contacto a {
  color: #a67c52;
  text-decoration: none;
}

/* FOOTER */
footer {
  background: #222;
  color: white;
  padding: 20px;
  text-align: center;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.show {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .servicios-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 600px) {
  .hamburger {
    display: block;
  }

  nav {
    position: absolute;
    top: 70px;
    right: 0;
    background: white;
    flex-direction: column;
    width: 200px;
    padding: 20px;
    display: none;
  }

  nav.open {
    display: flex;
  }

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

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

  .hero-content h1 {
    font-size: 30px;
  }
}
/* SUBGALERIA CON 5 IMÁGENES MÁS PROLIJA */
.subgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* FUERZA 3 COLUMNAS */
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.subgrid img:nth-child(4) {
  grid-column: 1 / 2;
}

.subgrid img:nth-child(5) {
  grid-column: 3 / 4;
}

/* CENTRAR LAS ÚLTIMAS CUANDO SON IMPARES */
.subgrid img:nth-last-child(2):nth-child(odd),
.subgrid img:nth-last-child(1):nth-child(odd) {
  grid-column: span 1;
}

.subgrid img:last-child:nth-child(odd) {
  grid-column: 2 / 3;
}
