/*
Theme Name: Upithemes Azure
Theme URI: https://yoursite.com
Author: UpiThemes
Author URI: https://yoursite.com
Description: A modern, lightweight, and fast news theme with azure color scheme. Optimized for Core Web Vitals, SEO, and AdSense.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: upithemes
Tags: news, blog, responsive, fast, seo-friendly
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================================ */
:root {
  --color-primary:    #0078d4;
  --color-primary-dk: #006abc;
  --color-dark:       #0a0a0a;
  --color-header-bg:  #004578;
  --color-body-bg:    #f5f5f5;
  --color-card-bg:    #ffffff;
  --color-text:       #1a1a1a;
  --color-muted:      #6b7280;
  --color-border:     #e5e7eb;
  --color-tag-bg:     #f0f6ff;
  --color-breaking:   #0078d4;

  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px rgba(0,0,0,.1),  0 4px 6px rgba(0,0,0,.05);

  --container:  1200px;
  --gap:        1.5rem;
  --header-h:   60px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-body-bg);
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }

ul, ol { list-style: none; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-dark);
}

.section-title {
  font-size: 1.125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-dark);
  border-left: 4px solid var(--color-primary);
  padding-left: .75rem;
  margin-bottom: 1.25rem;
}

.section-title a { color: inherit; }
.section-title a:hover { color: var(--color-primary); }

/* ============================================================
   BREAKING NEWS TICKER
   ============================================================ */
.breaking-bar-wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}

.breaking-bar {
  background: var(--color-breaking);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  overflow: hidden;
  height: 30px;
  max-height: 30px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 99;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}

.breaking-bar__label {
  background: #005a9e;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .08em;
  flex-shrink: 0;
}

.breaking-bar__track {
  overflow: hidden;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
}

.breaking-bar__inner {
  display: flex;
  gap: 3rem;
  animation: ticker 28s linear infinite;
  white-space: nowrap;
  padding-left: 1rem;
}

.breaking-bar__inner a {
  color: #fff;
  opacity: .92;
}

.breaking-bar__inner a:hover { opacity: 1; text-decoration: underline; }

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--color-header-bg) !important;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  min-height: var(--header-h);
  display: block;
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo__text {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.02em;
}

.site-logo__text span { color: var(--color-primary); }

/* Navigation */
.site-nav { display: flex; align-items: center; gap: .25rem; list-style: none; padding: 0; margin: 0; }
.site-nav li { list-style: none; padding: 0; margin: 0; }
.site-nav li::before, .site-nav li::after { display: none !important; content: none !important; }

.site-nav a {
  color: #d1d5db;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .35rem .7rem;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}

.site-nav a:hover,
.site-nav a.current-menu-item {
  color: #fff;
  background: rgba(255,255,255,.1);
}

/* Search */
.header-search { display: flex; align-items: center; }

.header-search__form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.1);
  border-radius: 20px;
  overflow: hidden;
  transition: background .2s;
}

.header-search__form:focus-within { background: rgba(255,255,255,.18); }

.header-search__input {
  background: none;
  border: none;
  color: #fff;
  padding: .4rem .75rem;
  font-size: .82rem;
  width: 160px;
  outline: none;
}

.header-search__input::placeholder { color: rgba(255,255,255,.5); }

.header-search__btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  padding: .4rem .75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.header-search__btn:hover { color: #fff; }

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: .4rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* ============================================================
   SECONDARY NAV (Category Bar)
   ============================================================ */
.cat-bar {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  font-size: .82rem;
}

.cat-bar__inner {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  height: 40px;
}

.cat-bar__inner::-webkit-scrollbar { display: none; }

.cat-bar__inner a {
  color: var(--color-muted);
  font-weight: 600;
  padding: 0 .9rem;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

.cat-bar__inner a:hover,
.cat-bar__inner a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__thumb {
  position: relative;
  overflow: hidden;
  background: var(--color-tag-bg);
  aspect-ratio: 16/9;
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.card:hover .card__thumb img { transform: scale(1.04); }

.card__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 2.5rem;
}

.card__cat {
  position: absolute;
  top: .5rem;
  left: .5rem;
  background: var(--color-primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .5rem;
  border-radius: var(--radius-sm);
}

.card__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: .5rem;
  flex: 1;
}

.card__title a { color: var(--color-dark); }
.card__title a:hover { color: var(--color-primary); }

.card__meta {
  font-size: .72rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.card__meta time { font-weight: 500; }

/* Card Hero (large) */
.card--hero .card__title { font-size: 1.4rem; }
.card--hero .card__body { padding: 1.25rem; }

/* Card Horizontal */
.card--horiz {
  flex-direction: row;
  align-items: stretch;
}

.card--horiz .card__thumb {
  width: 120px;
  min-width: 120px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.card--horiz .card__title { font-size: .9rem; }
.card--horiz .card__body { padding: .75rem; }

/* ============================================================
   HERO / FEATURED SECTION
   ============================================================ */
.hero-section {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto auto;
  gap: var(--gap);
}

.hero-main {
  grid-row: 1 / 3;
}

.hero-main .card__title { font-size: 1.65rem; }
.hero-main .card__body { padding: 1.5rem; }

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-side .card--horiz .card__thumb {
  width: 100px;
  min-width: 100px;
}

/* ============================================================
   TRENDING BAR
   ============================================================ */
.trending-bar {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.trending-bar::-webkit-scrollbar { display: none; }

.trending-bar__label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.trending-bar__items {
  display: flex;
  gap: .5rem;
  flex-wrap: nowrap;
}

.trending-bar__item {
  background: var(--color-tag-bg);
  color: var(--color-text);
  font-size: .75rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: 20px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.trending-bar__item:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ============================================================
   MAIN LAYOUT — Konten KIRI, Sidebar KANAN
   ============================================================ */
.main-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  align-items: start;
}

.main-layout .sidebar {
  min-width: 0;
  width: 100%;
}

.main-content { min-width: 0; }

/* ============================================================
   CATEGORY SECTIONS
   ============================================================ */
.cat-section { margin-bottom: 2.5rem; }

.cat-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cat-section__more {
  font-size: .75rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: opacity .15s;
}

.cat-section__more:hover { opacity: .75; color: var(--color-primary); }

/* Category Layout: 1 big + 3 small */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.cat-grid__main { grid-row: 1 / 3; }
.cat-grid__side { display: flex; flex-direction: column; gap: 1rem; }
.cat-grid__side .card--horiz .card__thumb { width: 90px; min-width: 90px; }
.cat-grid__side .card--horiz .card__title { font-size: .85rem; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.widget-box {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.widget-box__title {
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .75rem 1rem;
  background: var(--color-primary);
  color: #fff;
}

.widget-box__body { padding: 1rem; }

/* Popular posts widget */
.popular-list { display: flex; flex-direction: column; gap: .75rem; }

.popular-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.popular-item__num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-border);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
}

.popular-item__title {
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-dark);
}

.popular-item__title:hover { color: var(--color-primary); }

.popular-item__meta { font-size: .7rem; color: var(--color-muted); margin-top: .2rem; }

/* Ad widget */
.widget-ad {
  background: var(--color-tag-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  color: var(--color-muted);
  text-align: center;
}

/* ============================================================
   TAGS
   ============================================================ */
.tag-badge {
  display: inline-block;
  background: var(--color-tag-bg);
  color: var(--color-muted);
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}

.tag-badge:hover { background: var(--color-primary); color: #fff; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  font-size: .75rem;
  color: var(--color-muted);
  padding: .75rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: center;
}

.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

.breadcrumb__sep { color: #d1d5db; }

.breadcrumb__current { color: var(--color-text); font-weight: 500; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-header { margin-bottom: 1.5rem; }

.single-cat {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .3rem .75rem;
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
}

.single-title {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  font-size: .8rem;
  color: var(--color-muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.single-meta strong { color: var(--color-text); font-weight: 600; }

.single-featured {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

/* Post Content */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2d3748;
}

.entry-content p { margin-bottom: 1.25rem; }
.entry-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.entry-content h3 { font-size: 1.25rem; margin: 1.75rem 0 .75rem; }
.entry-content a { color: var(--color-primary); text-decoration: underline; }
.entry-content img { border-radius: var(--radius-md); margin: 1.5rem 0; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: .4rem; }
.entry-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: #f0f6ff;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: #4a5568;
}

/* Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 2rem 0;
  flex-wrap: wrap;
}

.share-bar__label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-muted);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 700;
  padding: .4rem .9rem;
  border-radius: 20px;
  color: #fff;
  transition: opacity .15s;
}

.share-btn:hover { opacity: .85; color: #fff; }
.share-btn--fb  { background: #1877f2; }
.share-btn--tw  { background: #1da1f2; }
.share-btn--wa  { background: #25d366; }
.share-btn--copy { background: var(--color-muted); }

/* Tags Section */
.tags-section { margin-bottom: 2rem; }
.tags-section__label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-muted);
  margin-bottom: .5rem;
}
.tags-list { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Related Posts */
.related-section { margin-top: 2.5rem; }

/* ============================================================
   ARCHIVE / CATEGORY PAGE
   ============================================================ */
.archive-header {
  background: var(--color-dark);
  color: #fff;
  padding: 2rem 0;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.archive-header__label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.5);
  margin-bottom: .25rem;
}

.archive-header__title {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
}

.archive-header__desc {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  margin-top: .5rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: 2rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  padding: 1.5rem 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 .5rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  transition: background .15s, color .15s, border-color .15s;
}

.pagination a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.pagination .current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.pagination .dots { border: none; background: none; }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-header {
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.search-header__query {
  font-size: 1.5rem;
  font-weight: 800;
}

.search-header__count { font-size: .85rem; color: var(--color-muted); margin-top: .25rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-header-bg);
  color: rgba(255,255,255,.7);
  margin-top: 3rem;
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-col__logo { margin-bottom: .75rem; }

.footer-col__desc {
  font-size: .85rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-col__title {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: .5rem; }

.footer-col ul a {
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  transition: color .15s;
}

.footer-col ul a:hover { color: #fff; }

.footer-bottom {
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .78rem;
}

.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: rgba(255,255,255,.5); }
.footer-bottom-links a:hover { color: #fff; }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 200;
}

.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-3px); }

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
  text-align: center;
  padding: 5rem 1rem;
}

.error-404__code {
  font-size: 7rem;
  font-weight: 900;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-404__title { font-size: 1.5rem; margin-bottom: 1rem; }
.error-404__desc { color: var(--color-muted); margin-bottom: 2rem; }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: 9999;
  width: 0%;
  transition: width .1s linear;
}

/* ============================================================
   DARK MODE (optional - media query)
   ============================================================ */
@media (prefers-color-scheme: dark) {
  /* Uncomment below to enable automatic dark mode */
  /*
  :root {
    --color-body-bg: #0f172a;
    --color-card-bg: #1e293b;
    --color-text: #e2e8f0;
    --color-dark: #f1f5f9;
    --color-border: #334155;
    --color-tag-bg: #1e293b;
    --color-muted: #94a3b8;
  }
  */
}

/* ============================================================
   RESPONSIVE - TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-main { grid-row: auto; }

  .main-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE - MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --header-h: 56px; }

  .site-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--color-header-bg); flex-direction: column; align-items: stretch; padding: .5rem 0; box-shadow: 0 4px 12px rgba(0,0,0,.3); }

  .site-nav.open { display: flex; }

  .site-nav a { padding: .75rem 1rem; border-radius: 0; font-size: .88rem; }

  .nav-toggle { display: flex; }

  .header-search { display: none; }

  .hero-main .card__title { font-size: 1.25rem; }

  .cat-grid { grid-template-columns: 1fr; }
  .cat-grid__main { grid-row: auto; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .posts-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  .footer-bottom { flex-direction: column; text-align: center; }

  .single-title { font-size: 1.4rem; }

  .share-bar { gap: .5rem; }

  .breaking-bar { display: none; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .sidebar, .related-section, .share-bar,
  .site-footer, .scroll-top, .reading-progress { display: none; }
  .main-layout { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; }
}

/* ============================================================
   WORDPRESS CORE CLASSES (alignment, gallery, etc.)
   ============================================================ */
.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.alignwide  { margin-inline: calc(50% - 50vw + 1rem); }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--color-muted); text-align: center; margin-top: .4rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
