/* ========================================================
   1. FUENTES
======================================================== */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

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

/* ========================================================
   3. ESTILOS GENERALES DEL BODY
======================================================== */
body {
  font-family: 'Oswald', sans-serif;
  background: linear-gradient(to bottom right, #F4F1ED, #E7F3E5);
  color: #333;
  min-height: 100vh;
}

/* ========================================================
   4. HEADER
======================================================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  max-width: 960px;
  margin: 0 auto;
}

.logo img {
  width: 150px;
}

.container_banderas {
  display: flex;
  gap: 10px;
}

.bandera {
  width: 24px;
  cursor: pointer;
}

/* ========================================================
   5. MENÚ DE NAVEGACIÓN
========================================================  */

.menu {
  font-family: 'Oswald', sans-serif;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column; /* Si usas menú móvil, si no quitar */
}

.menu-toggle {
  display: none; /* Mostrar solo en móvil si implementas */
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-items {
  list-style: none;
  display: flex;         /* menú horizontal */
  gap: 20px;
  margin-top: 10px;
  position: relative;
}

.menu-items li {
  position: relative;    /* para posicionar submenús */
}

/* Enlaces principales */
.menu-items li a {
  text-decoration: none;
  font-weight: 700;
  color: #333;
  padding: 8px 12px;
  transition: background-color 0.3s ease-in-out;
}

.menu-items li a:hover {
  background-color: #bceee1;
  border-radius: 5px;
}

/* Submenú */
.menu-items li ul {
display: none;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff9ec; /* fondo crema claro */
  border: 1px solid #e8dbc6; /* borde suave */
  padding: 12px 0;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* sombra más profunda */
  min-width: 200px;
  z-index: 20;
  flex-direction: column;
  gap: 0;
}

/* Items submenú */
.menu-items li ul li {
  padding: 8px 20px;
  white-space: nowrap;
}

/* Links submenú */
.menu-items li ul li a {
  color: #4b3c2a;
  font-weight: 600;
  padding: 8px 16px;
  display: block;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.menu-items li ul li a:hover {
  background-color: #fceac5; /* vainilla tostada al pasar el ratón */
  transform: translateX(4px);
}

/* Mostrar submenú al pasar ratón */
.menu-items li:hover > ul {
  display: flex;
}

/* Indicador para padres con submenú */
.menu-items li.has-submenu > a {
  cursor: pointer;
  position: relative;
  padding-right: 15px;
}

.menu-items li.has-submenu > a::after {
  content: '▼';
  font-size: 0.6em;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}










/* ========================================================
   6. LAYOUT PRINCIPAL
======================================================== */
.layout {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 40px;
}

aside {
  width: 18%;
  background: linear-gradient(to bottom right, #F4F1ED, #E7F3E5);
  padding: 20px;
}

main.contenido {
  width: 64%;
  background-color: #F4F1ED;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

main h2 {
  margin-bottom: 20px;
}

/* ========================================================
   7. REJILLA DE MESES (FRUTAS)
======================================================== */
.meses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columnas iguales */
  grid-template-rows: repeat(3, auto);  /* 3 filas con altura automática */
  gap: 20px; /* espacio entre filas y columnas */
  padding: 10px;
}

.mes {
  background-color: #fff;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.mes img {
  width: 100%;
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: opacity 0.5s ease;
}

.nombre-mes {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(188, 238, 225, 0.9);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  color: #333;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  white-space: nowrap;
}

.flecha {
  display: inline-block;
  margin-left: 8px;
  animation: moverFlecha 1s infinite alternate;
}

@keyframes moverFlecha {
  0% { transform: translateX(0); }
  100% { transform: translateX(6px); }
}

.mes:hover img {
  opacity: 0;
}

.mes:hover .nombre-mes {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================================
   8. TEXTO DE "QUIÉNES SOMOS"
======================================================== */
.texto-quienes {
  font-size: 1.1rem;
  line-height: 1.4;
  padding: 10px;
}

/* ========================================================
   9. PESTAÑAS / TABS
======================================================== */
.tabs {
  display: flex;
  border-bottom: 2px solid #ccc;
}

.tablink {
  padding: 10px 20px;
  background-color: #d4edda;
  border: 1px solid #ccc;
  border-bottom: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  margin-right: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.tablink:hover {
  background-color: #c3e6cb;
}

.tablink.active {
  background-color: #fff;
  font-weight: bold;
  position: relative;
  top: 2px;
  z-index: 1;
}

.tabcontent {
  display: none;
  padding: 1.5em;
  border: 1px solid #ccc;
  border-top: none;
  background-color: #fff;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ========================================================
   10. FOOTER
======================================================== */
footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  margin-top: 40px;
  border-top: 4px solid #79B96B;
}

footer a {
  color: #bceee1;
  text-decoration: underline;
}

footer img {
  margin-top: 10px;
  border: none;
}

.footer-info {
  flex: 1;
  min-width: 250px;
}

.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 1em;
  /*border-top: 1px solid #ccc;*/
}

.footer-flex div {
  max-width: 100%;
}

.footer-validador {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 100px;
}

.css-validator-badge {
  border: 0;
  width: 88px;
  height: 31px;
}




/* ========================================================
   11. RESPONSIVE
======================================================== */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }

  main.contenido,
  aside {
    width: 100%;
  }

  header {
    flex-direction: row;          /* Cambiado de column a row */
    justify-content: space-between; /* Logo a la izquierda, menu + banderas a la derecha */
    align-items: center;          /* Centra verticalmente */
    padding: 10px 20px;           /* Ajusta padding para móvil */
  }

  .container_banderas, 
  .menu-toggle {
    display: flex;                /* Asegura que se muestren en línea */
    align-items: center;
    gap: 10px;
  }

  .menu-toggle {
    display: block;
    margin: 0;                   /* Elimina margen inferior para que no desplace */
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
  }

  .menu-items {
    display: none;
    flex-direction: column;
    background-color: #E7F3E5;
    padding: 10px;
    border-radius: 8px;
    gap: 10px;
  }

  .menu-items.activo {
    display: flex;
  }

  .meses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tabla-menu {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .formulario-admin.nuevo-menu {
    padding: 15px 20px;
  }
}

@media (max-width: 600px) {
  .footer-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 1em;
  }

  .footer-validador {
    justify-content: flex-start;
    width: 100%;
  }

  /* esto corresponde al logo del aside derecho de recetas*/
@media (max-width: 768px) {
  .logo-blog {
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .logo-blog {
    max-width: 120px;
  }
}


}



/* ========================================================
   12. FORMULARIO ADMIN (Nuevo Menú)
======================================================== */
.formulario-admin.nuevo-menu {
  max-width: 700px;
  margin: 40px auto;
  padding: 20px 30px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.formulario-admin.nuevo-menu h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 25px;
  font-weight: 700;
  font-size: 1.8rem;
}

.formulario-admin.nuevo-menu label {
  display: block;
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 6px;
  color: #34495e;
}

.formulario-admin.nuevo-menu input[type="text"],
.formulario-admin.nuevo-menu select,
.formulario-admin.nuevo-menu textarea,
.formulario-admin.nuevo-menu input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #bdc3c7;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.formulario-admin.nuevo-menu textarea {
  resize: vertical;
  min-height: 70px;
}

.formulario-admin.nuevo-menu input:focus,
.formulario-admin.nuevo-menu select:focus,
.formulario-admin.nuevo-menu textarea:focus {
  border-color: #2980b9;
  outline: none;
}

.formulario-admin.nuevo-menu fieldset {
  margin-top: 30px;
  padding: 15px 20px;
  border: 1.8px solid #2980b9;
  border-radius: 8px;
  background-color: #ecf0f1;
}

.formulario-admin.nuevo-menu legend {
  font-weight: 700;
  font-size: 1.2rem;
  color: #2980b9;
  padding: 0 8px;
}

.formulario-admin.nuevo-menu button[type="submit"] {
  display: block;
  width: 100%;
  margin-top: 30px;
  background-color: #2980b9;
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.formulario-admin.nuevo-menu button[type="submit"]:hover {
  background-color: #1f6391;
}

/* ========================================================
   13. TABLA DE MENÚ SEMANAL (menus.php)
======================================================== */
.menu-tabla {
  overflow-x: auto;
  margin-top: 20px;
  width: 100%;
}

.tabla-menu {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.tabla-menu th,
.tabla-menu td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
  vertical-align: top;
}

.tabla-menu th {
  background-color: #e0e0e0;
  font-weight: bold;
}

.tabla-menu thead th {
  background: linear-gradient(45deg, #2E7D32, #4CAF50);
  color: white;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
  border-bottom: 4px solid #1B5E20;
  box-shadow: inset 0 -3px 5px rgba(0,0,0,0.2);
}

.tabla-menu th:first-child,
.tabla-menu td:first-child {
  background: linear-gradient(135deg, #A5D6A7, #81C784);
  color: #1B5E20;
  font-weight: 700;
  border-right: 3px solid #4CAF50;
}

.tabla-menu tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.tabla-menu tbody tr:hover {
  background-color: #f1f1f1;
  cursor: pointer;
}

/* ========================================================
   14. ICONO PDF EN TÍTULO DE MENÚ
======================================================== */
.menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.menu-header img {
  width: 24px;
  height: 24px;
  cursor: pointer;
}

/* ========================================================
   15. PÁGINA DE RECETAS CON ASIDES (Unificado tipografía)
======================================================== */
.page-wrapper {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Oswald', sans-serif;
  color: #333;
}

.aside-left,
.aside-right {
  flex: 1;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
}

.aside-left ul,
.aside-right ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
}

.aside-left li,
.aside-right li {
  margin-bottom: 12px;
}

.aside-left a,
.aside-right a {
  text-decoration: none;
  color: #2a7ae2;
  font-weight: 600;
  transition: color 0.3s ease;
}

.aside-left a:hover,
.aside-right a:hover {
  color: #1051a3;
}

.content {
  flex: 2;
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  line-height: 1.6;
  font-size: 1rem;
}

.content h1,
.content h2,
.content h3 {
  color: #1a1a1a;
  margin-top: 0;
}

.content ul,
.content ol {
  margin-left: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .page-wrapper {
    flex-direction: column;
    padding: 15px;
  }

  .aside-left,
  .aside-right,
  .content {
    width: 100%;
    margin-bottom: 20px;
  }
  .logo-blog {
  max-width: 50px !important;  /* ✅ Límite absoluto */
  height: auto !important;
  width: 100%;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.logo-blog:hover {
  transform: scale(1.05);
  }
}

/* ========================================================
   16. FORMULARIO DE CONTACTO MODERNO
======================================================== */
.formulario-admin.nuevo-menu {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  font-family: Arial, sans-serif;
  box-sizing: border-box;
}

.formulario-admin.nuevo-menu h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
}

.formulario-admin.nuevo-menu label {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #555;
}

.formulario-admin.nuevo-menu input[type="text"],
.formulario-admin.nuevo-menu input[type="email"],
.formulario-admin.nuevo-menu textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #bdc3c7;
  border-radius: 5px;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  box-sizing: border-box;
}

.formulario-admin.nuevo-menu textarea {
  resize: vertical;
  min-height: 70px;
}

.formulario-admin.nuevo-menu input:focus,
.formulario-admin.nuevo-menu textarea:focus {
  border-color: #2980b9;
  outline: none;
}

.formulario-admin.nuevo-menu button {
  display: block;
  width: 100%;
  padding: 12px 0;
  background-color: #2980b9;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.formulario-admin.nuevo-menu button:hover {
  background-color: #216391;
}

/* ========================================================
   NAVEGACIÓN DE SEMANAS
   Estilo tipo botón para cada semana
======================================================== */
.semanas-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

.boton-semana {
  display: inline-block;
  padding: 10px 18px;
  background-color: #d4edda;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #a8d5b7;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.boton-semana:hover {
  background-color: #bceee1;
  transform: translateY(-2px);
}

.boton-semana.activo {
  background-color: #79B96B;
  color: #fff;
  border-color: #5a9455;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ========================================================
 limitar imágenes dentro del lightbox
======================================================== */
.basicLightbox--visible img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* Para las imágenes del grid de recetas */
.receta-imagen {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 8px;
}

/* Para el lightbox o visores grandes */
.lightbox img,
.lightbox-content img {
  max-width: 100vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Opcional: asegurarte de que los contenedores no causen overflow */
img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Para prevenir desbordamientos generales en el layout */
body, .contenido, main {
  overflow-x: hidden;
}
/* ========================================================
   boton whassapp
======================================================== */
a.whatsapp-btn {
  background-color: #25D366;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}
a.whatsapp-btn:hover {
  background-color: #1DA851;
}

/* ========================================================
   CSS PARA IMÁGENES DE RECETAS
======================================================== */
.receta-imagen {
  width: 150px;
  height: 150px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border-radius: 0.5rem;
}

/* ========================================================
   QUITA SUBRAYADO DE ENLACES EN CONTENIDO
======================================================== */
.contenido a {
  text-decoration: none;
}

/* ========================================================
   Estilos exclusivos para la página Gracias
======================================================== */

body.gracias .contenido {
  max-width: 600px;
  margin: 80px auto; /* Más espacio arriba y abajo */
  background: #fff;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  text-align: center;
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centrar todo el contenido */
}

body.gracias .contenido h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
}

body.gracias .contenido p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 35px; /* Más separación */
  line-height: 1.5;
}

/* Botón con flecha usando ::after */
body.gracias .contenido a.btn-volver {
  display: inline-flex;
  align-items: center;
  gap: 10px; /* espacio entre texto y flecha */
  padding: 14px 32px;
  background-color: #4f46e5;
  color: white;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
}

body.gracias .contenido a.btn-volver:hover {
  background-color: #4338ca;
}

/* Flecha usando un SVG simple insertado con ::after */
body.gracias .contenido a.btn-volver::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border-top: 2.5px solid white;
  border-right: 2.5px solid white;
  transform: rotate(45deg);
  margin-left: 6px;
}




/* ================================ 
FIN, FET PER FELIX OLIVAN MAYORAL
===================================