/*
Theme Name: The Viral Minute – Airvala Green
Description: Dark viral news grid theme with Airvala-style olive green palette.
Version: 1.0.0
*/

/* ===========================
   ROOT + GLOBAL RESET
   =========================== */
:root {
  --bg-deep: #050908;
  --bg-soft: #0b1512;
  --bg-softer: #101a16;

  --olive: #8a9a5b;
  --olive-soft: #647043;
  --lime: #c3ff4d;

  --border-soft: #1c2622;

  --text-main: #f4fff9;
  --text-soft: #c3d2cb;
  --text-muted: #8aa39b;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.9);

  --transition-fast: 0.18s ease-out;
  --transition-med: 0.28s ease-out;

  --max-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
    Roboto, sans-serif;
  background: radial-gradient(circle at top, #0b1512 0, #050908 55%, #000 100%);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  color: var(--olive);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: var(--lime);
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* Utility chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(195, 255, 77, 0.45);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--lime);
  background: linear-gradient(
    135deg,
    rgba(138, 154, 91, 0.18),
    rgba(5, 9, 8, 0.96)
  );
}

/* Wrap whole site */
.vg-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.vg-main {
  flex: 1 0 auto;
}

/* ===========================
   HEADER
   =========================== */
.vg-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(5, 9, 8, 0.97),
    rgba(5, 9, 8, 0.92)
  );
  border-bottom: 1px solid rgba(28, 38, 34, 0.9);
}

.vg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

/* Logo + brand */
.vg-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.vg-logo-wrap {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(138, 154, 91, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at top, #101a16, #050908);
}

.vg-logo-text {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--lime);
}

.vg-brand {
  display: flex;
  flex-direction: column;
}

.vg-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vg-brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-soft);
}

/* Primary nav */
.vg-primary-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.vg-menu {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.vg-menu > li > a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-soft);
  border: 1px solid transparent;
}

.vg-menu > li > a:hover,
.vg-menu > li.current-menu-item > a,
.vg-menu > li.current_page_item > a {
  color: var(--text-main);
  border-color: rgba(138, 154, 91, 0.95);
  background: radial-gradient(
    circle at top left,
    rgba(138, 154, 91, 0.25),
    rgba(5, 9, 8, 0.98)
  );
}

/* Header right actions */
.vg-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.vg-pill-btn {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(138, 154, 91, 0.95);
  padding: 0.4rem 0.95rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #8a9a5b, #c3ff4d);
  color: #041006;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(138, 154, 91, 0.4);
}

.vg-pill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(138, 154, 91, 0.6);
}

/* Hamburger */
.vg-menu-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(138, 154, 91, 0.6);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.vg-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-soft);
  margin: 2px 0;
}

/* ===========================
   TRENDING BAR
   =========================== */
.trending-bar {
  border-bottom: 1px solid rgba(28, 38, 34, 0.9);
  background: linear-gradient(
    to right,
    rgba(5, 9, 8, 0.98),
    rgba(11, 21, 18, 0.98)
  );
}

.trending-bar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0;
  overflow: hidden;
}

/* hide duplicate widget titles */
.trending-scroller .vg-trending-title {
  display: none;
}

/* trending items (from widgets / fallback) */
.trending-scroller {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
}

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

/* If widget outputs <ul> */
.trending-scroller ul,
.trending-scroller li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.trending-scroller li {
  display: inline-block;
  margin-right: 0.6rem;
}

.trending-scroller a,
.trending-scroller span {
  font-size: 0.78rem;
  white-space: nowrap;
  padding: 0.22rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(90, 110, 96, 0.7);
  background: rgba(11, 21, 18, 0.96);
  color: var(--text-soft);
}

.trending-scroller a:hover {
  color: var(--lime);
  border-color: rgba(195, 255, 77, 0.8);
}

/* fallback text */
.vg-trending-fallback {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===========================
   MOBILE NAV
   =========================== */
.vg-mobile-nav {
  display: none;
  position: fixed;
  z-index: 45;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(5, 9, 8, 0.98);
  border-bottom: 1px solid rgba(28, 38, 34, 0.9);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9);
}

.vg-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.vg-mobile-menu li a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.vg-mobile-menu li a:hover,
.vg-mobile-menu li.current-menu-item a {
  background: rgba(138, 154, 91, 0.2);
  color: var(--lime);
}

/* JS should toggle .is-open; we provide styles */
.vg-mobile-nav.is-open {
  display: block;
}

/* ===========================
   HOME & ARCHIVE GRIDS
   =========================== */

.vg-grid-wrap {
  padding: 1.6rem 0 2.4rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

/* First article as hero */
.post-grid > article:first-child {
  grid-column: span 2;
}

/* Article card */
article {
  background: radial-gradient(
      circle at top left,
      rgba(138, 154, 91, 0.16),
      rgba(5, 9, 8, 0.98)
    )
    border-box;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(28, 38, 34, 0.95);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

/* Thumbnail */
.post-thumbnail {
  position: relative;
  overflow: hidden;
  max-height: 230px;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.6s ease-out, filter 0.45s ease-out;
}

article:hover .post-thumbnail img {
  transform: scale(1.07);
  filter: saturate(1.05) brightness(1.03);
}

/* Entry header */
.entry-header {
  padding: 0.9rem 1.05rem 0.4rem;
}

.entry-title {
  font-size: 1rem;
  margin: 0.25rem 0 0.35rem;
}

.entry-title a {
  color: var(--text-main);
}

.entry-title a:hover {
  color: var(--lime);
}

/* Cat pill */
.cat-label {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(138, 154, 91, 0.9);
  color: var(--lime);
  background: rgba(138, 154, 91, 0.18);
}

/* Meta */
.entry-meta {
  padding: 0 1.05rem 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* No posts */
.vg-no-posts {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Pagination */
.vg-pagination,
.nav-links {
  margin-top: 1.7rem;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.page-numbers {
  min-width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(28, 38, 34, 0.9);
  color: var(--text-soft);
  background: rgba(5, 9, 8, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.page-numbers.current,
.page-numbers:hover {
  border-color: rgba(138, 154, 91, 0.95);
  color: var(--lime);
}

/* ===========================
   STORY RAIL SECTION
   =========================== */
.vg-story-rail {
  padding: 1.6rem 0 0.4rem;
}

.vg-rail-heading {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.vg-rail-content {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* If using widgets in Story Rail */
.widget,
.vg-story-widget {
  background: linear-gradient(
      135deg,
      rgba(138, 154, 91, 0.14),
      rgba(5, 9, 8, 0.98)
    )
    border-box;
  border-radius: var(--radius-md);
  border: 1px solid rgba(28, 38, 34, 0.95);
  padding: 0.9rem 1rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.78);
}

.widget-title,
.vg-story-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  margin-top: 0;
}

/* ===========================
   ARCHIVE HEADER
   =========================== */
.vg-archive-hero {
  padding: 1.8rem 0 0.4rem;
}

.vg-archive-header {
  background: radial-gradient(
      circle at top left,
      rgba(138, 154, 91, 0.18),
      rgba(5, 9, 8, 0.98)
    )
    border-box;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(28, 38, 34, 0.95);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

.vg-archive-title {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
}

.vg-archive-description {
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* ===========================
   SINGLE POST & PAGE
   =========================== */
.vg-single-page {
  padding: 1.8rem 0 2.5rem;
}

.vg-single-article {
  max-width: 780px;
  margin: 0 auto;
}

/* Header */
.vg-single-header {
  text-align: left;
  margin-bottom: 1rem;
}

.vg-single-cat {
  margin-bottom: 0.4rem;
}

.vg-single-title {
  font-size: 1.9rem;
  margin: 0 0 0.6rem;
}

.vg-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta-sep {
  opacity: 0.5;
}

/* Featured image */
.vg-single-thumb {
  width: 100%;
  margin: 1rem 0 1.4rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.vg-featured-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

/* Mobile featured crop */
@media (max-width: 768px) {
  .vg-featured-img {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .vg-featured-img {
    height: 180px;
  }
}

/* Share bar */
.vg-share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.vg-share-btn {
  border-radius: 999px;
  padding: 0.26rem 0.65rem;
  border: 1px solid rgba(138, 154, 91, 0.9);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(10, 18, 15, 0.96);
  color: var(--text-soft);
}

.vg-share-btn:hover {
  color: var(--lime);
  border-color: rgba(195, 255, 77, 0.9);
}

/* Content */
.vg-single-content {
  font-size: 0.98rem;
  color: var(--text-main);
}

.vg-single-content p {
  margin-bottom: 1rem;
}

.vg-single-content h2,
.vg-single-content h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
}

/* Footer meta (tags, cats) */
.vg-single-footer-meta {
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(28, 38, 34, 0.95);
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.85rem;
}

.vg-tags .tag-title,
.vg-categories .cat-title {
  font-weight: 600;
  margin-right: 0.3rem;
}

/* Related posts */
.vg-related-posts {
  margin-top: 2rem;
}

.vg-related-title {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.vg-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.vg-related-card {
  background: rgba(5, 9, 8, 0.96);
  border-radius: var(--radius-md);
  border: 1px solid rgba(28, 38, 34, 0.95);
  overflow: hidden;
}

.vg-related-thumb img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.vg-related-post-title {
  font-size: 0.82rem;
  padding: 0.45rem 0.6rem 0.6rem;
}

/* Single nav */
.vg-single-nav {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(28, 38, 34, 0.95);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.vg-single-comments {
  margin-top: 1.8rem;
}

/* ===========================
   FOOTER
   =========================== */
.vg-footer {
  border-top: 1px solid rgba(28, 38, 34, 0.95);
  background: #040706;
  padding: 1.8rem 0 1.1rem;
  color: var(--text-soft);
}

.vg-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.vg-footer-heading {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 0.4rem;
}

.vg-footer-tagline {
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
}

.vg-footer-subtag {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.vg-footer-menu {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
}

.vg-footer-menu li {
  margin-bottom: 0.15rem;
}

.vg-footer-menu a {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.vg-footer-menu a:hover {
  color: var(--lime);
}

/* Footer widgets */
.vg-footer-widgets-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  font-size: 0.86rem;
}

/* bottom bar */
.vg-footer-bottom {
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(28, 38, 34, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.8rem;
}

.vg-footer-copy {
  color: var(--text-muted);
}

/* Social icons */
.vg-footer-social {
  display: flex;
  gap: 0.4rem;
}

.vg-social-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(138, 154, 91, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-soft);
}

.vg-social-icon:hover {
  color: var(--lime);
  border-color: rgba(195, 255, 77, 0.9);
}

/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */
@media (max-width: 1024px) {
  .vg-primary-nav {
    display: none;
  }

  .vg-menu-toggle {
    display: inline-flex;
  }

  .vg-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vg-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .vg-header-inner {
    align-items: center;
  }

  .vg-brand-title {
    font-size: 0.98rem;
  }

  .vg-brand-subtitle {
    font-size: 0.72rem;
  }

  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-grid > article:first-child {
    grid-column: span 1;
  }

  .vg-footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .vg-related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vg-single-title {
    font-size: 1.6rem;
  }
}
