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

/* ==========================================================================
   DESIGN TOKENS & VARIABLES
   ========================================================================== */
:root {
  /* Light Theme Colors (Default) */
  --bg-primary: hsl(33, 30%, 97%);
  --bg-secondary: hsl(33, 20%, 94%);
  --bg-card: hsl(0, 0%, 100%);
  --bg-glass: rgba(255, 255, 255, 0.75);
  
  --text-primary: hsl(210, 11%, 15%);
  --text-secondary: hsl(210, 8%, 40%);
  --text-muted: hsl(210, 5%, 60%);
  
  --accent-color: hsl(14, 62%, 57%); /* Terracotta */
  --accent-hover: hsl(14, 62%, 47%);
  --accent-light: hsl(14, 62%, 93%);
  
  --sage-color: hsl(150, 25%, 25%); /* Forest/Sage Olive */
  --sage-light: hsl(150, 25%, 93%);
  
  --border-color: hsl(210, 10%, 90%);
  --border-glass: rgba(255, 255, 255, 0.4);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  
  /* Fonts */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-full: 9999px;
}

/* Dark Theme Overrides */
body.dark-theme {
  --bg-primary: hsl(210, 11%, 10%);
  --bg-secondary: hsl(210, 11%, 14%);
  --bg-card: hsl(210, 11%, 16%);
  --bg-glass: rgba(23, 25, 28, 0.75);
  
  --text-primary: hsl(33, 20%, 94%);
  --text-secondary: hsl(210, 5%, 75%);
  --text-muted: hsl(210, 5%, 55%);
  
  --accent-color: hsl(14, 62%, 62%);
  --accent-hover: hsl(14, 62%, 70%);
  --accent-light: hsl(14, 25%, 20%);
  
  --sage-color: hsl(150, 25%, 35%);
  --sage-light: hsl(150, 15%, 18%);
  
  --border-color: hsl(210, 10%, 22%);
  --border-glass: rgba(23, 25, 28, 0.4);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

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

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

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--border-radius-full);
  border: 2px solid var(--bg-secondary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ==========================================================================
   REUSABLE UTILITIES & LAYOUT
   ========================================================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  border-radius: var(--border-radius-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.btn-primary {
  background-color: var(--accent-color);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 107, 80, 0.3);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-accent {
  background-color: var(--accent-light);
  color: var(--accent-color);
}

.badge-sage {
  background-color: var(--sage-light);
  color: var(--sage-color);
}

.badge-vegan {
  background-color: hsl(120, 30%, 93%);
  color: hsl(120, 40%, 25%);
}

.badge-dessert {
  background-color: hsl(330, 40%, 94%);
  color: hsl(330, 60%, 40%);
}

.badge-drinks {
  background-color: hsl(180, 35%, 93%);
  color: hsl(180, 50%, 25%);
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Dark Mode Toggle Button */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background-color: var(--border-color);
  transform: scale(1.05);
}

.theme-toggle .sun-icon {
  display: none;
}
.theme-toggle .moon-icon {
  display: block;
}

body.dark-theme .theme-toggle .sun-icon {
  display: block;
}
body.dark-theme .theme-toggle .moon-icon {
  display: none;
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full);
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Mobile Menu Active State */
.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   HOMEPAGE: HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 3rem 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--accent-light);
  color: var(--accent-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  font-size: 0.9rem;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
}

.hero-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  width: 100%;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-meta-item i {
  color: var(--accent-color);
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.hero-image-wrapper:hover img {
  transform: scale(1.05);
}

/* ==========================================================================
   HOMEPAGE: SEARCH & FILTERS
   ========================================================================== */
.filter-section {
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.filter-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  flex-wrap: nowrap; /* Force one row */
}

.search-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 320px;
}

.search-input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 3rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full);
  background-color: var(--bg-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.category-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap; /* Keep items in one line */
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  flex-grow: 1;
  align-items: center;
  padding: 0.25rem 0;
}

.category-tags::-webkit-scrollbar {
  display: none; /* WebKit browser scrollbar hiding */
}

/* Mobile responsive inline row logic */
@media (max-width: 768px) {
  .filter-bar {
    gap: 0.75rem;
  }
  .search-wrapper {
    width: 180px;
  }
}

@media (max-width: 480px) {
  .search-wrapper {
    width: 140px;
  }
  .cat-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

.cat-btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.cat-btn:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-muted);
}

.cat-btn.active {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

/* ==========================================================================
   HOMEPAGE: RECIPE GRID
   ========================================================================== */
.recipe-section {
  padding: 3rem 0;
}

.grid-title {
  margin-bottom: 2rem;
  font-size: 2.25rem;
}

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

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

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

.card-img-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.recipe-card:hover .card-img-wrapper img {
  transform: scale(1.08);
}

.card-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.75rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-title a:hover {
  color: var(--accent-color);
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--border-radius-full);
  object-fit: cover;
}

.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-color);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.card-link:hover {
  color: var(--accent-hover);
}

.card-link i {
  transition: transform var(--transition-fast);
}

.card-link:hover i {
  transform: translateX(3px);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  display: none;
}

.no-results i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ==========================================================================
   RECIPE DETAIL PAGE
   ========================================================================== */
.recipe-hero {
  padding: 3rem 0 2rem;
}

.recipe-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.recipe-detail-title {
  font-size: 3.5rem;
  line-height: 1.15;
}

.recipe-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.recipe-top-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  justify-content: center;
}

.recipe-detail-image-wrapper {
  width: 100%;
  max-height: 600px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
}

.recipe-detail-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-body-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 3rem;
  align-items: start;
}

.recipe-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-right: 1px solid var(--border-color);
}

.stat-box:last-child {
  border-right: none;
}

.stat-box .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.stat-box .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Ingredients Section */
.ingredients-card {
  padding: 2rem;
  margin-bottom: 2rem;
}

.section-subtitle {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.servings-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: var(--border-radius-full);
}

.servings-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--border-radius-full);
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.servings-btn:hover {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

.servings-count {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

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

.ingredient-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-card);
  color: transparent;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.ingredient-item:hover .ingredient-checkbox {
  border-color: var(--accent-color);
}

.ingredient-item.checked .ingredient-checkbox {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
}

.ingredient-text {
  font-size: 1.05rem;
  transition: color var(--transition-fast), text-decoration var(--transition-fast);
}

.ingredient-item.checked .ingredient-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

.qty {
  font-weight: 600;
  color: var(--accent-color);
}

/* Instructions Section */
.instructions-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.instruction-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.instruction-step:last-child {
  border-bottom: none;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-full);
  background-color: var(--accent-light);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.step-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Sidebar Sections */
.recipe-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  padding: 1.75rem;
}

.widget-title {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: 0.5rem;
}

.nutrition-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nutrition-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border-color);
}

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

.nutrition-label {
  color: var(--text-secondary);
}

.nutrition-value {
  font-weight: 600;
}

.author-widget-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.author-widget-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--border-radius-full);
  object-fit: cover;
  border: 3px solid var(--accent-light);
}

.author-widget-name {
  font-size: 1.2rem;
  font-weight: 700;
}

.author-widget-bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   ABOUT & CONTACT PAGES
   ========================================================================== */
.info-page-hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.info-page-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.info-page-hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  padding: 4rem 0;
  align-items: center;
}

.about-image {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.about-content h2 {
  font-size: 2.25rem;
  color: var(--text-primary);
}

.contact-section-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  padding: 3rem 0 6rem;
}

.contact-info-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-full);
  background-color: var(--accent-light);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-info-details p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-form-card {
  padding: 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

/* ==========================================================================
   NEWSLETTER & FOOTER
   ========================================================================== */
.newsletter-section {
  padding: 5rem 0;
}

.newsletter-panel {
  padding: 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.newsletter-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 60%);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.newsletter-title {
  font-size: 2.75rem;
  max-width: 600px;
}

.newsletter-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 500px;
  margin-top: 1rem;
}

.newsletter-input {
  flex-grow: 1;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full);
  background-color: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.newsletter-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  transition: background-color var(--transition-normal);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-logo span {
  color: var(--accent-color);
}

.footer-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.footer-col-title {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-color);
  padding-left: 4px;
}

.footer-links a {
  transition: all var(--transition-fast);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TOAST NOTIFICATION (Newsletter Feedback)
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  background-color: #2e7d32; /* Success green */
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
}

.toast-error {
  background-color: #c62828;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-image-wrapper {
    order: -1;
    aspect-ratio: 16/9;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-image {
    max-height: 400px;
  }
  .recipe-body-grid {
    grid-template-columns: 1fr;
  }
  .recipe-sidebar {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--bg-primary);
    flex-direction: column;
    padding: 3rem 2rem;
    gap: 2rem;
    align-items: flex-start;
    border-top: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
  }
  .nav-links.active {
    transform: translateX(0);
  }
  .mobile-menu-btn {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .recipe-quick-stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat-box {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
  }
  .stat-box:nth-child(3), .stat-box:nth-child(4) {
    border-bottom: none;
    padding-bottom: 0;
  }
  .newsletter-panel {
    padding: 2.5rem 1.5rem;
  }
  .newsletter-form {
    flex-direction: column;
    gap: 0.75rem;
  }
  .newsletter-input {
    border-radius: var(--border-radius-md);
  }
  .btn-primary {
    border-radius: var(--border-radius-md);
  }
  .info-page-hero h1 {
    font-size: 2.75rem;
  }
  .contact-form-card {
    padding: 2rem 1.5rem;
  }
}

/* ==========================================================================
   PREMIUM FEATURES: SAVES, PIN SHARE, & PRINT
   ========================================================================== */

/* Card Favorite Button */
.card-favorite-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-full);
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.card-favorite-btn:hover {
  transform: scale(1.1);
  background: var(--bg-card);
  border-color: var(--accent-color);
}

.card-favorite-btn.active i {
  color: #e53935;
  font-weight: 900;
}

/* Detail Recipe Actions */
.recipe-action-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.action-btn:hover {
  transform: translateY(-2px);
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
}

.action-btn-pinterest {
  background-color: #bd081c;
  color: #ffffff;
  border-color: #bd081c;
}

.action-btn-pinterest:hover {
  background-color: #ad071a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(189, 8, 28, 0.3);
}

.action-btn-favorite.active i {
  color: #e53935;
  font-weight: 900;
}

/* AdSense Placeholders */
.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-md);
  margin: 2rem 0;
  padding: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ad-placeholder::before {
  content: 'ADVERTISEMENT';
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.ad-leaderboard {
  min-height: 90px;
  width: 100%;
}

.ad-sidebar {
  min-height: 250px;
  width: 100%;
  margin: 1.5rem 0;
}

/* Pagination Styling */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0 1rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 0.5rem;
  border-radius: var(--border-radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Accordion FAQs */
.faq-section {
  margin-top: 3rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--text-secondary);
}

.faq-trigger {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  font-size: 0.9rem;
  transition: transform var(--transition-medium);
  color: var(--accent-color);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium) ease-out;
  padding: 0 1.5rem;
}

.faq-content p {
  padding-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.975rem;
}

.faq-item.active .faq-content {
  max-height: 500px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Equipment & Chef Tips List */
.recipe-extra-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

@media (max-width: 768px) {
  .recipe-extra-section {
    grid-template-columns: 1fr;
  }
}

.extra-card {
  padding: 1.5rem;
  height: 100%;
}

.extra-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.extra-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.extra-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.extra-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* Print Styles */
@media print {
  /* Global Page Margins */
  @page {
    margin: 1.5cm;
  }
  
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-family: 'Times New Roman', Georgia, serif !important;
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
  }

  /* Hide web-only elements */
  .header, .footer, .newsletter-section, .recipe-sidebar, .theme-toggle, 
  .mobile-menu-btn, .servings-control, .ingredient-checkbox, .toast, 
  .recipe-action-bar, .btn, .card-link, .card-author, .recipe-top-meta,
  .badge {
    display: none !important;
  }

  /* Printable Header Branding */
  .recipe-hero::before {
    content: "THE SPICED SPOON";
    display: block;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14pt;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-align: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .recipe-hero {
    padding: 0 !important;
  }

  /* Header Layout: Title left, Image thumbnail right */
  .recipe-header-content {
    margin-bottom: 1rem !important;
    text-align: left !important;
    width: 65% !important;
    float: left !important;
  }

  .recipe-detail-title {
    font-size: 22pt !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
    margin-bottom: 0.25rem !important;
    color: #000000 !important;
  }

  .recipe-subtitle {
    font-size: 11pt !important;
    font-style: italic !important;
    color: #555555 !important;
    margin-bottom: 0.5rem !important;
  }

  .recipe-detail-image-wrapper {
    width: 30% !important;
    float: right !important;
    height: 120px !important;
    margin-bottom: 1rem !important;
    border: 1px solid #dddddd !important;
    border-radius: 4px !important;
    overflow: hidden !important;
  }

  .recipe-detail-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  /* Clear floats and reset block */
  .recipe-body-grid {
    clear: both !important;
    display: block !important;
    width: 100% !important;
  }

  /* Quick Stats Print Card */
  .recipe-quick-stats {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    border: 1px solid #000000 !important;
    border-radius: 4px !important;
    background: #f9f9f9 !important;
    padding: 0.5rem !important;
    margin: 1.5rem 0 !important;
    page-break-inside: avoid;
  }

  .stat-box {
    border-right: 1px solid #cccccc !important;
    border-bottom: none !important;
    padding: 0.25rem !important;
    text-align: center !important;
  }

  .stat-box:last-child {
    border-right: none !important;
  }

  .stat-label {
    font-size: 8pt !important;
    text-transform: uppercase !important;
    color: #555555 !important;
  }

  .stat-value {
    font-size: 11pt !important;
    font-weight: bold !important;
    color: #000000 !important;
  }

  /* Culinary extras */
  .recipe-extra-section {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
    margin: 1rem 0 !important;
    page-break-inside: avoid;
  }

  .extra-card {
    border: 1px solid #cccccc !important;
    border-radius: 4px !important;
    padding: 1rem !important;
    background: transparent !important;
  }

  .extra-title {
    font-size: 11pt !important;
    font-weight: bold !important;
    margin-bottom: 0.5rem !important;
    border-bottom: 1px solid #cccccc !important;
    padding-bottom: 0.25rem !important;
    color: #000000 !important;
  }

  .extra-list li {
    font-size: 9.5pt !important;
    margin-bottom: 0.25rem !important;
  }

  /* Ingredients Print layout with neat checkbox squares */
  .ingredients-card {
    box-shadow: none !important;
    border: 1px solid #000000 !important;
    background: transparent !important;
    padding: 1.25rem !important;
    margin: 1.5rem 0 !important;
    page-break-inside: avoid;
  }

  .section-subtitle {
    font-size: 13pt !important;
    font-weight: bold !important;
    margin-bottom: 0.75rem !important;
    border-bottom: 1.5px solid #000000 !important;
    padding-bottom: 0.25rem !important;
    color: #000000 !important;
  }

  .ingredient-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem 1rem !important;
  }

  .ingredient-item {
    display: flex !important;
    align-items: center !important;
    padding: 0.25rem 0 !important;
    border-bottom: none !important;
  }

  /* Print neat checkboxes as character markers */
  .ingredient-item::before {
    content: "☐" !important;
    font-size: 12pt !important;
    margin-right: 0.5rem !important;
    color: #000000 !important;
    font-family: Arial, sans-serif !important;
  }

  .ingredient-text {
    font-size: 9.5pt !important;
  }

  /* Instructions */
  .instructions-section {
    margin-top: 1.5rem !important;
  }

  .instruction-step {
    page-break-inside: avoid !important;
    display: flex !important;
    gap: 1rem !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #eeeeee !important;
  }

  .step-number {
    flex-shrink: 0 !important;
    width: 20pt !important;
    height: 20pt !important;
    border: 1.5px solid #000000 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10pt !important;
    font-weight: bold !important;
    color: #000000 !important;
    background: transparent !important;
  }

  .step-details {
    flex-grow: 1 !important;
  }

  .step-title {
    font-size: 11pt !important;
    font-weight: bold !important;
    margin-bottom: 0.2rem !important;
    color: #000000 !important;
  }

  .step-text {
    font-size: 9.5pt !important;
    color: #222222 !important;
  }

  /* FAQs */
  .faq-section {
    margin-top: 2rem !important;
  }

  .faq-item {
    border: none !important;
    border-bottom: 1px solid #cccccc !important;
    margin-bottom: 0.5rem !important;
    page-break-inside: avoid !important;
  }

  .faq-trigger {
    padding: 0.5rem 0 !important;
    font-size: 10pt !important;
    font-weight: bold !important;
    display: block !important;
    color: #000000 !important;
  }

  .faq-icon {
    display: none !important;
  }

  .faq-content {
    max-height: none !important;
    display: block !important;
    padding: 0.25rem 0 0.5rem 0 !important;
  }

  .faq-content p {
    font-size: 9.5pt !important;
    padding-bottom: 0 !important;
    color: #333333 !important;
  }

  /* Ad blocks are hidden */
  .ad-placeholder {
    display: none !important;
  }

  /* Printed Page Footer Metadata */
  body::after {
    content: "Printed from The Spiced Spoon (https://thespicedspoon.com) • Cook with Passion" !important;
    display: block !important;
    font-family: Arial, sans-serif !important;
    font-size: 8pt !important;
    color: #777777 !important;
    text-align: center !important;
    border-top: 1px solid #dddddd !important;
    padding-top: 0.5rem !important;
    margin-top: 2rem !important;
    page-break-before: avoid !important;
  }
}

