/*
Theme Name: Resep Rehatku
Theme URI: https://resep.rehatku.com
Author: Antigravity
Author URI: https://antigravity.dev
Description: Tema WordPress kuliner modern minimalis untuk Resep Rehatku. Desain premium dengan fokus pada foto makanan yang memukau.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: resep-rehatku
Tags: food, culinary, blog, responsive, custom-menu, featured-images
*/

/* ================================================
   RESEP REHATKU — Premium Culinary CSS
   ================================================ */

/* --- GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ================================================
   CSS VARIABLES
   ================================================ */
:root {
  /* Brand Colors — Navy & Orange Palette */
  --brand-primary:    #2C3E50;   /* Navy Blue */
  --brand-primary-dk: #1A252F;   /* Darker Navy */
  --brand-accent:     #E67E22;   /* Bright Orange */
  --brand-accent-lt:  #F39C12;   /* Lighter Orange */
  --brand-gold:       #E67E22;   /* Matching Orange for gold elements */
  --brand-warm:       #FDFBF9;   /* Warm off-white */

  /* Text Colors */
  --text-primary:     #2D2A26;   /* Warm dark */
  --text-secondary:   #5E5A54;   /* Warm grey */
  --text-muted:       #9E9890;   /* Muted warm */
  --text-on-dark:     #FAF7F2;   /* Off-white on dark */

  /* Background Colors */
  --bg-body:          #FAFAF7;   /* Warm off-white */
  --bg-white:         #FFFFFF;
  --bg-card:          #FFFFFF;
  --bg-section:       #F7F3EE;   /* Warm section bg */

  /* Borders & Shadows */
  --border-light:     #EDE8E1;
  --border-medium:    #D9D2C9;
  --shadow-xs:        0 1px 4px rgba(45,42,38,0.05);
  --shadow-sm:        0 2px 12px rgba(45,42,38,0.07);
  --shadow-md:        0 8px 30px rgba(45,42,38,0.10);
  --shadow-lg:        0 16px 56px rgba(45,42,38,0.14);
  --shadow-brand:     0 8px 32px rgba(91,117,83,0.22);

  /* Radius */
  --radius-xs:        6px;
  --radius-sm:        10px;
  --radius-md:        16px;
  --radius-lg:        24px;
  --radius-pill:      999px;

  /* Typography */
  --font-display:     'Playfair Display', Georgia, serif;
  --font-body:        'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --header-h:         70px;
  --container-max:    1140px;

  /* Transitions */
  --ease:             cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:      cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition:       0.3s var(--ease);
  --transition-slow:  0.5s var(--ease);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--text-primary);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Scroll animation base state */
.anim-ready {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease-bounce);
}
.anim-ready.anim-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   HEADER
   ================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}

/* Admin Bar offset — Desktop */
.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

/* ---- LOGO ---- */
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-icon-wrap {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(91,117,83,0.30);
}

.logo-icon-wrap svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.logo-text {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1.1;
  white-space: nowrap;
}

.logo-text .logo-accent {
  color: var(--brand-accent);
}

.logo-text-sub {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Custom logo image */
.custom-logo-link img,
.custom-logo {
  max-height: 48px;
  width: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
}

/* ---- MAIN NAV ---- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* WordPress nav menu list */
.wp-nav-menu-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wp-nav-menu-list > li {
  position: relative;
}

.wp-nav-menu-list > li > a,
.nav-link {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.wp-nav-menu-list > li > a:hover,
.nav-link:hover {
  color: var(--brand-primary);
  background: var(--bg-section);
}

.wp-nav-menu-list > li.current-menu-item > a,
.nav-link.active {
  color: var(--brand-primary);
  font-weight: 600;
}

/* Dropdown sub-menu */
.wp-nav-menu-list ul.sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s var(--ease);
  z-index: 300;
  list-style: none;
}

.wp-nav-menu-list > li:hover > ul.sub-menu,
.wp-nav-menu-list > li:focus-within > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wp-nav-menu-list ul.sub-menu li > a {
  display: block;
  padding: 9px 20px;
  font-size: 0.87rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

.wp-nav-menu-list ul.sub-menu li > a:hover {
  background: var(--bg-section);
  color: var(--brand-primary);
}

/* Search button in nav */
.nav-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  background: transparent;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.nav-search-btn:hover {
  background: var(--bg-section);
  color: var(--brand-primary);
}

/* ---- HAMBURGER ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  transition: background var(--transition);
}

.hamburger:hover {
  background: var(--bg-section);
}

.hamburger span {
  display: block;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), width 0.3s var(--ease);
}

.hamburger span:nth-child(3) {
  width: 65%;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5.5px, 5.5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  width: 100%;
  transform: rotate(-45deg) translate(5.5px, -5.5px);
}

/* ---- HEADER SEARCH BAR ---- */
.header-search-bar {
  background: var(--bg-section);
  border-top: 1px solid var(--border-light);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), padding 0.35s var(--ease);
}

.header-search-bar.open {
  max-height: 90px;
  padding: 14px 0;
}

.header-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-search-form input {
  flex: 1;
  padding: 11px 18px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg-white);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header-search-form input:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(198,123,75,0.12);
}

.header-search-form input::placeholder {
  color: var(--text-muted);
}

.header-search-form button {
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.88rem;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}

.header-search-form button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ================================================
   HERO SECTION — 2-COLUMN SPLIT LAYOUT
   ================================================ */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 88vh;
  gap: 0;
  overflow: hidden;
}

/* ---- LEFT PANEL ---- */
.hero-left {
  padding: 5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dk) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-left::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

.hero-left::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,126,34,0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: float 5s ease-in-out 1s infinite;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(91, 117, 83, 0.25);
  color: #B5D4A8;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  width: fit-content;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 3.5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: white;
  font-weight: 700;
}

.hero-title em {
  color: var(--brand-gold);
  font-style: italic;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  max-width: 420px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dk));
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  font-family: var(--font-body);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(91,117,83,0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(91,117,83,0.35);
  color: white;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-ghost {
  background: none;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font-body);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: #C9A84C;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ---- RIGHT PANEL: MOSAIC GRID ---- */
.hero-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 3px;
  background: #1A1F18;
  min-height: 88vh;
}

.mosaic-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #1E2A1A;
  display: block;
}

.mosaic-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
  display: block;
}

.mosaic-card:hover img {
  transform: scale(1.08);
  filter: brightness(1.06) saturate(1.1);
}

/* Tall card spans 2 rows */
.mosaic-card.tall {
  grid-row: span 2;
}

/* Wide card spans 2 columns */
.mosaic-card.wide {
  grid-column: span 2;
}

.mosaic-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(18, 26, 16, 0.85));
  backdrop-filter: blur(2px);
  font-family: var(--font-display);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  transform: translateY(4px);
  transition: transform 0.4s var(--ease);
}

.mosaic-card:hover .mosaic-label {
  transform: translateY(0);
}

.mosaic-label.small {
  font-size: 0.9rem;
}

.mosaic-badge {
  display: inline-block;
  background: var(--brand-primary);
  color: white;
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
  width: fit-content;
}

/* Fallback placeholder when no image */
.mosaic-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: linear-gradient(135deg, #1E2A1A, #2A3D25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* ---- TICKER ---- */
.hero-ticker {
  background: var(--brand-primary);
  color: white;
  padding: 10px 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-inner {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: ticker 25s linear infinite;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticker-dot {
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ================================================
   SECTION HEADER
   ================================================ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-gold));
  border-radius: 3px;
  transition: width 0.4s var(--ease);
}

.section-header:hover .section-title::after {
  width: 80px;
}

.section-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-accent);
  border: 1.5px solid var(--brand-accent);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.section-link:hover {
  background: var(--brand-accent);
  color: #fff;
}

/* ================================================
   FEATURED RECIPES — 3-COLUMN GRID
   ================================================ */
.featured-section {
  padding: 52px 0 40px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.recipe-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: rgba(91,117,83,0.15);
}

.recipe-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #f0ece8;
}

.recipe-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}

.recipe-card:hover .recipe-card-thumb img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

.recipe-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fde8d8, #fff3ee);
  font-size: 3.5rem;
}

.recipe-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  z-index: 1;
}

.recipe-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.recipe-card-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  transition: color var(--transition);
}

.recipe-card-title:hover {
  color: var(--brand-primary);
}

.recipe-card-excerpt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.recipe-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.recipe-meta-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ================================================
   MAIN CONTENT LAYOUT
   ================================================ */
.main-area {
  padding: 48px 0 60px;
  flex: 1;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  align-items: start;
}

/* ================================================
   LATEST RECIPES — LEFT COLUMN
   ================================================ */
.latest-section {
  /* takes up full left column width */
}

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.recipe-list-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  border-radius: var(--radius-xs);
}

.recipe-list-item:last-child {
  border-bottom: none;
}

.recipe-list-item:hover {
  background: var(--bg-section);
  padding-left: 8px;
  padding-right: 8px;
  margin: 0 -8px;
}

.recipe-list-thumb {
  flex-shrink: 0;
  width: 90px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f0ece8;
}

.recipe-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.recipe-list-item:hover .recipe-list-thumb img {
  transform: scale(1.06);
}

.recipe-list-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #fde8d8, #fff3ee);
}

.recipe-list-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.recipe-list-cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--brand-accent);
}

.recipe-list-title {
  font-family: var(--font-display);
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  transition: color var(--transition);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-list-title:hover {
  color: var(--brand-primary);
}

.recipe-list-excerpt {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-list-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recipe-list-date {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* ================================================
   SIDEBAR — RIGHT COLUMN
   ================================================ */
.content-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.admin-bar .content-sidebar {
  top: calc(var(--header-h) + 32px + 24px);
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform var(--transition), box-shadow var(--transition);
}

.sidebar-widget:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--brand-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.widget-title svg {
  width: 16px;
  height: 16px;
  color: var(--brand-primary);
  flex-shrink: 0;
}

/* Sidebar Search */
.sidebar-search-wrap {
  display: flex;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.sidebar-search-wrap:focus-within {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(198,123,75,0.12);
}

.sidebar-search-wrap input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.87rem;
  color: var(--text-primary);
  background: transparent;
}

.sidebar-search-wrap input::placeholder {
  color: var(--text-muted);
}

.sidebar-search-wrap button {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.sidebar-search-wrap button:hover {
  opacity: 0.88;
}

.sidebar-search-wrap button svg {
  width: 15px;
  height: 15px;
}

/* Sidebar Popular */
.popular-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.popular-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.popular-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-rank {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-primary);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.3;
}

.popular-item:nth-child(1) .popular-rank { color: var(--brand-accent); font-size: 1.1rem; }
.popular-item:nth-child(2) .popular-rank { color: #9a9a9a; }
.popular-item:nth-child(3) .popular-rank { color: #c0834a; }

.popular-info {
  flex: 1;
  min-width: 0;
}

.popular-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
  background: #f0ece8;
}

.popular-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #fde8d8, #fff3ee);
}

.popular-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  transition: color var(--transition);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-title:hover {
  color: var(--brand-primary);
}

.popular-cat {
  font-size: 0.71rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Sidebar Categories */
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), padding-left var(--transition);
  cursor: pointer;
}

.cat-list li:last-child .cat-item {
  border-bottom: none;
  padding-bottom: 0;
}

.cat-item:hover {
  color: var(--brand-primary);
  padding-left: 5px;
}

.cat-count {
  font-size: 0.72rem;
  background: var(--bg-section);
  color: var(--text-muted);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  flex-shrink: 0;
}

/* Ad / Banner space */
.sidebar-banner {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  padding: 28px 22px;
  text-align: center;
  color: #fff;
}

.sidebar-banner-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.sidebar-banner h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.sidebar-banner p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  margin-bottom: 14px;
}

.sidebar-banner-btn {
  display: inline-block;
  padding: 9px 22px;
  background: #fff;
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: var(--radius-pill);
  transition: opacity var(--transition), transform var(--transition);
}

.sidebar-banner-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  color: var(--brand-primary);
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.85);
  margin-top: auto;
}

.footer-inner {
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.footer-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo-icon svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.footer-logo-text .logo-accent {
  color: var(--brand-accent-lt);
}

.footer-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav ul li a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  transition: color var(--transition), background var(--transition);
}

.footer-nav ul li a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  text-align: right;
}

/* ================================================
   SINGLE POST PAGE
   ================================================ */
.single-post-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  padding: 40px 0 60px;
}

.single-post-header {
  margin-bottom: 24px;
}

.single-post-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.single-post-cat-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-section);
  color: var(--brand-primary);
  border: 1px solid rgba(91,117,83,0.2);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background var(--transition), color var(--transition);
}

.single-post-cat-badge:hover {
  background: var(--brand-primary);
  color: #fff;
}

.single-post-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 14px;
}

.single-post-meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
}

.single-post-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.single-post-meta svg {
  width: 13px;
  height: 13px;
}

.single-post-thumbnail {
  margin-bottom: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.single-post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.single-post-body {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.single-post-body h2,
.single-post-body h3,
.single-post-body h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 12px;
}

.single-post-body h2 { font-size: 1.4rem; }
.single-post-body h3 { font-size: 1.2rem; }

.single-post-body p {
  margin-bottom: 18px;
}

.single-post-body img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
}

.single-post-body ul,
.single-post-body ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.single-post-body ul { list-style: disc; }
.single-post-body ol { list-style: decimal; }

.single-post-body li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.single-post-body blockquote {
  border-left: 4px solid var(--brand-accent);
  background: var(--bg-section);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* ================================================
   ARCHIVE / CATEGORY PAGE
   ================================================ */
.archive-header {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  padding: 40px 0 36px;
  margin-bottom: 0;
}

.archive-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.archive-description {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin-top: 6px;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 36px 0 48px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0 0 48px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1.5px solid var(--border-medium);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.pagination .current {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  font-weight: 700;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr 280px;
    gap: 28px;
  }
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .content-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .single-post-container {
    grid-template-columns: 1fr;
  }
}

/* ============ MOBILE (≤768px) ============ */
@media (max-width: 768px) {

  /* Admin Bar */
  .admin-bar .site-header {
    top: 46px;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Mobile nav — slide-down */
  .main-nav {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 2px solid var(--brand-primary);
    box-shadow: var(--shadow-md);
    z-index: 150;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.38s var(--ease), padding 0.38s var(--ease);
    padding: 0 20px;
  }

  .admin-bar .main-nav {
    top: calc(var(--header-h) + 46px);
  }

  .main-nav.open {
    max-height: 500px;
    padding: 12px 20px 20px;
    pointer-events: auto;
  }

  /* WordPress menu list in mobile */
  .wp-nav-menu-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2px;
  }

  .wp-nav-menu-list > li {
    width: 100%;
  }

  .wp-nav-menu-list > li > a,
  .nav-link {
    display: block;
    padding: 12px 14px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

  /* Submenu in mobile */
  .wp-nav-menu-list ul.sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--brand-accent);
    border-radius: 0;
    padding: 4px 0 4px 12px;
    display: none;
  }

  /* Search button mobile */
  .nav-search-btn {
    width: 100%;
    height: auto;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    gap: 8px;
  }

  .nav-search-btn::after {
    content: 'Cari Resep';
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
  }

  /* Hero — stack to single column on mobile */
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-left {
    padding: 3.5rem 1.5rem 3rem;
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .hero-right {
    min-height: 340px;
    grid-template-rows: 1fr 1fr 1fr;
  }

  /* Featured */
  .featured-section {
    padding: 36px 0 28px;
  }

  .featured-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  /* Content sidebar to single col */
  .content-sidebar {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    padding: 28px 0;
  }

  .footer-nav ul {
    justify-content: center;
  }

  .footer-copy {
    text-align: center;
  }
}

@media (max-width: 500px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .hero-right {
    min-height: 280px;
  }

  .mosaic-label {
    font-size: 0.85rem;
    padding: 1rem 0.75rem 0.75rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }

  .recipe-list-item {
    gap: 12px;
  }

  .recipe-list-thumb {
    width: 72px;
    height: 58px;
  }
}

/* ================================================
   ANIMATIONS & KEYFRAMES
   ================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91,117,83,0); }
  50%      { box-shadow: 0 0 0 6px rgba(91,117,83,0.12); }
}

@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-8deg) scale(0.9); }
  to   { opacity: 1; transform: rotate(0deg) scale(1); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Staggered recipe card animations */
.recipe-card:nth-child(1) { animation: fadeInScale 0.6s var(--ease) 0.0s both; }
.recipe-card:nth-child(2) { animation: fadeInScale 0.6s var(--ease) 0.15s both; }
.recipe-card:nth-child(3) { animation: fadeInScale 0.6s var(--ease) 0.3s both; }

/* Hero animations */
.hero-eyebrow   { animation: fadeInUp 0.7s var(--ease) 0.1s both; }
.hero-title     { animation: fadeInUp 0.7s var(--ease) 0.25s both; }
.hero-desc      { animation: fadeInUp 0.7s var(--ease) 0.4s both; }
.hero-actions   { animation: fadeInUp 0.7s var(--ease) 0.55s both; }
.hero-stats     { animation: fadeInUp 0.7s var(--ease) 0.7s both; }
.hero-stats .stat-val { animation: countUp 0.5s var(--ease) 0.9s both; }

/* Mosaic card entrance */
.mosaic-card:nth-child(1) { animation: fadeIn 0.6s var(--ease) 0.2s both; }
.mosaic-card:nth-child(2) { animation: fadeIn 0.6s var(--ease) 0.35s both; }
.mosaic-card:nth-child(3) { animation: fadeIn 0.6s var(--ease) 0.5s both; }
.mosaic-card:nth-child(4) { animation: fadeIn 0.6s var(--ease) 0.65s both; }

/* Badge pulse on hover */
.recipe-badge:hover,
.mosaic-badge:hover {
  animation: gentlePulse 0.6s var(--ease-bounce);
}

/* Logo float animation */
.logo-icon-wrap {
  animation: float 4s ease-in-out infinite;
}

/* Section title entrance */
.section-title {
  animation: slideInLeft 0.6s var(--ease) both;
}

/* Footer entrance */
.site-footer {
  animation: fadeIn 0.8s var(--ease) both;
}
