/*
Theme Name: Flavor
Theme URI: https://currentista.com
Author: Flavor Team
Description: A clean, image-first magazine theme for viral content
Version: 1.0
License: GNU General Public License v2
Text Domain: flavor
*/

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

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --accent: #e85d04;
  --accent-hover: #dc2f02;
  --card-bg: #f8f9fa;
  --card-border: #e5e7eb;
  --header-bg: #ffffff;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --max-width: 720px;
  --wide-width: 1100px;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ===== HEADER ===== */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 20px;
}
.header-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-logo {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  text-transform: lowercase;
}
.site-logo span { color: var(--accent); }
.header-nav { display: flex; gap: 24px; }
.header-nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .header-nav { display: none; }
  .site-logo { font-size: 1.2rem; }
}

/* ===== HOMEPAGE GRID ===== */
.home-grid {
  max-width: var(--wide-width);
  margin: 32px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.home-grid .card:first-child {
  grid-column: 1 / -1;
}
.card {
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.card:first-child .card-image {
  aspect-ratio: 21/9;
}
.card-body { padding: 16px; }
.card-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 8px;
}
.card:first-child .card-title { font-size: 1.6rem; }
.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}

@media (max-width: 768px) {
  .home-grid { grid-template-columns: 1fr; gap: 16px; }
  .card:first-child .card-title { font-size: 1.3rem; }
  .card:first-child .card-image { aspect-ratio: 16/9; }
}

/* ===== SINGLE POST ===== */
.post-header {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding: 0 20px;
}
.post-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
}
.post-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}
.post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.post-hero {
  max-width: var(--max-width);
  margin: 0 auto 32px;
  padding: 0 20px;
}
.post-hero img {
  width: 100%;
  border-radius: 8px;
}

/* Article Content */
.post-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.post-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
  line-height: 1.3;
}
.post-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text);
}
.post-content figure {
  margin: 24px 0;
}
.post-content figure img {
  width: 100%;
  border-radius: 6px;
}
.post-content figcaption {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* Ad Slot */
.ad-slot {
  max-width: var(--max-width);
  margin: 32px auto;
  padding: 0 20px;
  text-align: center;
  min-height: 100px;
}

@media (max-width: 768px) {
  .post-title { font-size: 1.6rem; }
  .post-content h2 { font-size: 1.25rem; }
  .post-content p { font-size: 1rem; }
}

/* ===== RELATED ARTICLES ===== */
.related-posts {
  max-width: var(--wide-width);
  margin: 48px auto;
  padding: 0 20px;
}
.related-posts h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}
.related-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
@media (max-width: 768px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 32px 20px;
  margin-top: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.footer-links { margin-bottom: 12px; }
.footer-links a {
  color: var(--text-muted);
  margin: 0 12px;
}
.footer-links a:hover { color: var(--accent); }

/* ===== LOAD MORE ===== */
.load-more-wrap {
  text-align: center;
  margin: 32px 0 48px;
}
.load-more-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 40px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.load-more-btn:hover { background: var(--accent-hover); }
