/*
Theme Name: Flavor
Theme URI: https://zdoroviyobraz.com
Author: ZDR Team
Description: Clean monochrome magazine theme for healthy lifestyle
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: flavor
*/

:root {
  --black: #111;
  --dark: #222;
  --gray: #666;
  --light-gray: #f5f5f5;
  --border: #e0e0e0;
  --accent: #2d8a4e;
  --accent-light: #e8f5ec;
  --white: #fff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* HEADER */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.site-logo span { color: var(--accent); }
.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray);
  transition: color 0.2s;
}
.main-nav a:hover, .main-nav a.current { color: var(--black); }

/* HERO / FEATURED */
.hero-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-card img {
  border-radius: 12px;
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--gray);
}
.cat-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero-excerpt {
  color: var(--gray);
  font-size: 16px;
  line-height: 1.7;
}

/* SECTION TITLES */
.section-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
  padding-top: 40px;
  letter-spacing: -0.3px;
}

/* ARTICLE GRID */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.card-img {
  border-radius: 10px;
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 12px;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 8px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.card-title a:hover { color: var(--accent); }
.card-excerpt {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* TRENDING - list style */
.trending-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.trending-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.trending-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.trending-item img {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.trending-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  margin-right: 12px;
  flex-shrink: 0;
}
.trending-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.trending-title a:hover { color: var(--accent); }

/* LATEST + MOST READ SPLIT */
.split-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.latest-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.latest-item:last-child { border-bottom: none; }
.latest-item img {
  width: 200px;
  height: 140px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.latest-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}
.latest-title a:hover { color: var(--accent); }

.most-read-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.most-read-item:last-child { border-bottom: none; }
.mr-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
  width: 28px;
}
.mr-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.mr-title a:hover { color: var(--accent); }

/* IN DEPTH */
.indepth-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.indepth-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--light-gray);
  border-radius: 12px;
  overflow: hidden;
}
.indepth-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.indepth-text { padding: 32px; }
.indepth-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.indepth-excerpt {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.7;
}

/* SINGLE POST */
.single-header {
  max-width: 800px;
  margin: 40px auto;
  text-align: center;
}
.single-header .cat-tag { margin-bottom: 16px; display: inline-block; }
.single-header h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.single-meta {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 24px;
}
.single-featured {
  max-width: 900px;
  margin: 0 auto 32px;
  border-radius: 12px;
  overflow: hidden;
}
.single-featured img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}
.single-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 60px;
}
.single-content p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--dark);
}
.single-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 36px 0 16px;
}
.single-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 12px;
}
.single-content ul, .single-content ol {
  margin: 16px 0 20px 24px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--dark);
}
.single-content img {
  border-radius: 10px;
  margin: 24px 0;
}
.single-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--light-gray);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--gray);
}
.single-content strong { color: var(--black); }

/* FOOTER */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--accent);
}
.footer-col a {
  display: block;
  color: #aaa;
  font-size: 14px;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--accent); }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #666;
}

/* PAGE */
.page-header {
  max-width: 800px;
  margin: 40px auto 24px;
}
.page-header h1 {
  font-size: 34px;
  font-weight: 800;
}
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 60px;
}
.page-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
  color: var(--dark);
}

/* ARCHIVE */
.archive-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border);
}
.archive-header h1 {
  font-size: 28px;
  font-weight: 800;
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 32px 0;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 32px 0;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}
.pagination .current {
  background: var(--black);
  color: var(--white);
}
.pagination a { background: var(--light-gray); }
.pagination a:hover { background: var(--border); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-card img { height: 240px; }
  .hero-title { font-size: 24px; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .trending-list { grid-template-columns: 1fr; }
  .split-section { grid-template-columns: 1fr; }
  .latest-item img { width: 120px; height: 90px; }
  .indepth-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .single-header h1 { font-size: 28px; }
  .main-nav { gap: 16px; overflow-x: auto; }
}
@media (max-width: 480px) {
  .articles-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .main-nav a { font-size: 12px; }
}

/* Accessibility improvements */
.skip-link:focus {
  position: fixed !important;
  left: 16px !important;
  top: 16px !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  z-index: 100000 !important;
  border-radius: 6px;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.footer-social a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Better contrast for gray text */
.card-meta, .hero-meta, .single-meta {
  color: #555;
}
.card-excerpt, .hero-excerpt, .indepth-excerpt {
  color: #555;
}
.footer-col a { color: #bbb; }
.footer-bottom { color: #888; }

/* Performance: contain layout for cards */
.card, .latest-item, .trending-item, .most-read-item {
  contain: layout style;
}
