/* ============================================================
   Alfred GGM Theme — Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ── VARIABLES ── */
:root {
  --cream: #FAF7F2;
  --warm-white: #FFFDF9;
  --sage: #7A9E87;
  --sage-light: #C8DDD0;
  --sage-dark: #3D5C48;
  --golden: #D4A847;
  --golden-light: #F5E8C4;
  --text-dark: #1C2B20;
  --text-mid: #4A6255;
  --text-light: #8BA595;
  --coral: #E8705A;
  --coral-light: #FAE0DB;
  --border: rgba(122,158,135,0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.6;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}
h1 { font-size: clamp(2.5rem, 5vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { line-height: 1.75; color: var(--text-mid); }
em { font-style: italic; color: var(--sage); }

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 5rem 0; }
.section-alt { background: var(--warm-white); }

/* ── SECTION HEADERS ── */
.section-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: var(--sage-light);
}
.section-title { margin-bottom: 1rem; }
.section-desc {
  color: var(--text-mid);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--sage-dark);
  color: #fff;
  padding: 14px 28px;
  border-radius: 40px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--sage); transform: translateY(-1px); color: #fff; }

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--sage);
  color: var(--sage-dark);
  padding: 14px 28px;
  border-radius: 40px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  background: transparent;
  cursor: pointer;
}
.btn-outline:hover { background: var(--sage-light); color: var(--sage-dark); }

/* ── NAV ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,247,242,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.site-branding a {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--sage-dark);
  letter-spacing: -0.02em;
}
.site-branding a span { color: var(--golden); font-style: italic; }

.main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.main-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--sage-dark); }

.nav-lang a {
  font-size: 0.8rem;
  color: var(--text-light);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}
.nav-lang a:hover { border-color: var(--sage); color: var(--sage-dark); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── HERO ── */
.hero {
  min-height: 90vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 4rem 6rem 5rem;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-tag::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--sage);
}
.hero-title {
  font-size: clamp(3rem, 5vw, 5.5rem);
  margin-bottom: 1.5rem;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 400px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-right {
  position: relative;
  background: var(--sage-light);
  overflow: hidden;
}
.hero-illustration {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-blob {
  position: absolute;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: morph 8s ease-in-out infinite;
}
@keyframes morph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}
.blob-1 {
  width: 340px; height: 340px;
  background: var(--sage);
  opacity: 0.35;
  top: 15%; left: 10%;
}
.blob-2 {
  width: 200px; height: 200px;
  background: var(--golden);
  opacity: 0.3;
  bottom: 20%; right: 15%;
  animation-delay: -4s;
}
.hero-badge {
  position: absolute;
  background: var(--warm-white);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 4px 24px rgba(61,92,72,0.12);
}
.hero-badge-1 { top: 22%; right: 18%; }
.hero-badge-2 { bottom: 28%; left: 12%; }
.badge-label {
  color: var(--text-light);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.badge-value {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--sage-dark);
}
.badge-sub { color: var(--text-mid); font-size: 0.75rem; }

/* ── ABOUT / STORY ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-facts { display: flex; flex-direction: column; gap: 1.25rem; }

.fact-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: border-color 0.2s;
}
.fact-card:hover { border-color: var(--sage); }
.fact-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.fact-icon.green { background: var(--sage-light); }
.fact-icon.gold { background: var(--golden-light); }
.fact-icon.coral { background: var(--coral-light); }
.fact-title { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 0.95rem; color: var(--text-dark); margin-bottom: 4px; }
.fact-text { font-size: 0.85rem; color: var(--text-mid); line-height: 1.6; }

.about-story {
  padding: 2.5rem;
  background: var(--sage-dark);
  border-radius: var(--radius-lg);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.about-story::before {
  content: '"';
  font-family: 'Fraunces', serif;
  font-size: 12rem;
  position: absolute;
  top: -2rem; right: 1rem;
  color: rgba(255,255,255,0.08);
  line-height: 1;
  font-weight: 600;
}
.about-story p {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
.about-story .story-name {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--golden);
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── STATUS PILLS ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}
.status-pill.ok { background: var(--sage-light); color: var(--sage-dark); }
.status-pill.limit { background: var(--golden-light); color: #7A5A10; }
.status-pill.no { background: var(--coral-light); color: #8B2A18; }

/* ── CATEGORY CARDS ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.cat-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  transition: all 0.25s;
  display: block;
}
.cat-card:hover {
  border-color: var(--sage);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(61,92,72,0.1);
}
.cat-emoji { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.cat-name { font-weight: 500; font-size: 0.95rem; color: var(--text-dark); margin-bottom: 4px; }
.cat-count { font-size: 0.78rem; color: var(--text-light); }
.cat-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.cat-tag.safe { background: var(--sage-light); color: var(--sage-dark); }
.cat-tag.check { background: var(--golden-light); color: #7A5A10; }
.cat-tag.avoid { background: var(--coral-light); color: #8B2A18; }

/* ── DIET TABLE ── */
.diet-table {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 2.5rem;
}
.diet-row {
  display: grid;
  grid-template-columns: 1fr 100px 2fr;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.diet-row:last-child { border-bottom: none; }
.diet-row:nth-child(even) { background: var(--warm-white); }
.diet-row.diet-header {
  background: var(--sage-dark);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.diet-food { font-weight: 500; font-size: 0.95rem; }
.diet-note { font-size: 0.83rem; color: var(--text-mid); }

/* ── RECIPE CARDS ── */
.recipes-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.recipe-card {
  background: var(--warm-white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.25s;
  display: block;
}
.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(61,92,72,0.12);
}
.recipe-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
}
.recipe-img.has-thumbnail { font-size: 0; }
.recipe-img.has-thumbnail img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recipe-img.breakfast { background: linear-gradient(135deg, #FFF3D4, #FFE0A0); }
.recipe-img.lunch { background: linear-gradient(135deg, #D4EDDA, #A8D5B5); }
.recipe-img.dinner { background: linear-gradient(135deg, #D4E4F7, #A8C4E8); }
.recipe-img.dessert { background: linear-gradient(135deg, #F7D4D4, #E8A8A8); }
.recipe-img.mellis { background: linear-gradient(135deg, #F5E8C4, #EDD090); }
.recipe-img.default { background: linear-gradient(135deg, var(--sage-light), var(--sage)); }

.recipe-meal-tag {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.85);
  color: var(--text-mid);
  backdrop-filter: blur(4px);
  z-index: 1;
}
.recipe-body { padding: 1.25rem; }
.recipe-title {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}
.recipe-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  display: flex;
  gap: 12px;
}
.recipe-excerpt {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-top: 8px;
  line-height: 1.6;
}

/* ── SINGLE RECIPE PAGE ── */
.recipe-single { max-width: 800px; margin: 0 auto; padding: 4rem 2rem; }
.recipe-single h1 { margin-bottom: 1rem; }
.recipe-meta-bar {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.recipe-meta-item { font-size: 0.85rem; color: var(--text-mid); }
.recipe-meta-item strong { color: var(--text-dark); display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }

.recipe-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; margin-top: 2rem; }
.ingredients-list { list-style: none; }
.ingredients-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-mid);
}
.instructions-list { list-style: none; counter-reset: steps; }
.instructions-list li {
  counter-increment: steps;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.instructions-list li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--sage-dark);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 500;
  flex-shrink: 0;
}

/* ── NEWS CARDS ── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.news-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
  transition: all 0.2s;
  display: block;
}
.news-card:hover { border-color: var(--sage); transform: translateY(-2px); }
.news-date {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.news-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.news-excerpt { font-size: 0.875rem; color: var(--text-mid); line-height: 1.65; }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-mid);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--sage); color: var(--sage-dark); }
.pagination .current { background: var(--sage-dark); color: #fff; border-color: var(--sage-dark); }

/* ── SIDEBAR ── */
.with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
.sidebar-widget {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-widget h3 {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mid);
  margin-bottom: 1rem;
  font-family: 'DM Sans', sans-serif;
}
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget a { font-size: 0.875rem; color: var(--text-mid); transition: color 0.2s; }
.sidebar-widget a:hover { color: var(--sage-dark); }

/* ── FOOTER ── */
.site-footer {
  background: var(--sage-dark);
  color: rgba(255,255,255,0.7);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: #fff;
  margin-bottom: 0.75rem;
}
.footer-brand span { font-style: italic; color: var(--golden); }
.footer-desc { font-size: 0.85rem; line-height: 1.7; }
.footer-col-title {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  background: rgba(0,0,0,0.2);
  padding: 1rem 2rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ── SINGLE POST ── */
.single-post { max-width: 760px; margin: 0 auto; padding: 4rem 2rem; }
.post-header { margin-bottom: 2.5rem; }
.post-category {
  display: inline-block;
  background: var(--sage-light);
  color: var(--sage-dark);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.post-date { font-size: 0.8rem; color: var(--text-light); margin-top: 0.75rem; }
.post-content h2, .post-content h3 { margin: 2rem 0 1rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin: 1rem 0 1.25rem 1.5rem; color: var(--text-mid); }
.post-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.post-content img { border-radius: var(--radius-md); margin: 1.5rem 0; }
.post-featured-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
  height: 400px;
}
.post-featured-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── 404 / EMPTY STATES ── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-mid);
}
.empty-state h2 { margin-bottom: 1rem; }

/* ── SEARCH ── */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
}
.search-field {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 40px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  background: var(--warm-white);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s;
}
.search-field:focus { border-color: var(--sage); }
.search-submit {
  padding: 12px 20px;
  background: var(--sage-dark);
  color: #fff;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  transition: background 0.2s;
}
.search-submit:hover { background: var(--sage); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-left { padding: 5rem 3rem; }
  .with-sidebar { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-left { padding: 3.5rem 1.5rem; }
  .hero-right { height: 260px; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; padding: 2.5rem 1.5rem; gap: 2rem; }
  .footer-bottom { padding: 1rem 1.5rem; }
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; top: 64px; left: 0; right: 0; background: rgba(250,247,242,0.98); border-bottom: 1px solid var(--border); padding: 1rem; }
  .main-nav.open ul { flex-direction: column; gap: 0; }
  .main-nav.open a { display: block; padding: 12px 1rem; }
  .hamburger { display: flex; }
  .recipe-grid { grid-template-columns: 1fr; }
  .diet-row { grid-template-columns: 1fr 80px; }
  .diet-note { display: none; }
  .section { padding: 3rem 0; }
  .nav-lang { display: none; }
}
