/*
Theme Name: My Homemade Recipe
Theme URI: https://example.com/myhomemaderecipe
Author: Your Name
Author URI: https://example.com
Description: Minimal, fast classic WordPress theme for My Homemade Recipe.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: myhomemaderecipe
*/

:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --accent: #111827;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
}

.site-logo {
  margin-right: auto;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 18px;
  text-decoration: none !important;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #111;
  stroke-width: 2;
}

.menu {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.menu a:hover,
.menu .current-menu-item > a,
.menu .current_page_item > a,
.menu .current-menu-ancestor > a {
  color: var(--text);
}

.main-content {
  min-height: 60vh;
}

.section {
  padding: 28px 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.button {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid #111;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  background: #111;
  font-weight: 600;
}

.button--secondary {
  background: #fff;
  color: #111;
  border-color: #ddd;
}

.home-hero h1 {
  margin: 0 0 10px;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.home-hero p {
  margin: 0;
  color: #333;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.hero-chips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: #374151;
}

.trending-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.trending-row a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 12px;
}

.card-body h3,
.card-body h4 {
  margin: 0 0 8px;
  line-height: 1.25;
}

.card-body p {
  margin: 0;
  color: #555;
  font-size: 14px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  margin-bottom: 14px;
}

.author-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.author-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.author-card img {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

.entry-title {
  margin: 0 0 8px;
  font-size: 38px;
  line-height: 1.15;
}

.entry-meta {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.entry-content p,
.entry-content li {
  color: #333;
}

.entry-thumbnail {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.author-box,
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.pagination,
.posts-nav {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.site-footer {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .cards-grid,
  .author-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-card,
  .content-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .menu.is-open { display: flex; }
}

@media (max-width: 620px) {
  .cards-grid,
  .author-grid {
    grid-template-columns: 1fr;
  }

  .home-hero h1 {
    font-size: 34px;
  }
}
