/*
Theme Name: Guinaldo
Theme URI: https://aceitunasguinaldo.es
Author: Jennifer Prendes Guinaldo
Author URI: https://aceitunasguinaldo.es
Description: Tema personalizado para Aceitunas y Encurtidos Guinaldo
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guinaldo
*/

/* ============================================
   RESET Y BASE
   ============================================ */
html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #fdf8f2, #a6c48a);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================
   UTILIDADES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
.logo {
  max-width: 200px !important;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  transition: all 0.3s ease;
}

.slogan {
  font-size: 1.1rem;
  font-style: italic;
  color: #020202;
  text-align: center;
  margin-top: -0.5rem;
  transition: all 0.3s ease;
}

header {
  background-color: rgba(86, 108, 52, 0.85);
  padding: 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 0.5rem !important;
  background-color: rgba(86, 108, 52, 0.95) !important;
}

header.scrolled .logo {
  max-width: 120px !important;
  margin: 0 auto 0.5rem !important;
}

header.scrolled .slogan {
  font-size: 0.9rem !important;
  margin-top: -0.3rem !important;
}

nav {
  background-color: #3e4e26;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 0.3rem !important;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}

nav.scrolled ul {
  gap: 0.5rem !important;
}

nav li {
  flex-shrink: 0;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: block;
  font-size: 0.9rem;
}

nav.scrolled a {
  font-size: 0.8rem !important;
  padding: 0.3rem 0.8rem !important;
}

nav a:hover {
  color: #ffd700;
  background-color: rgba(255, 215, 0, 0.1);
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
section {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

main {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

h2 {
  text-align: center;
  color: #566c34;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   PÁGINA BLOG
   ============================================ */
.contenedor-blog {
  display: block !important;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.blog-header {
  text-align: center;
  margin-bottom: 2rem;
}

.blog-header h2 {
  margin-bottom: 0.5rem;
}

.descripcion-blog {
  text-align: center;
  color: #666;
  font-size: 1rem;
  margin-top: 0.5rem !important;
  margin-bottom: 2.5rem !important;
  padding: 0 1rem;
  line-height: 1.6;
}

/* Artículos del blog */
.entrada,
article.post {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  overflow: hidden;
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.entrada:hover,
article.post:hover {
  transform: translateY(-5px);
}

.entrada h3,
article.post h2,
article.post h3 {
  color: #3e4e26;
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.fecha,
.post-date {
  font-size: 0.9rem;
  color: #777;
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
}

.entrada p,
article.post p {
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #333;
}

.entrada ul,
article.post ul {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  padding-left: 1.2rem;
}

.entrada li,
article.post li {
  margin-bottom: 0.5rem;
  list-style: disc;
}

.entrada ol,
article.post ol {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  padding-left: 1.2rem;
}

.entrada ol li,
article.post ol li {
  margin-bottom: 0.8rem;
  list-style: decimal;
}

.entrada strong,
article.post strong {
  color: #2d3721;
  font-weight: 600;
}

.entrada em,
article.post em {
  color: #5a6b44;
  font-style: italic;
}

.entrada img,
article.post img,
.wp-post-image {
  width: 100%;
  max-width: 700px;
  height: auto;
  min-height: 300px;
  object-fit: cover;
  display: block;
  margin: 1.5rem auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entrada img:hover,
article.post img:hover,
.wp-post-image:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Info de receta */
.info-receta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #555;
}

.info-receta span {
  background: #f5f5f5;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.info-receta span:hover {
  background: #ebebeb;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-receta span strong {
  color: #566c34;
  margin-right: 0.3rem;
  font-weight: 600;
}

.dificultad {
  font-weight: 600;
}

/* Recetas relacionadas */
.recetas-relacionadas {
  background: #f9f9f9;
  border-left: 4px solid #566c34;
  padding: 1.2rem 1.5rem;
  margin-top: 2rem;
  border-radius: 8px;
}

.recetas-relacionadas h4 {
  margin: 0 0 1rem 0;
  color: #3e4e26;
  font-size: 1.1rem;
  font-weight: 600;
}

.recetas-relacionadas ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recetas-relacionadas li {
  margin-bottom: 0.7rem;
}

.recetas-relacionadas li:last-child {
  margin-bottom: 0;
}

.recetas-relacionadas a {
  color: #566c34;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  padding: 0.3rem 0;
  transition: all 0.3s ease;
  position: relative;
}

.recetas-relacionadas a::before {
  content: "→ ";
  color: #8ca56e;
  font-weight: bold;
}

.recetas-relacionadas a:hover {
  color: #3e4e26;
  transform: translateX(5px);
}

/* Botones de compartir */
.share-buttons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.share-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
  margin-right: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.share-btn.whatsapp {
  background-color: #e8f5e9;
  color: #25d366;
  border-color: #25d366;
}

.share-btn.whatsapp:hover {
  background-color: #25d366;
  color: white;
}

.share-btn.facebook {
  background-color: #e3f2fd;
  color: #1877f2;
  border-color: #1877f2;
}

.share-btn.facebook:hover {
  background-color: #1877f2;
  color: white;
}

.share-btn.twitter {
  background-color: #e1f5fe;
  color: #1da1f2;
  border-color: #1da1f2;
}

.share-btn.twitter:hover {
  background-color: #1da1f2;
  color: white;
}

.share-btn.email {
  background-color: #fce4ec;
  color: #e91e63;
  border-color: #e91e63;
}

.share-btn.email:hover {
  background-color: #e91e63;
  color: white;
}

.share-btn.copy {
  background-color: #f3e5f5;
  color: #9c27b0;
  border-color: #9c27b0;
}

.share-btn.copy:hover {
  background-color: #9c27b0;
  color: white;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: #3e4e26;
  color: white;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
}

footer p {
  margin-top: 1rem;
  margin-bottom: 0;
}

footer a {
  color: #d5fa05;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ============================================
   BOTÓN WHATSAPP
   ============================================ */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  text-decoration: none;
  font-weight: bold;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-subir {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: #566c34;
  color: white;
  padding: 0.8rem 1rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
  font-size: 0.8rem;
}

.btn-subir:hover {
  background-color: #3e4e26;
}

/* ============================================
   PÁGINA ARCHIVO Y BUSCADOR
   ============================================ */

/* Grid de archivo */
.archivo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.archivo-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.archivo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.archivo-imagen {
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: block;
  position: relative;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.archivo-imagen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  padding: 0.5rem;
}

.archivo-item:hover .archivo-imagen img {
  transform: scale(1.05);
}

.archivo-sin-imagen {
  background: linear-gradient(135deg, #a6c48a, #566c34);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.archivo-contenido {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.archivo-fecha {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 0.5rem;
  display: block;
}

.archivo-categoria {
  display: inline-block;
  background: #566c34;
  color: white;
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.archivo-titulo {
  margin: 0.5rem 0;
  flex: 1;
}

.archivo-titulo a {
  color: #3e4e26;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.archivo-titulo a:hover {
  color: #566c34;
}

.archivo-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  font-size: 0.8rem;
}

.archivo-meta span {
  background: #f5f5f5;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  color: #666;
}

.dificultad-badge {
  background: #566c34 !important;
  color: white !important;
  font-weight: 600;
}

/* Sección de mes en archivo completo */
.mes-archivo {
  margin-bottom: 3rem;
}

.mes-titulo {
  font-size: 1.5rem;
  color: #566c34;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #a6c48a;
}

.mes-titulo a {
  color: #566c34;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mes-titulo a:hover {
  color: #3e4e26;
}

/* Filtro de recetas */
.filtro-recetas {
  margin: 2rem 0;
  text-align: center;
}

.filtro-botones {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filtro-btn {
  background: white;
  color: #566c34;
  border: 2px solid #566c34;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-family: inherit;
}

.filtro-btn:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.filtro-btn.active {
  background: #566c34;
  color: white;
  box-shadow: 0 4px 8px rgba(86, 108, 52, 0.3);
}

.resultados-info {
  text-align: center;
  margin: 1rem 0 2rem;
  font-size: 1rem;
  color: #666;
}

.sin-resultados {
  text-align: center;
  padding: 3rem 1rem;
}

.sin-resultados p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 1.5rem;
}

/* Responsive para archivo */
@media (max-width: 768px) {
  .archivo-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .archivo-imagen {
    height: 180px;
  }
  
  .filtro-botones {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .filtro-btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .archivo-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PAGINACIÓN
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid #566c34;
  border-radius: 4px;
  color: #566c34;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: #566c34;
  color: white;
}

.pagination .current {
  background: #566c34;
  color: white;
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

@media (max-width: 768px) {
  .entrada img,
  article.post img,
  .wp-post-image {
    min-height: 200px;
  }

  .share-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .share-label {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }
}

@media (min-width: 1025px) {
  .entrada img,
  article.post img,
  .wp-post-image {
    min-height: 400px;
  }
}