/*
Theme Name: ZMSViral
Theme URI: https://zmsviral.xyz
Author: Yield Scale Group
Description: High-performance, ad-optimised WordPress theme. No author, no images, maximum content density for ad viewability.
Version: 1.0
License: GNU General Public License v2
Tags: blog, minimalist, ad-optimised
*/

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

/* ── TOKENS ── */
:root {
  --bg: #ffffff;
  --surface: #fafaf9;
  --border: #e7e5e4;
  --text: #1c1917;
  --muted: #78716c;
  --accent: #a3e635;
  --dark: #0c0a09;
  --font-sans: 'Inter', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 740px;
  --max-w-wide: 1100px;
}

/* ── BASE ── */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); }
a:hover { color: var(--dark); }

/* ── HEADER ── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Site name */
.site-logo-text {
  font-family: var(--font-mono);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
}
.site-logo-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

/* Right controls */
.header-controls { display: flex; align-items: center; gap: .25rem; }

/* Icon buttons (search + menu toggle) */
.search-toggle,
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  border-radius: 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.search-toggle:hover,
.menu-toggle:hover { background: var(--surface); }

/* Menu toggle (SVG icon, same style as search-toggle) */
.menu-toggle { padding: .5rem; }

/* ── SEARCH BAR DROPDOWN ── */
#header-search {
  display: none !important;
  border-top: 1px solid #e7e5e4 !important;
  background: #ffffff !important;
  width: 100% !important;
}
#header-search.is-open {
  display: block !important;
}
#header-search .header-search-inner {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: .65rem 1.25rem !important;
  display: flex !important;
  align-items: center !important;
  gap: .75rem !important;
  box-sizing: border-box !important;
}
#header-search form {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  border: 1px solid #e7e5e4 !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
  background: #fafaf9 !important;
  margin: 0 !important;
  padding: 0 !important;
}
#header-search input[type="search"] {
  flex: 1 !important;
  border: none !important;
  background: transparent !important;
  padding: .55rem 1rem !important;
  font-size: .9rem !important;
  color: #1c1917 !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
}
#header-search form button[type="submit"] {
  background: transparent !important;
  border: none !important;
  padding: .5rem .9rem !important;
  cursor: pointer !important;
  color: #78716c !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  box-shadow: none !important;
}
.search-close {
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  font-size: .85rem !important;
  color: #78716c !important;
  padding: .4rem .6rem !important;
  border-radius: 6px !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

/* ── CATEGORIES DROPDOWN ── */
#categories-menu {
  display: none !important;
  border-top: 1px solid #e7e5e4 !important;
  background: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.1) !important;
  width: 100% !important;
}
#categories-menu.is-open {
  display: block !important;
}
#categories-menu .categories-menu-inner {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 1rem 1.25rem 1.25rem !important;
  box-sizing: border-box !important;
}
#categories-menu ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .5rem !important;
}
#categories-menu ul li {
  margin: 0 !important;
  padding: 0 !important;
}
#categories-menu ul li a {
  display: inline-block !important;
  padding: .45rem 1.1rem !important;
  border-radius: 9999px !important;
  border: 1px solid #e7e5e4 !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  color: #1c1917 !important;
  background: #fafaf9 !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
}
#categories-menu ul li a:hover {
  background: #1c1917 !important;
  color: #ffffff !important;
  border-color: #1c1917 !important;
}
.categories-menu-inner ul li a:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ── LAYOUT ── */
.site-container {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}
.site-container.full-width {
  grid-template-columns: 1fr;
  max-width: var(--max-w);
}
@media (max-width: 860px) {
  .site-container { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ── SINGLE POST — NO AUTHOR, NO IMAGES, TIGHT MARGINS ── */
.single-post-wrap { max-width: var(--max-w); width: 100%; }
.post-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: .5rem;      /* TIGHT — ad viewability */
}
/* No author, no date, no meta */
.post-meta { display: none \!important; }
.entry-meta { display: none \!important; }
.post-author { display: none \!important; }
.author-box { display: none \!important; }
/* No featured image */
.post-thumbnail { display: none \!important; }
.featured-image { display: none \!important; }
.wp-post-image { display: none \!important; }

.entry-content {
  margin-top: .75rem;        /* TIGHT — push content up close to title */
}
.entry-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.75rem 0 .6rem;
  line-height: 1.3;
  color: var(--text);
}
.entry-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.4rem 0 .5rem;
}
.entry-content p {
  margin-bottom: 1rem;
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text);
}
.entry-content ul, .entry-content ol {
  margin: .75rem 0 1rem 1.5rem;
}
.entry-content li {
  margin-bottom: .4rem;
  font-size: .95rem;
  line-height: 1.7;
}
.entry-content strong { font-weight: 700; }
.entry-content a { color: var(--text); text-decoration: underline; }
.entry-content a:hover { color: var(--dark); }

/* ── CTA BUTTON SECTION (beam) ── */
.ysg-cta-section {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem 1.25rem;
  background: linear-gradient(135deg, #fafaf9, #f0efec);
  border-radius: 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.ysg-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.ysg-cta-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
@keyframes ysgBeamSpin { to { transform: rotate(360deg); } }
.ysg-btn-wrap {
  display: inline-block;
  position: relative;
  border-radius: 9999px;
  padding: 2px;
  overflow: hidden;
  background: transparent;
  transform: translateZ(0);
  vertical-align: middle;
  max-width: 100%;
}
.ysg-beam-border {
  position: absolute;
  top: -200%; left: -200%;
  width: 500%; height: 500%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 315deg, #000 342deg, rgba(0,0,0,.25) 354deg, transparent 360deg);
  animation: ysgBeamSpin 3s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.ysg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  position: relative;
  z-index: 1;
  background: var(--accent);
  color: #000;
  padding: .9rem 2.2rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .3s, transform .25s;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  border: none;
}
.ysg-btn:hover { background: #bef264; transform: scale(1.02); color: #000; text-decoration: none; }
.ysg-btn svg { stroke: currentColor; fill: none; flex-shrink: 0; }
.ysg-notice {
  display: block;
  margin-top: .875rem;
  font-size: .68rem;
  color: #a8a29e;
  line-height: 1.7;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

/* ── ARCHIVE / CATEGORY ── */
.archive-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.archive-title {
  font-size: 1.4rem;
  font-weight: 800;
}
.archive-desc { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.posts-grid { display: flex; flex-direction: column; gap: 1px; background: var(--border); border-radius: 12px; overflow: hidden; }
.post-card {
  background: var(--bg);
  padding: 1.25rem 1.5rem;
  display: block;
  text-decoration: none;
  color: var(--text);
  transition: background .2s;
}
.post-card:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.post-card-title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin-bottom: .35rem; }
.post-card-excerpt { font-size: .82rem; color: var(--muted); line-height: 1.55; }

/* ── HOME ── */
.home-content { max-width: var(--max-w-wide); margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 72px; }
.sidebar-widget { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
.sidebar-widget-title { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.sidebar-widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar-widget ul li { border-bottom: 1px solid var(--border); padding: .6rem 0; }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { font-size: .82rem; font-weight: 600; text-decoration: none; color: var(--text); }
.sidebar-widget ul li a:hover { color: var(--dark); }

/* ── PAGINATION ── */
.pagination { display: flex; gap: .5rem; justify-content: center; margin: 2rem 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: all .2s;
}
.pagination .current { background: var(--text); color: #fff; border-color: var(--text); }
.pagination a:hover { border-color: var(--text); }

/* ── FOOTER ── */
#site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  padding: 2.5rem 1.25rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--font-mono); font-size: .8rem; color: rgba(255,255,255,.5); }
.footer-brand strong { color: #fff; display: block; margin-bottom: .4rem; font-size: .9rem; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-nav a { font-size: .75rem; color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s; }
.footer-nav a:hover { color: #fff; }

/* ── HIDE UNWANTED DEFAULT WIDGETS (safety net) ── */
.widget_recent_comments,
.widget_archives,
.widget_meta,
.widget_rss,
.widget_calendar,
.widget_tag_cloud { display: none !important; }

/* ── BACK TO TOP ── */
#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  z-index: 999;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  transform: translateY(6px);
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ── MOBILE ── */
@media (max-width: 640px) {
  .post-title { font-size: 1.4rem; }
  .ysg-btn-wrap { display: block; border-radius: 14px; width: 100%; }
  .ysg-btn { display: flex; width: 100%; border-radius: 12px; }
  nav#site-nav { display: none; }
  #back-to-top { bottom: 1rem; right: 1rem; }
}
