/* -----------------------------
   SINGLE RECIPE LAYOUT
----------------------------- */
.post-header {
  text-align: center;
  margin-bottom: 40px;
}

.post-header h1.post-title {
  font-size: 3.2rem;
  margin-bottom: 20px;
  line-height: 1.1;
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 35px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* -----------------------------
   RECIPE ACTION BUTTONS
----------------------------- */
.ll-recipe-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}

.ll-action-btn {
  background-color: #CBE4CB; /* Verde Salvia */
  color: #111;
  padding: 12px 25px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.ll-action-btn:hover {
  background-color: #111;
  color: #fff;
}

.jump-btn {
  display: inline-block;
  background-color: var(--bg-color);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  padding: 10px 25px;
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 0.8rem;
  text-transform: uppercase;
  border-radius: 30px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.jump-btn:hover {
  background-color: var(--text-main);
  color: white;
}

.story-content {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem; /* Ampliado para legibilidad */
  line-height: 1.75;
  margin-bottom: 50px;
  color: #333;
}

.editorial-content {
  max-width: 720px; /* Estándar lectura estilo NYT / L&L */
  margin: 0 auto;
}

.editorial-content p {
  margin-bottom: 24px;
}

.editorial-content h2, .editorial-content h3 {
  margin-top: 40px;
  margin-bottom: 20px;
  font-family: 'Playfair Display', serif;
}

/* -----------------------------
   RECIPE PLUGIN FRONTEND BOX
----------------------------- */
.recipe-plugin-box {
  background-color: #FAFAFA; /* Hueso cálido */
  border: 1px solid var(--border-light);
  padding: 40px;
  border-radius: 8px;
  margin-top: 50px;
  position: relative;
}

.recipe-plugin-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 20px;
}

.recipe-plugin-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.recipe-plugin-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.btn-action {
  background-color: var(--bg-color);
  border: 1px solid var(--border-light);
  padding: 10px 20px;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-action:hover {
  background-color: var(--text-main);
  color: white;
}

.recipe-meta-table {
  display: flex;
  justify-content: space-between;
  text-align: center;
  background: var(--bg-color);
  padding: 20px;
  border: 1px solid var(--border-light);
  margin-bottom: 40px;
}

.meta-item {
  flex: 1;
  border-right: 1px solid var(--border-light);
}

.meta-item:last-child {
  border-right: none;
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.meta-value {
  font-weight: bold;
  font-size: 1.1rem;
}

.recipe-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.ingredients-list {
  list-style: none;
}

.ingredients-list li {
  margin-bottom: 15px;
  padding-left: 30px;
  position: relative;
  font-size: 1.05rem;
  cursor: pointer;
}

.ingredients-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--text-main);
  border-radius: 2px;
  background: white;
}

/* Checkbox toggle class controlled via JS */
.ingredients-list li.checked {
  color: var(--text-light);
  text-decoration: line-through;
}

.ingredients-list li.checked::after {
  content: '✓';
  position: absolute;
  left: 4px;
  top: 1px;
  font-size: 14px;
  color: var(--accent-color);
  font-weight: bold;
}

.instructions-list {
  list-style: none;
  counter-reset: my-counter;
}

.instructions-list li {
  position: relative;
  margin-bottom: 25px;
  padding-left: 40px;
  line-height: 1.7;
}

.instructions-list li::before {
  counter-increment: my-counter;
  content: counter(my-counter);
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--accent-color);
}

/* -----------------------------
   POP-UP & FLOATING BUTTONS
----------------------------- */
.floating-up-btn {
  position: fixed;
  bottom: 110px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--text-main);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

.floating-up-btn.visible {
  opacity: 1;
  visibility: visible;
}

.floating-up-btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-modal {
  background: white;
  width: 100%;
  max-width: 500px;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  position: relative;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

/* Súper Pop-up (Split Layout) */
.popup-modal-split {
  max-width: 850px;
  display: flex;
  padding: 0; 
  overflow: hidden;
  text-align: left;
}

.popup-image-col {
  flex: 1;
  background: #f4f4f4;
}

.popup-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-content-col {
  flex: 1;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
  .popup-modal-split {
    flex-direction: column;
  }
  .popup-image-col {
    max-height: 250px;
  }
  .popup-content-col {
    padding: 30px;
    text-align: center;
  }
}

.popup-overlay.active .popup-modal {
  transform: translateY(0);
}

.btn-close-popup {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

.popup-modal h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.popup-modal p {
  color: var(--text-light);
  margin-bottom: 25px;
}

.popup-form input {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border-light);
  margin-bottom: 15px;
  font-family: 'Inter', sans-serif;
}

.popup-form button {
  width: 100%;
  padding: 15px;
  background-color: var(--text-main);
  color: white;
  border: none;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
}

.popup-form button:hover {
  background-color: var(--accent-color);
}

@media (max-width: 768px) {
  .recipe-plugin-header {
    grid-template-columns: 1fr;
  }
  .recipe-body {
    grid-template-columns: 1fr;
  }
}
/* ========================================================
   MOBILE HOTFIXES (Mediavine Overlaps & Pop-up Scaling)
======================================================== */
@media (max-width: 768px) {
  /* 1. Shrink Modal to avoid Ad Collisions */
  .popup-modal {
    transform: scale(0.85) translateY(0) !important;
    max-height: 80vh;
    overflow-y: auto;
    margin-top: 50px; /* Push it away from Raptive top-ad */
  }
  .popup-overlay.active .popup-modal {
    transform: scale(0.85) translateY(0) !important;
  }
  
}

/* ========================================================
   GLOBAL FIXES
======================================================== */
/* Centrar imágenes dentro del post y aportar estilo moderno */
.editorial-content img {
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Fuerza Bruta Global para el Text-Overlap de MediaVine */
.mv-create-wrapper,
.mv-create-card,
#mv-creation {
  margin-top: 80px !important;
}
.mv-create-title {
  margin-top: 150px !important;
  padding-top: 20px !important;
  display: block !important;
  clear: both !important;
}
h2.mv-create-title, h3.mv-create-title, h1.mv-create-title {
  margin-top: 150px !important;
}

/* -----------------------------
   EDITORIAL IN-POST IMAGES
   Forcing vertical rectangular layout (3:4 aspect ratio)
   (Carefully excluding MediaVine recipe cards so they don't break!)
----------------------------- */
.story-content img:not(.mv-create-wrapper img),
.editorial-content img:not(.mv-create-wrapper img),
.wp-block-image img:not(.mv-create-wrapper img),
figure.wp-block-image img:not(.mv-create-wrapper img) {
  width: 100% !important;
  max-width: 800px;
  aspect-ratio: 3/4 !important;
  object-fit: cover !important;
  border-radius: 4px;
  margin: 20px auto 30px auto !important;
  display: block;
}
