/* Reglas Generales */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

body {
    font-family:"Poppins", sans-serif;
    margin: 0;
    color: #0c494f;
    background-color: white
}

nav{
    margin-inline: auto;
}

/* todos los parrafos */
p {
    line-height: 1.6;
}

p,
li,
figcaption {
    text-wrap: pretty;
}

p:first-child
li:first-child {
    margin-block-start: 0;
}

p :last-child,
li :last-child {
    margin-block-end: 0;
}

 /* todas las imagenes */

img{
  max-width: 100%;
}

figure img{
  display: block;
}



/* ----------
    Header
   ---------- */


header {
  background-color: #0c494f;
  display: flex;
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.25);
  padding: 1em;
  margin-bottom: 2.5em;
  position: sticky;  
  z-index: 80;
}

header .contenedora {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.contenedora figure {
  width: 50%;
}


/* ----
   menu
   ---- */


/* botón "hamburguesa" */

.menu-btn {
  background: hsl(0 0% 100% / 0.25);
  border-radius: 50%;
  box-shadow: -5px 5px 5px hsl(180 100% 4% / 0.2);
  padding: .60rem;
  width: 3rem;
  aspect-ratio: 1;
  cursor: pointer;
  transition: all 0.3s ease-out; /* anima el "hover" */

  /* fijo, no "scrolea", no genera scroll */
  position: relative;
  /* emplazamiento 1 renglón del borde superior */
  
  /* emplazamiento 1 renglón del borde derecho */
  
  /* en capa superior, casi arriba de todo */
  z-index: 90;
}

/* cada barra de la "hamburguesa" */
.menu-btn .btn-linea {
  width: 25px;
  height: 3px;
  margin: 4px 0 4px 0;
  background: hsl(0 0% 90%);
  transition: all 0.3s ease-out;
  /* capa superior, pero no parece */
  position: relative;
  /* capa superior, casi arriba de todo */
  z-index: 9000;
}

/* cada barra, transformación para formar la "X" */
/* Las tres barras para formar la "X" */
.menuVisible .menu-btn .btn-linea:nth-child(1) {
  transform: rotate(45deg) translate(4px, 6px);
}
.menuVisible .menu-btn .btn-linea:nth-child(2) {
  opacity: 0;
}
.menuVisible .menu-btn .btn-linea:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -6px);
}

/* menú propiamente dicho */
nav ul {
  background-color: hsl(210 92% 10% / 95%);
  display: grid;
  place-items: center;
  place-content: center;

  /* sale del fondo, queda fijo */
  position: fixed;
  /* emplazamiento,
  estirado en toda la ventana */
  inset: 0;
  /* escondido "a la derecha" */
  translate: 100%;
  
  transition: all .6s ease; /* anima cuando "nav" NO tiene la clase "menuVisible" */
}

/* el menu cuando "nav" tiene la clase "menuVisible" */
.menuVisible ul {
  background-color: #0c494f;
  transition: all .3s ease; /* anima cuando "nav" tiene la clase "menuVisible" */
  
  /* se muestra "deshaciendo" la transformación */
  translate: 0;
}

/* cada vínculo del menu */
nav ul li a {
  border-bottom: solid 3px hsl(0 0% 100% / 0.1);
  color: white;
  display: block;
  font-size: 1.5rem;
  margin-block-end: .5rem;
  width: min(70vw, 20rem); /* el valor menor entre el 70% del ancho de la ventana del navegador y 320px */
  text-align: center;
  
  padding: .5rem;
  text-decoration: none;
}

nav ul li a:hover {
  border-bottom: solid 3px hsl(0 0% 100% / 0.5);
  transition: all .3s;
}




/* Contenido */

.contenido {
  margin-inline: auto;
  margin-top: 2em;
  margin-bottom: 2em;
}


/* Punto reciclaje */


.punto-reciclaje-container {
  display: flex;
  position: relative;
  margin-inline: auto;
  margin-bottom: 3em;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  max-width: 480px; /* antes era 360px */
  height: 300px; /* ✅ nuevo: fuerza altura mayor */
  background: #f5f5f5;
}


.punto-reciclaje-container h2 {
  position: absolute;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  text-align: center;
  color: #fff;
  font-size: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.punto-reciclaje-container a {
  position: absolute;
  left: .8em;
  top: .8em;
  width: 7em;
  text-align: center;
  background-color: #bdef34d5;
  border-radius: 1em;
  color: #0c494f;
}




/* Cómo reciclo */

.icono-derecha {
  background-color: white;
  color: #0c494f;
  font-weight: 700;
  border-radius: 1em;
  text-transform: uppercase;
  display: inline-block;
  margin-block-start: 1em;
  font-family: 'Poppins', sans-serif;
}

.como-reciclo-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 40px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.materiales-article {
  width: 215px;
  height: 230px;
  border-radius: 20px;
  background-color: #f5f5f5;
  overflow: hidden;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  transition: transform 0.3s ease;
}

.materiales-article img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: 20px 20px 0 0;
}

.materiales-texto {
  background: white;
  padding: 12px 8px 12px;
  font-weight: 700;
  font-size: 1.1rem;
  background-color: #f5f5f5; /* vuelve el fondo gris claro */
  border-radius: 0 0 20px 20px;
}

.artist-card:hover,
.artist-card:focus {
  transform: translateY(-4px);
}



/* Noticias */

.noticias-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.noticias-article {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  max-width: 480px; /* antes era 360px */
  height: 300px; /* ✅ nuevo: fuerza altura mayor */
  background: #f5f5f5;
}

.noticias-article img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}