/*
Theme Name: FOOD
Theme URI: https://github.com/tostis005/FOOD
Author: FOOD
Description: Tema editorial para un blog SEO sobre alimentos, cocina, nutrición práctica y seguridad alimentaria.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: food
*/

:root {
  --bg: #f5f0e6;
  --paper: #fffdf8;
  --ink: #1f261f;
  --muted: #6c7168;
  --line: #ded7c9;
  --green: #244b35;
  --green-2: #3f6d4d;
  --terracotta: #b85f3d;
  --mustard: #d1a94b;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(37, 45, 37, .08);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input { font: inherit; }
.container { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.site-topline { background: var(--green); color: #f5f0e6; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.site-topline .container { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; }
.site-header { background: rgba(245,240,230,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.header-main { min-height: 82px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.site-branding a { text-decoration: none; }
.site-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 4vw, 47px); line-height: 1; letter-spacing: -.06em; font-weight: 800; }
.site-title::after { content: "."; color: var(--terracotta); }
.site-tagline { color: var(--muted); font-size: 12px; margin-top: 5px; }
.primary-nav { justify-self: center; }
.primary-nav ul { display: flex; align-items: center; gap: 19px; list-style: none; margin: 0; padding: 0; }
.primary-nav a { text-decoration: none; font-size: 14px; font-weight: 700; }
.primary-nav a:hover { color: var(--terracotta); }
.header-search { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; text-decoration: none; }
.menu-toggle { display: none; border: 0; background: transparent; font-weight: 800; }

.hero { padding: 56px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 28px; align-items: stretch; }
.hero-copy { background: var(--paper); border: 1px solid var(--line); border-radius: 32px; padding: clamp(30px, 5vw, 62px); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; }
.eyebrow { color: var(--terracotta); font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.hero h1, .archive-header h1, .article-header h1 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.04em; line-height: 1.02; }
.hero h1 { font-size: clamp(45px, 7vw, 82px); margin: 13px 0 20px; max-width: 10ch; }
.hero p { color: var(--muted); font-size: clamp(17px, 2vw, 20px); max-width: 54ch; margin: 0 0 28px; }
.hero-search { display: flex; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 7px; }
.hero-search input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 14px; outline: 0; }
.hero-search button { border: 0; background: var(--green); color: white; padding: 11px 20px; border-radius: 999px; font-weight: 800; cursor: pointer; }
.hero-visual { position: relative; overflow: hidden; min-height: 540px; border-radius: 32px; background: linear-gradient(145deg, #d4b777, #a84f36 55%, #294f38); box-shadow: var(--shadow); }
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; border-radius: 50%; filter: blur(.2px); }
.hero-visual::before { width: 410px; height: 410px; background: #f0dfb7; left: -95px; top: 110px; box-shadow: inset 0 0 0 38px #dcae52; }
.hero-visual::after { width: 260px; height: 260px; background: #4a724c; right: -40px; top: -30px; box-shadow: -135px 385px 0 25px #74452f; }
.hero-visual .hero-label { position: absolute; z-index: 2; left: 28px; bottom: 28px; right: 28px; padding: 21px 22px; background: rgba(255,253,248,.92); border-radius: 18px; backdrop-filter: blur(12px); }
.hero-label strong { display: block; font-family: Georgia, serif; font-size: 24px; line-height: 1.15; }
.hero-label span { color: var(--muted); font-size: 13px; }

.topic-strip { padding: 14px 0 44px; }
.topic-list { display: flex; flex-wrap: wrap; gap: 10px; }
.topic-list a { text-decoration: none; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: 14px; font-weight: 800; }
.topic-list a:hover { background: var(--green); color: white; border-color: var(--green); }

.section { padding: 45px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font: 700 clamp(31px,4vw,46px)/1.08 Georgia, serif; letter-spacing: -.035em; }
.section-head p { color: var(--muted); max-width: 520px; margin: 0; }
.section-link { font-weight: 800; font-size: 14px; white-space: nowrap; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card a { text-decoration: none; }
.card-media { aspect-ratio: 16/10; background: #ddd4c4; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .card-media img { transform: scale(1.035); }
.card-placeholder { width: 100%; height: 100%; background: radial-gradient(circle at 25% 25%, #efd484 0 10%, transparent 11%), radial-gradient(circle at 70% 55%, #9a4838 0 16%, transparent 17%), linear-gradient(135deg,#d9d0b7,#53705a); }
.card-body { padding: 20px; }
.card-kicker { color: var(--terracotta); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.card-title { font: 700 25px/1.12 Georgia, serif; letter-spacing: -.025em; margin: 7px 0 9px; }
.card-excerpt { color: var(--muted); font-size: 15px; margin: 0; }
.card-meta { margin-top: 17px; color: var(--muted); font-size: 12px; display: flex; gap: 8px; }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.quick-link { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; }
.quick-icon { width: 52px; height: 52px; border-radius: 15px; background: #e8e1d3; display: grid; place-items: center; font-size: 24px; }
.quick-link strong { font-family: Georgia, serif; font-size: 19px; line-height: 1.2; }
.quick-link span { color: var(--muted); font-size: 13px; }
.quick-arrow { font-size: 22px; color: var(--terracotta); }

.ad-slot { margin: 32px auto; min-height: 120px; border: 1px dashed #bdb4a5; border-radius: 16px; display: grid; place-items: center; color: #8b847a; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.25); }

.archive-wrap { padding: 45px 0 70px; }
.archive-header { max-width: 800px; margin-bottom: 32px; }
.archive-header h1 { font-size: clamp(44px,6vw,72px); margin: 10px 0 12px; }
.archive-header p { color: var(--muted); font-size: 19px; }
.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 9px 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.page-numbers.current { background: var(--green); color: white; }

.breadcrumbs { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; padding: 26px 0 8px; }
.breadcrumbs a { text-decoration: none; }
.article-shell { width: min(calc(100% - 36px), 980px); margin: 0 auto; }
.article-header { padding: 22px 0 32px; text-align: center; }
.article-header .post-category { color: var(--terracotta); font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.article-header h1 { max-width: 900px; margin: 12px auto 18px; font-size: clamp(43px,7vw,78px); }
.article-deck { color: var(--muted); max-width: 760px; margin: 0 auto 18px; font-size: clamp(18px,2.2vw,22px); }
.article-meta { color: var(--muted); font-size: 13px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 14px; }
.article-hero { width: min(calc(100% - 36px), 1180px); margin: 0 auto 34px; border-radius: 28px; overflow: hidden; background: #ddd4c4; }
.article-hero img { width: 100%; max-height: 720px; object-fit: cover; }
.answer-box { margin: 28px 0 34px; border-radius: 18px; padding: 23px 25px; background: #e9eee6; border-left: 5px solid var(--green); }
.answer-box strong { display: block; color: var(--green); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 7px; }
.answer-box p { margin: 0; font-size: 18px; }
.entry-content { font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.78; }
.entry-content > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.entry-content h2, .entry-content h3 { color: var(--ink); line-height: 1.17; letter-spacing: -.025em; margin-top: 2em; }
.entry-content h2 { font-size: 38px; }
.entry-content h3 { font-size: 29px; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote { border-left: 4px solid var(--mustard); padding: 6px 0 6px 22px; color: #41483e; font-style: italic; }
.entry-content .alignwide { max-width: 980px; }
.entry-content .alignfull { max-width: none; width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.entry-content table { width: 100%; border-collapse: collapse; font-family: Inter, sans-serif; font-size: 15px; }
.entry-content th, .entry-content td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { background: #ece6da; }
.article-tags { margin: 35px auto; max-width: 760px; display: flex; flex-wrap: wrap; gap: 8px; }
.article-tags a { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; text-decoration: none; }
.related { padding: 35px 0 70px; }

.search-panel { max-width: 760px; margin: 28px 0; }
.search-panel form { display: flex; gap: 10px; }
.search-panel input { flex: 1; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 13px 18px; }
.search-panel button { border: 0; background: var(--green); color: white; border-radius: 999px; padding: 12px 20px; font-weight: 800; }

.site-footer { margin-top: 40px; background: var(--green); color: #f5f0e6; }
.footer-main { padding: 54px 0 38px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.footer-brand { font: 800 52px/1 Georgia, serif; letter-spacing: -.05em; }
.footer-brand::after { content: "."; color: #e2835d; }
.footer-copy { color: #cbd5cc; max-width: 440px; }
.site-footer .widget-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #dce2d9; }
.site-footer a { color: inherit; }
.site-footer ul { list-style: none; padding: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0 26px; display: flex; justify-content: space-between; gap: 15px; color: #bfcabd; font-size: 12px; }

@media (max-width: 960px) {
  .header-main { grid-template-columns: auto auto 42px; justify-content: space-between; }
  .menu-toggle { display: inline-block; }
  .primary-nav { display: none; position: absolute; left: 18px; right: 18px; top: 78px; background: var(--paper); border: 1px solid var(--line); padding: 16px; border-radius: 18px; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 390px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  body { font-size: 16px; }
  .site-topline .container { justify-content: center; }
  .site-topline .topline-secondary, .site-tagline { display: none; }
  .header-main { min-height: 70px; }
  .hero { padding-top: 26px; }
  .hero-copy { border-radius: 24px; padding: 28px 24px; }
  .hero h1 { font-size: 48px; }
  .hero-search { border-radius: 18px; flex-direction: column; }
  .hero-search button { width: 100%; }
  .hero-visual { min-height: 320px; border-radius: 24px; }
  .section { padding: 32px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 8px; }
  .card-grid, .quick-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 45px; }
  .entry-content { font-size: 18px; }
  .entry-content h2 { font-size: 31px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
