:root {
  --primary: #3a6ea5;
  --texto: #7E8287;
  --span: #ffffff;
  --fuente-principal: 'Lustria', sans-serif;
}

body {
  font-family: var(--fuente-principal);
  margin: 0;
  background-color: #fafafa;
  line-height: 1.6;
}

/* HEADER */
header {
  position: relative;
  height: 100vh;
  /*background: linear-gradient(to right, rgb(0 0 0 / .3), rgb(0 0 0 / .1)), url(../img/almirez.JPG) center/cover no-repeat;*/
  background: linear-gradient(to right, rgba(255,255,255,0.2), rgba(255,255,255,0.1)), url(../img/almirez.JPG) center/cover no-repeat;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

header.header-cocina {
  background: linear-gradient(to right, rgb(0 0 0 / .1), rgb(0 0 0 / .1)),url(../img/recetas/bravioli.jpg) center/cover no-repeat;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 0;
}

header h1, header p {
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.5rem;
  max-width: 700px;
}

.header_logo span {
  color: #ffffff;
}

/* NAVEGACIÓN */
nav {
  display: flex;
  flex-direction: column;
  background: black;
  position: fixed;
  top: 0;
  right: 0;
  width: 200px;
  height: 100vh;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 15;
}

nav a {
  display: block;
  padding: 0.6rem;
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  font-size: 1.1rem;
  transition: border-bottom 0.3s;
  border-bottom: 3px solid transparent;
}

nav a.active {
  border-bottom: 2px solid #ffffff;
}

nav a:hover {
  border-bottom: 2px solid #ffffff;
}

/* HAMBURGUESA */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  top: 20px;
  right: 20px;
  width: 25px;
  height: 22px;
  cursor: pointer;
  z-index: 20;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

nav.open {
  transform: translateX(0);
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* SECCIONES */
section {
  padding: 2rem;
  max-width: 1000px;
  margin: 2rem auto;
  background-color: #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  text-align: center;
  border-radius: 16px;
  transition: transform 0.3s, box-shadow 0.3s;
}

section:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.25);
}

h2 {
  color: #2b3a67;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.5rem;
  margin-top: 0;
  font-size: 2rem;
}

.about__texto{ 
  font-size: 1.1rem; 
  color: var(--texto);
 }

/* SOBRE MÍ */
.sobre-mi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.sobre-mi img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.sobre-mi p { 
  flex: 1; 
  /*font-size: 1.2rem; 
  text-align: center;*/
}

/* TEMAS */
.temas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tema {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s;
}

.tema img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 0.5rem;
}

.tema:hover { transform: scale(1.03); }

.tema h3 { color: #3a6ea5; font-size: 1.6rem; }

.btn-entrar {
  background-color: white;
  color: #3a6ea5;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 10px;
  transition: transform 0.2s;
  text-transform: uppercase;
  transition-property: background-color;
  transition-duration: .3s;
}

.btn-entrar:hover { 
  transform: scale(1.05); 
  background-color: #2e5984; 
  color: white;
}

/* ENTRADAS BLOG */
.entradas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.post {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 100%; 
  transition: transform 0.2s;
}

.post:hover { transform: scale(1.03); }

.post img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 0.5rem;
}

.post small { color: #777; }

.post h3 { color: #3a6ea5; margin-top: 0.5rem; }

/*.post button {
  background-color: #3a6ea5;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

.post button:hover { background-color: #2e5984; transform: scale(1.05); }*/

.modelo__enlace {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    border-radius: 8px;
    color: var(--primary); 
    font-size: 0.9rem;
    /*transition-property: background-color;
    transition-duration: .3s;*/
    text-decoration: none;
    margin-top: auto;
    margin-bottom: 0.5rem;
    align-self: center;
    transition: all 0.3s ease;
}

.modelo__enlace:hover {
    background-color: var(--primary);
    color: white;
    transform: scale(1.05);
} 

/* ÚLTIMA ENTRADA */
.entrada {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background-color: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.entrada img {
  width: 100%;
  max-width: 350px;
  height: 200px;
  border-radius: 16px;
  flex-shrink: 0;
}

.entrada div { flex: 1; text-align: left; }

.entrada button {
  background-color: #3a6ea5;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

.entrada button:hover { background-color: #2e5984; transform: scale(1.05); }

.entrada small { 
  color: #777; 
}

.entrada h3 { 
  color: #3a6ea5; 
  margin-top: 0.5rem; 
}

/* FORMULARIO */
form {
  background-color: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

form label { font-weight: 400; text-align: left; }

form input, form textarea {
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

form textarea { resize: vertical; height: 120px; }

form button {
  background-color: #3a6ea5;
  color: white;
  border: none;
  padding: 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

form button:hover { background-color: #2e5984; transform: scale(1.05); }

/* FOOTER */
footer {
  text-align: center;
  background-color: #3a6ea5;
  color: white;
  padding: 1rem;
  margin-top: 2rem;
}

/* Estilos foros */
.foros-container {
  display: grid;
  /*grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));*/
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  /*justify-items: stretch;
  align-items: stretch;*/
}

.forum-post {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.forum-post img {
  width: 100%;
  border-radius: 10px;
}
.forum-post button {
  margin-top: auto;
  padding: 0.5rem 1rem;
  border: none;
  background-color: #007BFF;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}
.forum-post button:hover {
  background-color: #0056b3;
}

.filtros {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}


/* MISMO tamaño real */
.filtros input,
.filtros select {
  width: 260px;              /* 👈 mismo ancho */
  height: 44px;              /* 👈 misma altura */
  padding: 0 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}  

/* COCINA*/
header .header_texto {
  font-size: 1.6rem;
}

.forum-post .producto__imagen {
  width: 100%;        /* 👈 ocupa el ancho de la tarjeta */
  height: 180px;      /* altura fija para todas */
  object-fit: cover;  /* recorta sin deformar */
  border-radius: 10px;
}

.forum-post .producto__nombre {
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1.2;
    color: var(--primary);
}

.producto__texto{
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.9rem;
    color: #7E8287;
    text-align: left;
}

.producto__fecha {
    font-size: 0.9rem;
    color: var(--primary);
}

/* DETALLE RECETA */
.titulo-receta {
  text-align: center;
}

.receta-detalle {
  max-width: 800px;
  margin: 2rem auto;
  text-align: left;
}

.receta-imagen {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 16px;
  margin: 1rem 0;
}

.receta-bloque {
  margin-top: 2rem;
}

.receta-bloque h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.receta-bloque ul,
.receta-bloque ol {
  padding-left: 1.5rem;
  color: var(--texto);
  line-height: 1.8;
}

.header-receta {
  height: 45vh;  
  min-height: 280px;
}

.entrada__titulo {
    font-weight: 400;
    font-size: 1.8rem;
    margin: 10px 0;
    line-height: 1.2;
    color: var(--primary);
}

.entrada__texto{
    display: -webkit-box;
    overflow: hidden;
    font-size: 1.0rem;
    color: #7E8287;
    margin-top: 3px;
}

.entrada__titulo--ingredientes, .entrada__titulo--preparacion{
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--primary);
    margin-bottom: 4px;
}

.entrada__ingredientes{
    font-size: 1.0rem;
    color: #7E8287;
}

.entrada__pasos{
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 3px;
}

/* PAGINACIÓN */
.paginacion {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.paginacion button {
  cursor: pointer;
  background: transparent;
}

/* Botones compactos */
.paginacion .modelo__enlace {
  padding: 6px 12px;
  min-width: 40px;
  text-align: center;
  margin: 0;
  font-size: 0.9rem;
}

/* Página activa */
.paginacion .modelo__enlace.activa {
  background-color: var(--primary);
  color: white;
  pointer-events: none;
  transform: none;
}

/* EN CONSTRUCCIÓN */
.construccion {
  display: none; /* Oculto por defecto */
  margin-top: 10px;
  padding: 0.5rem;
  background-color: #ffeaa7; /* color de alerta suave */
  color: #2d3436;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  font-size: 0.95rem;
}

.forum-post {
  display: none;
}

.enlace-receta {
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;

}

.enlace-receta:hover {
  color: var(--primary);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header { 
    height: 70vh; 
    padding: 2rem 1rem; 
  }
  
  header h1 { 
    font-size: 2.4rem; 
  }
  
  header p { 
    font-size: 1.1rem; 
  }
  
  .sobre-mi {
    flex-direction: column;
    text-align: center;
  }

  .sobre-mi img {
    width: 300px;
    height: 300px;
  }
  
  .temas, .entradas { 
    grid-template-columns: 1fr; 
  }
  
  .entrada { 
    flex-direction: column; 
    text-align: center; 
  }
  
  .entrada div { 
    text-align: center; 
  }
  
  nav {
    width: 200px; 
  }

  .menu-toggle {
    display: flex;
  }
  
  .filtros {
    flex-direction: column;
    align-items: stretch;
  }

  .filtros input,
  .filtros select {
    width: 100%;
  }

  
  .titulo-receta {
    font-size: 1.6rem;
  } 
  
  .entrada__titulo{
    font-size: 1.4rem;
  }
  
  .foros-container {
    grid-template-columns: 1fr;
  }

  .paginacion {
    gap: 8px;
  }

  /* Ocultamos números intermedios si hay muchos */
  /*.paginacion .modelo__enlace:not(.activa):not(:first-child):not(:last-child) {
    display: none;
  }*/

  .paginacion .modelo__enlace {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  .construccion {
    font-size: 0.9rem;
    padding: 0.4rem;
  }

}

@media (min-width: 769px) {

  header {
    height: 100vh;
    padding: 3rem 2rem;
  }

  header h1 {
    font-size: 3rem;
  }

  header p {
    font-size: 1.4rem;
  }

  /* Sobre mí */
  .sobre-mi {
    flex-direction: row;
    text-align: left;
  }

  .sobre-mi img {
    width: 300px;
    height: 300px;
  }

  /* Grids */
  .temas,
  .entradas {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  /* Última entrada */
  .entrada {
    flex-direction: row;
    text-align: left;
  }

  .entrada div {
    text-align: left;
  }

  /* Navegación escritorio */
  nav {
    position: absolute;
    top: 20px;
    right: 40px;
    height: auto;
    width: auto;
    background: transparent;
    flex-direction: row;
    transform: translateX(0);
  }

  nav a {
    margin-left: 20px;
    color: white;
  }

  .menu-toggle {
    display: none;
  }
}
