﻿/* ==== BASE ==== */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #fff;
  overflow-x: hidden;
}

h2 { 
  font-weight: 600; 
  color: var(--text); 
}

h2{
  position: relative;
  display: inline-block;
}
h2::after{
  content:"";
  display:block;
  width:64px;
  height:3px;
  background: var(--brand);
  margin-top:10px;
  border-radius:999px;
}

 
  
  /* ==== HERO ==== */
  .hero {
    position: relative;
    overflow: hidden;
    height: 60vh;
    background: image-set(
      url('../img/optimized/panoramica/panoramicadormitorio-900.jpg') 1x,
      url('../img/optimized/panoramica/panoramicadormitorio-1600.jpg') 2x
    ) center / cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 10%;
    color: var(--text);
    margin-top: var(--header-height);
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.24));
    pointer-events: none;
  }
  
  .hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
  }
  
  .hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #fff;
  }
  
  .hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
  }
  
  /* ==== SECCIONES ==== */
  .section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 8%;
    gap: 60px;
    flex-wrap: wrap;
    background: #fff;
  }
  
  .section.reverse {
    flex-direction: row-reverse;
    background: white;
  }
  
  .section .text {
    flex: 1 1 400px;
  }
  
  .section .text h2 {
    font-size: 2rem;
    margin-bottom: 15px;
  }
  
  .section .text p {
    color: #555;
    line-height: 1.6;
  }
  
  .section .image {
    flex: 1 1 400px;
  }
  
  .section .image img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  }
  
  /* ==== GALERÍA ==== */
  .galeria {
    padding: 100px 8%;
    text-align: center;
    background: #f7f7f7;
  }
  
  .galeria h2 {
    font-size: 2rem;
    margin-bottom: 40px;
  }
  
  .grid-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .grid-galeria img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.4s ease;
  }
  
  .grid-galeria img:hover {
    transform: scale(1.05);
  }
  
/* ==== FOOTER ==== */
.footer {
  text-align: center;
  padding: 40px 20px;
  background: #333;
  font-size: 0.95rem;
  color: #f5f5f5;
}
  
  /* ==== RESPONSIVE ==== */
  @media (max-width: 768px) {
    .section {
      flex-direction: column;
      padding: 60px 6%;
    }
  
    .hero h1 {
      font-size: 2.2rem;
    }
  
    .hero {
      height: auto;
      padding: 120px 6% 60px;
    }
  }

  /* ==== SCROLL REVEAL ==== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

  /* --- HERO BLANCO Y CONTRASTE ENTRE SECCIONES --- */
.hero {
  background: image-set(
    url('../img/optimized/panoramica/panoramicadormitorio-900.jpg') 1x,
    url('../img/optimized/panoramica/panoramicadormitorio-1600.jpg') 2x
  ) center / cover no-repeat !important;
  color: #fff;
  padding: 140px 10% 100px;         /* espacio suficiente bajo header */
}

/* sección siguiente (contraste gris claro) */
.espacios {
  background: #f7f7f7;              /* gris claro para notar el cambio */
  padding: 80px 8%;
}

/* alterna fondos automáticamente si quieres mantener el contraste en todo */
section:nth-of-type(odd){
  background: #ffffff;
}
section:nth-of-type(even){
  background: #f7f7f7;
}

/* evita que el header tape el inicio al hacer anchor links */
:root { --header-height: 80px; }
section { scroll-margin-top: calc(var(--header-height) + 20px); }
  
