/*
ruta/yamboly/css/yamb.css v.1.0.2
Corrección: Bloque lateral sin fondo ni padding, solo estructura funcional.
*/

:root {
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: 0.3px;
  --gap-total: 4%;
  --lateral-ancho: 460px;
  --max-contenedor: 1400px;
}

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

body {
  background-color: #68E1FB;
  background-image: url('/imgs/playa.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  line-height: 1.5;
  color: #000;
  position: relative;
}

/* Overlay de fondo blanco 40% */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.40);
  z-index: 0;
  pointer-events: none;
}

/* Contenido sobre el overlay */
.contenedor-principal,
.pie-pagina {
  position: relative;
  z-index: 10;
}

.contenedor-principal {
  width: 97%;
  max-width: var(--max-contenedor);
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--gap-total);
  padding: 1rem 0;
}

/* === MAIN === */
.bloque-main {
  flex: 1 1 auto;
  min-width: 0;
}

.logo-centrado {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo-centrado img {
  max-width: 100%;
  height: auto;
}

.galeria-fotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.item-galeria {
  text-align: center;
}

.foto-helado {
  width: 100%;
  height: auto;
  max-width: 260px;
  border-radius: 4px;
  display: block;
}

/* === LATERAL === */
.bloque-lateral {
  flex: 0 0 var(--lateral-ancho);
  align-self: flex-start;
  position: sticky;
  top: 1rem;
  min-width: var(--lateral-ancho);
  /* Sin background, sin padding, sin bordes */
}

.placeholder-lateral {
  font-size: 1rem;
  color: #333;
}

/* === FOOTER === */
.pie-pagina {
  text-align: center;
  padding: 1.5rem 0 1rem;
  font-weight: bold;
  font-size: 1.1rem;
  color: #004d66;
}

/* === RESPONSIVE: MOBILE-FIRST === */
@media (max-width: 1024px) {
  .contenedor-principal {
    flex-direction: column;
    flex-wrap: wrap;
    width: 98%;
    gap: 1.5rem;
  }

  .bloque-main {
    flex: 1 1 100%;
  }

  .bloque-lateral {
    flex: 0 0 auto;
    position: static;
    width: 100%;
    min-width: auto;
  }

  .galeria-fotos {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Mejora de PageSpeed: evitar layout shift */
img[loading="lazy"],
.video-contenedor iframe[loading="lazy"] {
  background: #e0f7ff;
}