/* ═══════════════════════════════════════════════════════════════════════════
   appsdejoseluis.com — CSS Mobile-First
   Breakpoints: 360 (base) → 600 (tablet) → 920 (desktop)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter Tight', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #1a1a1a;
  background: #faf9f7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #8b2252; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ─── Layout ────────────────────────────────────────────────────────────── */
.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e3df;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}
.site-logo:hover { text-decoration: none; color: #8b2252; }

/* Hamburger */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.hamburger { position: relative; }
.hamburger::before,
.hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Nav mobile */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #e5e3df;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 0.5rem 0;
}
.site-nav.is-open { display: block; }
.nav-list { display: flex; flex-direction: column; }
.nav-list li a {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav-list li a:hover { background: #f5f4f2; color: #8b2252; text-decoration: none; }

/* ─── Breadcrumbs ───────────────────────────────────────────────────────── */
.breadcrumbs {
  font-size: 0.85rem;
  color: #666;
  padding: 0.75rem 0;
  line-height: 1.4;
}
.breadcrumbs a { color: #8b2252; }
.bc-sep { margin: 0 0.35rem; color: #ccc; }

/* ─── Typography ────────────────────────────────────────────────────────── */
.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}
.page-subtitle {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.page-meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

/* Content prose */
.content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  line-height: 1.25;
  color: #1a1a1a;
}
.content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: #333;
}
.content p { margin-bottom: 1rem; }
.content ul, .content ol {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}
.content ul { list-style: disc; }
.content ol { list-style: decimal; }
.content li { margin-bottom: 0.4rem; }
.content img { border-radius: 8px; margin: 1rem 0; }
.content figure { margin: 1rem 0; }
.content figure.alignleft { float: left; margin: 0.5rem 1rem 0.5rem 0; max-width: 45%; }
.content figure.alignright { float: right; margin: 0.5rem 0 0.5rem 1rem; max-width: 45%; }
.content figure.aligncenter { text-align: center; margin: 1rem auto; display: block; }
.content .wp-block-image { text-align: center; overflow: hidden; }
.content .wp-block-image > figure { margin-left: auto; margin-right: auto; display: table; }
.content .wp-block-image > figure > img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.content figure.alignleft img,
.content figure.alignright img { width: 100%; height: auto; }
.content .wp-block-columns { display: flex; gap: 1rem; margin: 1.5rem 0; flex-wrap: wrap; }
.content .wp-block-column { flex: 1; min-width: 150px; }
.content .wp-block-column figure { margin: 0 0 0.5rem; }
.content .wp-block-column img { width: 100%; height: auto; border-radius: 8px; }
.content .wp-block-column p { font-size: 0.9rem; margin: 0.25rem 0 0.5rem; }
.content figcaption { font-size: 0.85rem; color: #666; text-align: center; margin-top: 0.25rem; }
.content blockquote {
  border-left: 3px solid #8b2252;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: #f9f5f7;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #555;
}

/* ─── Cards / Listados ──────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e3df;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.card-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.7);
}
.card-body { padding: 1rem; }
.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b2252;
  margin-bottom: 0.35rem;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}
.card-title a { color: #1a1a1a; }
.card-title a:hover { color: #8b2252; text-decoration: none; }
.card-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.card-meta {
  font-size: 0.8rem;
  color: #999;
}

/* ─── Recipe / Craft specific ───────────────────────────────────────────── */
.recipe-info, .craft-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  background: #f9f5f7;
  border-radius: 8px;
  padding: 1rem;
  margin: 1.25rem 0;
}
.recipe-info dt, .craft-info dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
}
.recipe-info dd, .craft-info dd {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}
.ingredients-list, .materials-list {
  background: #fff;
  border: 1px solid #e5e3df;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.ingredients-list li, .materials-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0efed;
  list-style: none;
}
.ingredients-list li:last-child, .materials-list li:last-child { border-bottom: none; }
.steps-list { counter-reset: step; margin: 1rem 0; }
.steps-list li {
  counter-increment: step;
  position: relative;
  padding: 0.75rem 0 0.75rem 2.75rem;
  border-bottom: 1px solid #f0efed;
  list-style: none;
}
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 2rem;
  height: 2rem;
  background: #8b2252;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}
/* Accordion steps */
.steps-accordion .step-toggle {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  color: #1a1a1a;
  padding-right: 1.5rem;
  position: relative;
}
.steps-accordion .step-toggle::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #8b2252;
  transition: transform 0.2s;
}
.steps-accordion .step-toggle.is-open::after {
  content: "−";
}
.steps-accordion .step-detail {
  margin-top: 0.75rem;
  padding: 0.75rem 0;
  color: #444;
  line-height: 1.7;
  border-top: 1px dashed #e0dfdd;
}
.steps-accordion .step-detail p {
  margin-bottom: 0.5rem;
}

.tip-box {
  background: #fef9e7;
  border-left: 3px solid #f0b429;
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

/* ─── Article hero image ───────────────────────────────────────────────── */
.article-hero {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

/* ─── Video embed ───────────────────────────────────────────────────────── */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin: 1.25rem 0;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ─── Tags ──────────────────────────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0; }
.tag {
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  background: #f0efed;
  border-radius: 100px;
  color: #555;
  font-weight: 500;
}

/* ─── Related articles ──────────────────────────────────────────────────── */
.related-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e3df;
}
.related-section h2 { font-size: 1.2rem; margin-bottom: 1rem; }

/* ─── Ad slots (anti-CLS) ──────────────────────────────────────────────── */
.ad-slot {
  min-height: 100px;
  background: transparent;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── FAQ ────────────────────────────────────────────────────────────────── */
.faq-section { margin: 2rem 0; }
.faq-item { border-bottom: 1px solid #e5e3df; padding: 1rem 0; }
.faq-question { font-weight: 600; font-size: 1rem; margin-bottom: 0.5rem; }
.faq-answer { color: #555; font-size: 0.95rem; }

/* ─── Related articles ──────────────────────────────────────────────────── */
.related-section {
  margin: 2.5rem 0 1rem;
  padding-top: 2rem;
  border-top: 2px solid #f0efed;
}
.related-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  text-decoration: none;
  color: #1a1a1a;
  transition: box-shadow 0.2s, transform 0.2s;
}
.related-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  text-decoration: none;
}
.related-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.related-card-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
}
.related-card-title {
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}
.related-category-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #8b2252;
}
.related-category-link:hover {
  text-decoration: underline;
}
@media (min-width: 600px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Legal pages ───────────────────────────────────────────────────────── */
.legal-content h2 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.legal-content p { margin-bottom: 0.75rem; font-size: 0.95rem; color: #444; }
.legal-content ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.legal-content li { margin-bottom: 0.3rem; font-size: 0.95rem; color: #444; }

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  background: #8b2252;
  color: #fff;
  min-height: 44px;
  transition: background 0.15s ease;
}
.btn:hover { background: #6d1a40; text-decoration: none; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; min-height: 36px; }
.btn-outline { background: transparent; color: #8b2252; border: 1px solid #8b2252; }
.btn-outline:hover { background: #f9f5f7; }

/* CTA buttons embebidos en el contenido (WP wp-block-button) */
.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0;
}
.wp-block-button__link {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff !important;
  text-align: center;
  border-radius: 50px;
  box-shadow: 0 6px 20px rgba(106, 81, 224, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.wp-block-button__link:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(106, 81, 224, 0.45);
  filter: brightness(1.05);
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 2rem 1rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: 920px;
  margin: 0 auto;
}
.footer-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.25rem;
}
.footer-tagline { font-size: 0.85rem; color: #999; margin-bottom: 1rem; }
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.25rem;
}
.footer-nav a {
  color: #ccc;
  font-size: 0.88rem;
}
.footer-nav a:hover { color: #fff; }
.footer-copy { font-size: 0.8rem; color: #666; }

/* ─── Home hero ─────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}
.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: #666;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

/* Section heading */
.section-heading {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-heading a {
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: auto;
}

/* Category header */
.category-header {
  margin-bottom: 1.5rem;
}
.category-description {
  color: #555;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}
.subcat-section {
  margin-bottom: 2rem;
}
.subcat-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #eee;
  margin-bottom: 0.25rem;
}
.subcat-section .card-grid {
  margin-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET — 600px+
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .recipe-info, .craft-info { grid-template-columns: repeat(4, 1fr); }
  .hero-title { font-size: 2.5rem; }
  .page-title { font-size: 2rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP — 920px+
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 920px) {
  /* Nav horizontal */
  .menu-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .nav-list {
    flex-direction: row;
    gap: 0.25rem;
  }
  .nav-list li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 6px;
  }
  .nav-list li a:hover { background: #f5f4f2; }

  .site-main { padding: 1.5rem 1rem 3rem; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-title { font-size: 2.75rem; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Image Gallery ─────────────────────────────────────────────── */
.gallery-box {
  margin: 2rem 0;
  padding: 1.25rem;
  background: #fafaf8;
  border: 1px solid #e8e6e1;
  border-radius: 12px;
}
.gallery-box h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.gallery-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .2s ease;
}
.gallery-img:hover {
  transform: scale(1.03);
}
