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

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #fff0f5;
  color: #333;
  line-height: 1.6;
}

/* ===================
   HEADER
=================== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffc1e3;
  padding: 1rem 2rem;
  border-bottom: 2px solid #f8bbd0;
  position: relative;
  flex-wrap: wrap;
}

header img {
  height: 50px;
}

header h1 {
  font-size: 2.5rem;
  color: #ad1457;
  flex: 1;
  text-align: center;
}

/* NAVIGATION */
header nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

header nav a {
  text-decoration: none;
  color: #880e4f;
  font-weight: bold;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: #c2185b;
}

/* BOTÓN HAMBURGUESA */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #880e4f;
  border-radius: 3px;
}

/* ===================
   BUSCADOR
=================== */
.buscador {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  flex-wrap: wrap;
  border-bottom: 2px solid #f8bbd0;
}

.buscador input {
  padding: 0.7rem 1rem;
  width: 280px;
  border: 2px solid #f8bbd0;
  border-radius: 25px;
  outline: none;
}

.buscador button {
  padding: 0.7rem 1.5rem;
  background-color: #f06292;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.buscador button:hover {
  background-color: #ec407a;
}

/* ===================
   CATEGORÍAS
=================== */
.categorias {
  padding: 0 2rem 2rem;
}

.categorias h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #ad1457;
}

.lista-categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.lista-categorias button {
  padding: 0.5rem 1.2rem;
  background-color: #f8bbd0;
  border: none;
  border-radius: 20px;
  color: #880e4f;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 0.95rem;
}

.lista-categorias button:hover {
  background-color: #f48fb1;
}

/* ===================
   RECETAS
=================== */
.ultimas {
  padding: 0 2rem 3rem;
}

.ultimas h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #ad1457;
}

.recetas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.card:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0,2) inset;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card h3 {
  font-size: 1.2rem;
  color: #c2185b;
  margin: 1rem;
}

.card p {
  font-size: 0.95rem;
  color: #555;
  margin: 0 1rem 1rem;
}

/* ===================
   FOOTER
=================== */
footer {
  text-align: center;
  background-color: #ffc1e3;
  color: #880e4f;
  padding: 1rem;
  font-size: 0.9rem;
  border-top: 2px solid #f8bbd0;
}

/* ===================
   RESPONSIVE
=================== */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  header nav ul {
    flex-direction: column;
    display: none;
    padding-top: 1rem;
  }

  header nav ul.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }
}

.lista-categorias button.activo {
  background-color: var(--rosado-oscuro);
  font-weight: bold;
}
