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

:root {
  --bg-color: #f9f9f9;
  --text-color: #333333;
  --accent-color: #4ecdc4;
  --accent-hover: #3cbdb3;
  --border-color: #ddd;
  --note-bg-color: #e0f7f5;
  --note-border-color: #4ecdc4;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
}

/* INDEX.PHP STYLES */
.portada-container {
  width: 100%;
  height: 360px;
  max-height: 480px;
  margin: 0 auto;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

.portada-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.contenido-central {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 1rem;
  max-width: 480px;
  text-align: center;
}

.logo-index {
  max-width: 352px;
  margin-bottom: 0.8rem;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
  max-width: 360px;
}

#ingredient-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  min-height: 75px;
  align-items: flex-start;
  overflow-y: auto;
}

#ingredient-input {
  border: none;
  flex: 1 1 120px;
  min-width: 80px;
  padding: 0.6rem;
  font-size: 1rem;
  outline: none;
  word-break: break-word;
  max-width: 100%;
}

.tag {
  background-color: var(--accent-color);
  color: white;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  word-break: break-word;
}

.tag span {
  margin-left: 8px;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
}

/* BOTONES GENERALES */
/* BOTONES GENERALES */
button,
.boton-guardar,
.volver-inicio a {
  padding: 1rem 1rem;
  font-size: 1.1rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease;
  display: inline-block;
  text-decoration: none;
}
.volver-inicio a {
  padding: 1 rem 1rem;
  font-size: 1.1rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease;
  display: inline-block;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  max-width: 300px;
}

button:hover,
.boton-guardar:hover, 
.volver-inicio a:hover {
  background-color: var(--accent-hover);
}

/* FOOTER */
footer,
footer.pie {
  font-size: 0.85rem;
  color: #777;
  text-align: center;
  padding: 2rem 1rem 1rem;
}

footer.pie {
  margin-top: 2rem;
  padding-bottom: 3rem;
}

footer a,
footer.pie a {
  color: #777;
  text-decoration: underline;
}

/* RECIPE + LOADING SHARED STYLES */
header {
  padding: 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  background: var(--bg-color);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  height: 48px;
}

main {
  padding: 1rem;
}

article.recipe {
  max-width: 720px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

h2 {
  color: var(--text-color);
  margin: 2rem 0 0.5rem;
}

.detalles li,
.ingredientes li,
.pasos li {
  margin-bottom: 0.5rem;
}

.ingredientes {
  list-style: none;
  padding-left: 0;
}

.pasos {
  padding-left: 1.2rem;
}


/* GUARDAR RECETA */
.guardar-receta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.guardar-receta form {
  display: inline-block;
}

/* VOLVER */
.volver-inicio {
  text-align: center;
  margin-top: 2rem;
}

/* ALERTAS */
.alerta {
  padding: 1rem;
  margin: 1rem auto;
  border-radius: 8px;
  max-width: 680px;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  opacity: 1;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.alerta.exito {
  background-color: #e6f7e4;
  color: #2c662d;
  border: 1px solid #a4d4a2;
}

.alerta.error {
  background-color: #ffe6e6;
  color: #8a1f1f;
  border: 1px solid #e09c9c;
}

.alerta.info {
  background-color: #e6f0ff;
  color: #1e4a8a;
  border: 1px solid #8db4ff;
}

/* LOGOUT */
.logout-box {
display: flex;
  justify-content: flex-end; /* Alinea a la derecha */
  padding-right: 1rem;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

.logout-link {
  color: #3dd1c4;
  text-decoration: none;
  background-color: #f0f0f0;
  padding: 1px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
}

.logout-link:hover {
  background-color: #e0e0e0;
  text-decoration: none;
}
@media (min-width: 480px) {
  .logout-box {
    margin-top: 0;
  }
}
/* MIS RECETAS */
.lista-recetas {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.receta-item {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.receta-titulo {
  font-family: 'Roboto', sans-serif;
  font-size: 1.2rem;
  color: #333;
  margin: 0 0 0.5rem;
  text-decoration: none;
}

.receta-titulo:hover {
  text-decoration: underline;
}

.receta-controles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  margin-top: 0.5rem;
}

.btn-eliminar {
     background-color: #ffe6e6;
      color: #b00;
      border: 1px solid #f5c2c2;
      padding: 0.2rem 0.5rem;
      font-size: 0.75rem;
      border-radius: 999px;
      cursor: pointer;
      white-space: nowrap;
      font-weight: 500;
      max-width: fit-content;
}

.btn-eliminar:hover {
  background-color: #fdd;
}

.btn-share {
  background-color: #e0f0ff;
  border: 1px solid #a8d0f0;
  color: #0a5ca5;
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
}

.btn-share:hover {
  background-color: #cce5ff;
}

/* LINK A FAVORITOS */
.enlace-favoritos {
  color: #1dc2b4;
  text-align: left;
  margin-top: 1rem;
  margin-bottom: -0.5rem; /* para acercarlo más al contenido si deseas */
  flex-direction: column;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  font-family: 'Roboto', sans-serif;
  display: block;
  margin-top: 1rem;
  
}

.enlace-favoritos a {
  color: var(--text-color);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.enlace-favoritos a:hover {
  text-decoration: underline;
}
.ver-recetas {
  text-decoration: none; /* Quita subrayado */
  font-weight: bold;     /* Negrita */
  font-size: 1.1rem;     /* Más grande que el normal */
}
.boton-volver {
  display: block;
  margin: 1rem auto 1rem;
  padding: 1rem 1rem;
  background-color: var(--accent-color, #4ecdc4);
  color: white;
  text-align: center;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  max-width: 300px;
  border-radius: 999px;
}

.btn-eliminar {
  white-space: nowrap;
  font-weight: 500;
  max-width: 100px;
}

.mis-recetas {
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  font-family: 'Roboto', sans-serif;
  display: block;
  text-align: right;
  margin-top: 1rem;
}
.share-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  text-align: center;
}

.share-box p {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.share-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.share-icons a img {
  width: 36px;
  height: 36px;
  transition: transform 0.2s ease;
}

.share-icons a img:hover {
  transform: scale(1.1);
}

.guardar-receta-login {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.texto-favorito {
  font-weight: bold;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
}

#google-login {
  position: absolute;
  top: 0rem;       /* separación desde el borde superior */
  left: 1rem;      /* alineado a la izquierda */
  z-index: 10;     /* asegúrate que esté encima de la imagen */
  
}
/* LINK A FAVORITOS */
.header.encabezado {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  flex-wrap: wrap; /* ← importante para móviles */
}

.logo-container {
  flex: 1 1 auto;
}

/* Espaciado y estilo suave para notas */
.notas {
  background-color: var(--note-bg-color);
  border-left: 4px solid var(--note-border-color);
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.nutricion {
  background-color: #f2f2f2; /* gris claro */
  border-left: 4px solid var(--note-border-color);
  padding: 1rem 1.2rem;
  border-radius: 6px;
  font-size: 0.92rem;
  max-width: 320px;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.nutricion li {
  margin-bottom: 0.4rem;
  padding-left: 0;
  list-style: none;
}

.zona-funcional {
  margin-top: 2rem;
  text-align: center;
}

.share-box {
  margin-top: 2rem;
}

.share-icons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 0.5rem;
}

.share-icons img {
  width: 32px;
  height: 32px;
}

