/* ================================================
   QuickDish Modern Style 2025
   - Clean, magazine-inspired design
   - Supports Light / Dark themes
   ================================================ */

/* ---- Root variables ---- */
:root {
  /* Light theme */
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-border: #e6e6e6;
  --color-text: #222222;
  --color-muted: #666666;
  --color-accent: #e56a3e;
  --color-accent-hover: #c95c34;
  --color-badge: #f1f1f1;
  --shadow: rgba(0,0,0,0.08);

  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;

  --container-width: 1100px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1e1b1a;
    --color-surface: #2b2624;
    --color-border: #3b3532;
    --color-text: #f5f2ef;
    --color-muted: #aaa19b;
    --color-badge: #3b3532;
    --shadow: rgba(0,0,0,0.35);
  }
}

/* ---- Global Reset ---- */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.7;
  font-size: 16px;
  transition: background 0.3s, color 0.3s;
}

/* ---- Links ---- */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* ---- Header ---- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 8px var(--shadow);
}
header .site-title {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 16px 20px;
}
.logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, #ffd6bf 0, #ffc7a7 40%, #ffb58a 70%, #f7a376 100%);
  box-shadow: 0 4px 10px var(--shadow);
}
h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin: 0;
}

nav {
  display: flex;
  gap: 18px;
  justify-content: center;
  padding: 10px 0 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
}
nav a {
  color: var(--color-text);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}
nav a:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  margin: 0 auto 40px;
  max-width: var(--container-width);
  border-radius: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 20px var(--shadow);
  padding: 48px 36px;
  text-align: center;
}
.hero h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 0.6em;
}
.hero p {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 700px;
  margin: 0 auto 1.2em;
}
.hero .btn {
  background: var(--color-accent);
  color: #fff;
  padding: 0.8em 1.8em;
  border-radius: 0.5em;
  font-weight: 500;
  transition: background 0.3s;
}
.hero .btn:hover {
  background: var(--color-accent-hover);
}

/* ---- Main Container ---- */
main {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ---- Section Headings ---- */
.section {
  margin-bottom: 50px;
}
.section h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  border-left: 6px solid var(--color-accent);
  padding-left: 12px;
  margin-bottom: 22px;
}

/* ---- Grid Cards ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.card {
  display: block;
  background: var(--color-surface);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 10px var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px var(--shadow);
}
.card-img {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.card-img::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-body {
  padding: 1.4rem 1.6rem 1.8rem;
}
.card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 0.5em 0 0.4em;
}
.card-body p {
  color: var(--color-text);
  font-size: 0.95rem;
  margin: 0 0 0.5em;
}
.meta {
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ---- Recipe Detail Page ---- */
.recipe {
  background: var(--color-surface);
  border-radius: 18px;
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 18px var(--shadow);
  padding: 40px 50px;
  margin-bottom: 60px;
}
.recipe h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-top: 0;
}
.recipe .teaser {
  color: var(--color-muted);
  font-style: italic;
  margin-bottom: 1.2em;
}
.recipe img {
  width: 100%;
  border-radius: 12px;
  margin: 20px 0;
  object-fit: cover;
}
.recipe h3 {
  font-family: var(--font-heading);
  margin-top: 1.4em;
  font-size: 1.3rem;
}
.recipe ul, .recipe ol {
  margin-left: 1.6em;
  line-height: 1.7;
}
.recipe li {
  margin-bottom: 0.6em;
}

/* ---- Footer ---- */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  padding: 30px 20px 50px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  header .site-title {
    flex-direction: column;
    text-align: center;
  }
  .recipe {
    padding: 24px 20px;
  }
  .card-img {
    height: 200px;
  }
}
