/*
Theme Name: Recipe Kitchen
Theme URI: https://example.com
Description: A beautiful food recipe theme with daily recipe publishing
Author: Milan
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
License: GNU General Public License v2 or later
Text Domain: recipe-kitchen
*/

/* ============================================
   DESIGN TOKENS
   Palette: Deep forest green + warm cream + terracotta accent
   ============================================ */
:root {
  --color-bg:          #FAFAF7;
  --color-surface:     #FFFFFF;
  --color-forest:      #1E3A2F;
  --color-forest-mid:  #2E5540;
  --color-sage:        #7A9E8E;
  --color-cream:       #F5F0E8;
  --color-terracotta:  #C4622D;
  --color-terracotta-light: #E8855A;
  --color-text:        #1A1A18;
  --color-text-muted:  #6B6B66;
  --color-border:      #E2DDD6;

  --font-display:  'Playfair Display', 'Georgia', serif;
  --font-body:     'Inter', 'Helvetica Neue', sans-serif;
  --font-accent:   'Dancing Script', cursive;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --shadow-card: 0 2px 16px rgba(30,58,47,0.08), 0 1px 4px rgba(30,58,47,0.06);
  --shadow-hover: 0 8px 32px rgba(30,58,47,0.14), 0 2px 8px rgba(30,58,47,0.08);

  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--color-forest);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid-recipes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  background: var(--color-forest);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--color-terracotta);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.site-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.site-logo .logo-text span {
  color: var(--color-terracotta-light);
}

.site-nav ul {
  display: flex;
  gap: 8px;
}

.site-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-nav .current-menu-item a {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: white;
  font-size: 1.5rem;
}

/* ============================================
   HERO — HOMEPAGE
   ============================================ */
.hero {
  background: var(--color-forest);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(196,98,45,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(122,158,142,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-eyebrow {
  font-family: var(--font-accent);
  color: var(--color-terracotta-light);
  font-size: 1.3rem;
  margin-bottom: 16px;
  display: block;
}

.hero h1 {
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  color: var(--color-terracotta-light);
}

.hero-description {
  color: rgba(255,255,255,0.72);
  font-size: 1.1rem;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--color-terracotta);
  color: #fff;
  box-shadow: 0 4px 14px rgba(196,98,45,0.35);
}

.btn-primary:hover {
  background: #b5571f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196,98,45,0.45);
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--color-forest);
  border: 2px solid var(--color-forest);
}

.btn-outline:hover {
  background: var(--color-forest);
  color: #fff;
}

/* ============================================
   SECTION LAYOUT
   ============================================ */
.section {
  padding: 72px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-eyebrow {
  font-family: var(--font-accent);
  color: var(--color-terracotta);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ============================================
   RECIPE CARD
   ============================================ */
.recipe-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.recipe-card__image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-cream);
}

.recipe-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recipe-card:hover .recipe-card__image img {
  transform: scale(1.06);
}

.recipe-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--color-terracotta);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.recipe-card__badge--today {
  background: var(--color-forest);
}

.recipe-card__body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recipe-card__meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.recipe-card__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.recipe-card__meta-item .icon {
  font-size: 14px;
}

.recipe-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-forest);
  margin-bottom: 10px;
  line-height: 1.35;
  transition: color var(--transition);
}

.recipe-card:hover .recipe-card__title {
  color: var(--color-terracotta);
}

.recipe-card__excerpt {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.recipe-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.recipe-card__difficulty {
  display: flex;
  gap: 3px;
}

.recipe-card__difficulty .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}

.recipe-card__difficulty .dot.filled {
  background: var(--color-terracotta);
}

.recipe-card__link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-terracotta);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap var(--transition);
}

.recipe-card:hover .recipe-card__link {
  gap: 9px;
}

/* ============================================
   TODAY'S FEATURED RECIPE (Homepage)
   ============================================ */
.featured-today {
  background: var(--color-cream);
  padding: 72px 0;
}

.featured-recipe-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--color-border);
}

.featured-recipe-card__image {
  position: relative;
  min-height: 440px;
}

.featured-recipe-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-recipe-card__tag {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--color-terracotta);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.featured-recipe-card__content {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-recipe-card__date {
  font-size: 0.82rem;
  color: var(--color-sage);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.featured-recipe-card__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
  line-height: 1.2;
}

.featured-recipe-card__desc {
  color: var(--color-text-muted);
  margin-bottom: 28px;
  font-size: 1rem;
  line-height: 1.8;
}

.featured-recipe-card__stats {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--color-cream);
  border-radius: var(--radius-md);
}

.featured-stat {
  text-align: center;
  flex: 1;
}

.featured-stat__value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-forest);
  display: block;
}

.featured-stat__label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ============================================
   CATEGORY PILLS
   ============================================ */
.category-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.pill {
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--transition);
}

.pill:hover, .pill.active {
  background: var(--color-forest);
  color: #fff;
  border-color: var(--color-forest);
}

/* ============================================
   SINGLE RECIPE PAGE
   ============================================ */
.recipe-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
}

.recipe-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,58,47,0.9) 0%, rgba(30,58,47,0.3) 50%, transparent 100%);
}

.recipe-hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  padding: 40px;
}

.recipe-hero__category {
  display: inline-block;
  background: var(--color-terracotta);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.recipe-hero__title {
  color: white;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.recipe-hero__meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.recipe-hero__meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
}

.recipe-body {
  padding: 60px 0;
}

.recipe-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.recipe-sidebar {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 90px;
  border: 1px solid var(--color-border);
}

.recipe-sidebar h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}

.ingredients-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--color-text);
}

.ingredients-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-terracotta);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.ingredients-list li:last-child {
  border-bottom: none;
}

.recipe-instructions h2 {
  font-size: 1.6rem;
  margin-bottom: 28px;
}

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  margin-bottom: 32px;
  align-items: start;
}

.step__number {
  width: 44px;
  height: 44px;
  background: var(--color-forest);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.step__content {
  padding-top: 8px;
}

.step__content p {
  color: var(--color-text);
  line-height: 1.8;
}

.recipe-nutrition {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 36px 0;
  padding: 24px;
  background: var(--color-forest);
  border-radius: var(--radius-lg);
  color: white;
}

.nutrition-item {
  text-align: center;
}

.nutrition-item__value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  display: block;
}

.nutrition-item__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  background: var(--color-forest);
  padding: 36px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item__value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-terracotta-light);
  display: block;
}

.stat-item__label {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   NEWSLETTER / CTA SECTION
   ============================================ */
.cta-section {
  background: var(--color-terracotta);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '🍽️';
  position: absolute;
  top: -20px;
  left: 5%;
  font-size: 120px;
  opacity: 0.08;
}

.cta-section::after {
  content: '🌿';
  position: absolute;
  bottom: -20px;
  right: 5%;
  font-size: 120px;
  opacity: 0.08;
}

.cta-section h2 {
  color: white;
  margin-bottom: 12px;
}

.cta-section p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 220px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.95rem;
  outline: none;
  font-family: var(--font-body);
}

.newsletter-form .btn {
  background: var(--color-forest);
  color: white;
  white-space: nowrap;
}

.newsletter-form .btn:hover {
  background: var(--color-forest-mid);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-forest);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .site-logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
}

.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-weight: 700;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--color-terracotta-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================
   PAGE HEADER (Archives / Search)
   ============================================ */
.page-header {
  background: var(--color-cream);
  padding: 48px 0;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 20px 0 0;
}

.search-bar input {
  flex: 1;
  padding: 12px 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
}

.search-bar input:focus {
  border-color: var(--color-sage);
}

.search-bar .btn {
  background: var(--color-forest);
  color: white;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 48px 0 24px;
}

.pagination a,
.pagination span {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid var(--color-border);
  color: var(--color-text);
  transition: all var(--transition);
}

.pagination a:hover {
  background: var(--color-forest);
  color: white;
  border-color: var(--color-forest);
}

.pagination .current {
  background: var(--color-terracotta);
  color: white;
  border-color: var(--color-terracotta);
}

/* ============================================
   NO FEATURED IMAGE PLACEHOLDER
   ============================================ */
.no-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 240px;
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

/* ============================================
   COMMENTS / REVIEWS
   ============================================ */
.comment-form-wrap {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 48px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .recipe-layout {
    grid-template-columns: 1fr;
  }
  .recipe-sidebar {
    position: static;
  }
  .featured-recipe-card {
    grid-template-columns: 1fr;
  }
  .featured-recipe-card__image {
    min-height: 280px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
  .recipe-nutrition {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: block;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--color-forest);
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  }
  .site-nav.open ul {
    flex-direction: column;
  }
  .menu-toggle { display: flex; }
  .grid-recipes { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 72px; }
  .section { padding: 48px 0; }
  .featured-recipe-card__content { padding: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-actions { flex-direction: column; align-items: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
