/*
Theme Name: FreshDishDaily
Theme URI: https://freshdishdaily.com
Author: FreshDishDaily
Author URI: https://freshdishdaily.com
Description: A clean, modern, fully responsive WordPress theme for food recipe blogs. Inspired by Damn Delicious — script logo, serif headings, white background with black text and soft gray accents. Includes a custom "recipes" post type, recipe schema markup, sticky header, mobile hamburger menu, and Pinterest-friendly imagery.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: freshdishdaily
Tags: food, blog, recipes, custom-post-type, responsive, block-styles, wide-blocks, editor-style
*/

/* ===== Fonts ===== */
@import url("https://fonts.googleapis.com/css2?family=Allura&family=Playfair+Display:wght@400;700;900&family=Lato:wght@300;400;700;900&display=swap");

/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  color: #2e2e2e;
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: #d0762a; }
h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, serif;
  color: #1a1a1a;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }

::selection { background: rgba(208,118,42,0.32); }

/* ===== Layout ===== */
.fd-container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.fd-script { font-family: "Allura", cursive; font-weight: 400; line-height: 1; }
.fd-eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: #6b6b6b;
}
.fd-rule { height: 1px; background: #ececec; }

/* ===== Top bar ===== */
.fd-topbar { background: #1a1a1a; color: #f5f5f5; }
.fd-topbar .fd-container { display: flex; align-items: center; justify-content: space-between; height: 36px; font-size: 0.78rem; }
.fd-topbar a { opacity: 0.8; }
.fd-topbar a:hover { opacity: 1; color: #fff; }
.fd-topbar-social { display: flex; align-items: center; gap: 16px; }
.fd-topbar-social svg { width: 16px; height: 16px; fill: currentColor; }
.fd-topbar-newsletter { display: inline-flex; align-items: center; gap: 6px; }

/* ===== Main header ===== */
.fd-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #ececec;
}
.fd-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 80px; }
.fd-logo { font-family: "Allura", cursive; font-size: 2.5rem; line-height: 1; color: #1a1a1a; }
@media (min-width: 768px) { .fd-logo { font-size: 3rem; } }
.fd-nav { display: none; align-items: center; gap: 28px; }
@media (min-width: 1024px) { .fd-nav { display: flex; } }
.fd-nav a {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: #1a1a1a;
}
.fd-nav a:hover, .fd-nav .current-menu-item > a { color: #d0762a; }
.fd-nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 28px; }
.fd-header-actions { display: flex; align-items: center; gap: 12px; }
.fd-icon-btn { background: transparent; border: 0; cursor: pointer; padding: 8px; color: #1a1a1a; }
.fd-icon-btn:hover { color: #d0762a; }
.fd-mobile-toggle { display: inline-flex; }
@media (min-width: 1024px) { .fd-mobile-toggle { display: none; } }

.fd-mobile-menu { display: none; border-top: 1px solid #ececec; background: #fff; }
.fd-mobile-menu.is-open { display: block; }
.fd-mobile-menu ul { list-style: none; margin: 0; padding: 1rem 0; }
.fd-mobile-menu li { border-bottom: 1px solid #ececec; }
.fd-mobile-menu a { display: block; padding: 12px 0; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }

/* ===== Hero ===== */
.fd-hero { padding: 80px 0; text-align: center; border-bottom: 1px solid #ececec; }
.fd-hero .fd-script { font-size: 2rem; color: #d0762a; }
.fd-hero h1 { max-width: 880px; margin: 12px auto 0; font-size: clamp(2rem, 4vw, 3.5rem); }
.fd-hero p { max-width: 640px; margin: 16px auto 0; color: #6b6b6b; font-size: 1.05rem; }

/* ===== Search ===== */
.fd-search {
  display: flex; align-items: center; gap: 8px;
  margin: 28px auto 0; max-width: 420px;
  padding: 12px 16px; border: 1px solid #ececec;
}
.fd-search input { border: 0; outline: 0; width: 100%; background: transparent; font-size: 0.9rem; }
.fd-search svg { width: 16px; height: 16px; color: #6b6b6b; flex-shrink: 0; }

/* ===== Section heading ===== */
.fd-section-head { text-align: center; margin-bottom: 40px; }
.fd-section-head .fd-eyebrow { color: #d0762a; }
.fd-section-head h2 { margin-top: 8px; }
.fd-section-head .fd-bar { width: 64px; height: 1px; background: #1a1a1a; margin: 16px auto 0; }

/* ===== Recipe grid ===== */
.fd-section { padding: 64px 0; }
.fd-grid {
  display: grid; gap: 48px 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .fd-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .fd-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .fd-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.fd-card { display: block; }
.fd-card .fd-card-img { aspect-ratio: 4/5; overflow: hidden; background: #f5f5f5; }
.fd-card .fd-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms ease; }
.fd-card:hover .fd-card-img img { transform: scale(1.05); }
.fd-card-body { padding-top: 16px; text-align: center; }
.fd-card-body h3 { margin: 8px 0 8px; font-size: 1.4rem; line-height: 1.2; }
.fd-card-body .fd-eyebrow { color: #d0762a; }
.fd-card:hover h3 { color: #d0762a; }
.fd-card-excerpt { font-size: 0.9rem; color: #6b6b6b; padding: 0 12px; }

/* ===== Categories strip ===== */
.fd-categories { background: #f7f7f7; border-top: 1px solid #ececec; border-bottom: 1px solid #ececec; padding: 56px 0; }
.fd-categories-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .fd-categories-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .fd-categories-grid { grid-template-columns: repeat(5, 1fr); } }
.fd-category {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px; text-align: center; background: #fff; border: 1px solid #ececec;
}
.fd-category:hover { border-color: #d0762a; }
.fd-category .fd-emoji { font-size: 1.75rem; }
.fd-category h3 { margin: 12px 0 0; font-size: 1.1rem; }

/* ===== Two-col + sidebar ===== */
.fd-two-col { display: grid; gap: 48px; padding: 64px 0; }
@media (min-width: 1024px) { .fd-two-col { grid-template-columns: 1fr 320px; } }

.fd-list-card {
  display: grid; gap: 20px; grid-template-columns: 1fr;
  margin-bottom: 40px;
}
@media (min-width: 640px) { .fd-list-card { grid-template-columns: 200px 1fr; } }
.fd-list-card .fd-card-img { aspect-ratio: 4/3; }
.fd-list-meta { font-size: 0.78rem; color: #6b6b6b; margin-top: 12px; display: flex; gap: 16px; flex-wrap: wrap; }

.fd-sidebar > * + * { margin-top: 40px; }
.fd-newsletter { background: #f7f7f7; border: 1px solid #ececec; padding: 24px; text-align: center; }
.fd-newsletter .fd-script { font-size: 2rem; color: #d0762a; }
.fd-newsletter h3 { margin: 4px 0; font-size: 1.2rem; }
.fd-newsletter input { width: 100%; padding: 10px 12px; border: 1px solid #ececec; margin-top: 16px; font-size: 0.9rem; }
.fd-newsletter button {
  width: 100%; margin-top: 8px; padding: 12px 16px; background: #1a1a1a; color: #fff;
  border: 0; cursor: pointer; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.fd-newsletter button:hover { background: #d0762a; }
.fd-popular { list-style: none; padding: 0; margin: 0; }
.fd-popular li { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.fd-popular .fd-card-img { width: 64px; height: 64px; aspect-ratio: 1; flex-shrink: 0; }
.fd-popular .title { font-family: "Playfair Display", serif; font-size: 0.9rem; line-height: 1.3; }
.fd-ad-slot { border: 1px dashed #ececec; padding: 32px; text-align: center; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: #6b6b6b; }

/* ===== Single recipe ===== */
.fd-single { max-width: 760px; margin: 0 auto; padding: 56px 16px; }
.fd-single-header { text-align: center; }
.fd-single-header h1 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 12px; }
.fd-single-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; font-size: 0.8rem; color: #6b6b6b; margin-top: 24px; }
.fd-single-meta strong { color: #1a1a1a; }
.fd-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.fd-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; border: 1px solid #ececec; background: #fff; color: #1a1a1a;
}
.fd-btn:hover { border-color: #d0762a; color: #d0762a; }
.fd-btn--primary { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.fd-btn--primary:hover { background: #d0762a; border-color: #d0762a; color: #fff; }
.fd-feature-img { margin: 40px 0; aspect-ratio: 16/10; overflow: hidden; background: #f5f5f5; }
.fd-feature-img img { width: 100%; height: 100%; object-fit: cover; }
.fd-recipe-card { border-top: 2px solid #1a1a1a; border-bottom: 2px solid #1a1a1a; padding: 40px 0; margin-top: 56px; }
.fd-recipe-card .fd-recipe-head { text-align: center; margin-bottom: 40px; }
.fd-recipe-card .fd-script { font-size: 2rem; color: #d0762a; }
.fd-recipe-grid { display: grid; gap: 40px; }
@media (min-width: 768px) { .fd-recipe-grid { grid-template-columns: 1fr 1.6fr; } }
.fd-ingredients { list-style: none; padding: 0; margin: 0; }
.fd-ingredients li { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid #ececec; margin-bottom: 12px; font-size: 0.9rem; }
.fd-instructions { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.fd-instructions li { display: flex; gap: 16px; padding-bottom: 16px; font-size: 0.9rem; line-height: 1.7; }
.fd-instructions li::before {
  counter-increment: step; content: counter(step);
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 999px;
  background: #1a1a1a; color: #fff; font-family: "Playfair Display", serif;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700;
}
.fd-tips { background: #f7f7f7; padding: 32px; margin-top: 40px; }
.fd-tips ul { list-style: none; padding: 0; margin: 12px 0 0; }
.fd-tips li { padding: 6px 0; font-size: 0.9rem; }

/* ===== Footer ===== */
.fd-footer { border-top: 1px solid #ececec; margin-top: 80px; }
.fd-footer-inner { display: grid; gap: 40px; padding: 56px 0; }
@media (min-width: 768px) { .fd-footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.fd-footer .fd-script { font-size: 2.5rem; color: #1a1a1a; }
.fd-footer ul { list-style: none; padding: 0; margin: 0; }
.fd-footer li + li { margin-top: 10px; }
.fd-footer-social { display: flex; gap: 16px; margin-top: 16px; }
.fd-footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.fd-footer-bottom {
  border-top: 1px solid #ececec; padding: 24px 0;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: space-between;
  font-size: 0.78rem; color: #6b6b6b;
}
@media (min-width: 768px) { .fd-footer-bottom { flex-direction: row; } }

/* ===== WP defaults ===== */
.alignwide { width: 100%; max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.wp-block-image img { display: block; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

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