/*
Theme Name:   Newzlet Child
Description:  Child theme for Newzlet — tech/AI/business news site
Author:       Newzlet
Template:     generatepress
Version:      2.8.0
License:      GNU General Public License v2 or later
*/

/* ═══════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════ */
:root {
  --nz-accent:      #0055ff;
  --nz-accent-dark: #0044cc;
  --nz-header-bg:   #09090b;
  --nz-bg:          #ffffff;
  --nz-surface:     #f8f9fb;
  --nz-border:      #e4e4e7;
  --nz-text:        #18181b;
  --nz-text-2:      #52525b;
  --nz-text-3:      #a1a1aa;
  --nz-radius:      6px;
  --nz-shadow:      0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --nz-container:   1200px;

  --cat-ai:        #7c3aed;
  --cat-tech:      #0055ff;
  --cat-business:  #059669;
  --cat-health:    #16a34a;
  --cat-gadgets:   #d97706;
  --cat-security:  #dc2626;
  --cat-crypto:    #0891b2;
  --cat-default:   #52525b;
}

/* ═══════════════════════════════════════════════════
   BREAK OUT OF GP's PAGE CONTAINER
   GP adds .grid-container.container on #page which
   constrains max-width and adds padding — undo it so
   our full-bleed hero works.
═══════════════════════════════════════════════════ */
#page.site {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ═══════════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--nz-text);
  background: var(--nz-bg);
}

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

/* ═══════════════════════════════════════════════════
   HEADER — override GP's CSS variables at scope
   GP uses var(--base-3) for bg, var(--contrast) for
   text, var(--accent) for links. Override them here
   so all GP header rules automatically go dark.
═══════════════════════════════════════════════════ */
.site-header {
  --base-3:     #09090b;
  --base:       #1a1a1e;
  --contrast:   #fafafa;
  --contrast-2: rgba(250,250,250,.65);
  --accent:     #4d8eff;
  position: sticky !important;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}

/* Let GP keep its own flex layout; just enforce height + padding */
.inside-header {
  min-height: 60px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center;
}

/* Logo / site name */
.main-title {
  margin: 0 !important;
  font-size: 1.45rem !important;
  line-height: 1 !important;
}

.main-title a,
.main-title a:hover {
  color: #fff !important;
  font-weight: 900 !important;
  letter-spacing: -0.04em !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Blue "N" icon before the logo text */
.main-title a::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: var(--nz-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M6 6h3.2l7.8 12V6H20v14h-3.2L9 8v12H6V6z' fill='white'/%3E%3C/svg%3E");
  background-size: cover;
  flex-shrink: 0;
}

.site-description { display: none !important; }

/* Navigation links */
.main-navigation .main-nav ul li a {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.35rem 0.65rem !important;
  border-radius: var(--nz-radius);
  transition: background .15s;
}

.main-navigation .main-nav ul li a:hover {
  background: rgba(255,255,255,.1);
  text-decoration: none !important;
}

/* Nav background (GP sets it to var(--base-3) which is now #09090b) */
.main-navigation,
.main-navigation ul ul {
  background-color: var(--base-3) !important;
}

/* Tagline bar */
.nz-tagline-bar {
  background: var(--nz-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.3rem 1rem;
}

/* ═══════════════════════════════════════════════════
   LAYOUT UTILITIES
═══════════════════════════════════════════════════ */
.nz-container {
  max-width: var(--nz-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nz-section {
  padding: 2.5rem 0;
}

.nz-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nz-text-3);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--nz-border);
}

/* ═══════════════════════════════════════════════════
   CATEGORY BADGES
═══════════════════════════════════════════════════ */
.nz-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2em 0.65em;
  border-radius: 3px;
  color: #fff !important;
  background: var(--cat-default);
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1.4;
}

.nz-badge--ai-machine-learning,
.nz-badge--ai          { background: var(--cat-ai); }
.nz-badge--consumer-tech,
.nz-badge--tech        { background: var(--cat-tech); }
.nz-badge--startups-business,
.nz-badge--business    { background: var(--cat-business); }
.nz-badge--gadgets-reviews,
.nz-badge--gadgets     { background: var(--cat-gadgets); }
.nz-badge--cybersecurity,
.nz-badge--security    { background: var(--cat-security); }
.nz-badge--crypto-fintech,
.nz-badge--crypto      { background: var(--cat-crypto); }
.nz-badge--health      { background: var(--cat-health); }

/* ═══════════════════════════════════════════════════
   HERO (homepage featured article)
═══════════════════════════════════════════════════ */
.nz-hero {
  background: #09090b;
  overflow: hidden;
  width: 100%;
}

.nz-hero__link {
  display: block;
  position: relative;
  min-height: 480px;
  text-decoration: none !important;
  color: inherit;
}

.nz-hero__image {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
}

.nz-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .6;
  transition: opacity .3s;
}

.nz-hero__link:hover .nz-hero__img { opacity: .7; }

.nz-hero__overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    to top,
    rgba(9,9,11,.95) 0%,
    rgba(9,9,11,.55) 50%,
    rgba(9,9,11,.15) 100%
  );
}

.nz-hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--nz-container);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
  gap: 0.6rem;
}

.nz-hero__title {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  margin: 0;
  max-width: 780px;
  letter-spacing: -0.025em;
}

.nz-hero__excerpt {
  font-size: 1.0625rem;
  color: rgba(250,250,250,.78);
  margin: 0;
  max-width: 620px;
  line-height: 1.6;
}

.nz-hero__meta {
  font-size: 0.8125rem;
  color: rgba(250,250,250,.5);
  font-weight: 500;
}

.nz-hero--no-image .nz-hero__link {
  background: linear-gradient(135deg, #0d1b2a 0%, #0a0f1e 100%);
}

/* ═══════════════════════════════════════════════════
   ARTICLE GRID
═══════════════════════════════════════════════════ */
.nz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   ARTICLE CARD
═══════════════════════════════════════════════════ */
.nz-card {
  background: var(--nz-bg);
  border: 1px solid var(--nz-border);
  border-radius: var(--nz-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .15s;
  text-decoration: none !important;
}

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

.nz-card__image-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--nz-surface);
  text-decoration: none !important;
}

.nz-card__image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .3s;
}

.nz-card:hover .nz-card__image-wrap img { transform: scale(1.04); }

.nz-card__image-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
  color: var(--nz-text-3);
  font-size: 2.5rem;
}

.nz-card__badge-wrap {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
}

.nz-card__body {
  padding: 1rem 1.125rem 1.125rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nz-card__title {
  font-size: 0.9875rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nz-card__title a {
  color: var(--nz-text) !important;
  text-decoration: none !important;
}

.nz-card__title a:hover { color: var(--nz-accent) !important; }

.nz-card__excerpt {
  font-size: 0.875rem;
  color: var(--nz-text-2);
  line-height: 1.55;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nz-card__meta {
  font-size: 0.75rem;
  color: var(--nz-text-3);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════
   EMPTY / PAGINATION
═══════════════════════════════════════════════════ */
.nz-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--nz-text-3);
  padding: 4rem 1rem;
}

.nz-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 0;
}

.nz-pagination a,
.nz-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.6rem;
  border-radius: var(--nz-radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--nz-border);
  color: var(--nz-text-2);
  text-decoration: none !important;
  transition: all .15s;
}

.nz-pagination a:hover { background: var(--nz-surface); color: var(--nz-text); }
.nz-pagination .current {
  background: var(--nz-accent);
  color: #fff !important;
  border-color: var(--nz-accent);
}

/* ═══════════════════════════════════════════════════
   SINGLE ARTICLE
═══════════════════════════════════════════════════ */
.nz-article-wrap {
  max-width: var(--nz-container);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Center article content at comfortable reading width */
.nz-article {
  max-width: 720px;
  margin: 0 auto;
}

.nz-article__breadcrumb {
  font-size: 0.8125rem;
  color: var(--nz-text-3);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.nz-article__breadcrumb a { color: var(--nz-text-3); text-decoration: none; }
.nz-article__breadcrumb a:hover { color: var(--nz-accent); }
.nz-article__breadcrumb .sep { color: var(--nz-border); }

.nz-article__meta-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.nz-article__date,
.nz-article__read-time {
  font-size: 0.8125rem;
  color: var(--nz-text-3);
  font-weight: 500;
}

.nz-article__title {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--nz-text);
  margin: 0 0 1rem;
}

.nz-article__excerpt {
  font-size: 1.1rem;
  color: var(--nz-text-2);
  line-height: 1.65;
  margin: 0;
  border-left: 3px solid var(--nz-accent);
  padding-left: 1rem;
}

.nz-article__featured-image {
  margin: 1.75rem 0;
  border-radius: var(--nz-radius);
  overflow: hidden;
}

.nz-article__featured-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--nz-radius);
}

.nz-article__image-caption {
  font-size: 0.8125rem;
  color: var(--nz-text-3);
  margin-top: 0.4rem;
  text-align: center;
}

/* Article body typography */
.nz-article__content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #2d2d2d;
}

.nz-article__content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.02em;
  color: var(--nz-text);
}

.nz-article__content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.6rem;
  color: var(--nz-text);
}

.nz-article__content p { margin: 0 0 1.25rem; }

.nz-article__content ul,
.nz-article__content ol {
  padding-left: 1.5rem;
  margin: 0 0 1.25rem;
}

.nz-article__content li { margin-bottom: 0.35rem; }

.nz-article__content blockquote {
  border-left: 3px solid var(--nz-accent);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--nz-surface);
  border-radius: 0 var(--nz-radius) var(--nz-radius) 0;
  font-style: italic;
  color: var(--nz-text-2);
}

.nz-article__content a {
  color: var(--nz-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nz-article__content code {
  background: var(--nz-surface);
  border: 1px solid var(--nz-border);
  border-radius: 3px;
  padding: .15em .4em;
  font-size: .875em;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.nz-article__content pre {
  background: #09090b;
  color: #e4e4e7;
  border-radius: var(--nz-radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.nz-article__content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* ═══════════════════════════════════════════════════
   AI DISCLOSURE + SOURCES
═══════════════════════════════════════════════════ */
.newzlet-ai-disclosure {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--nz-radius);
  font-size: 0.875rem;
  color: #78350f;
  line-height: 1.6;
}

.newzlet-ai-disclosure strong { color: #92400e; }
.newzlet-ai-disclosure a { color: #b45309; }

.newzlet-sources {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--nz-surface);
  border-left: 3px solid var(--nz-accent);
  border-radius: 0 var(--nz-radius) var(--nz-radius) 0;
  font-size: 0.875rem;
}

.newzlet-sources h4 {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nz-text-3);
}

.newzlet-sources ol { margin: 0; padding-left: 1.25rem; color: var(--nz-text-2); }
.newzlet-sources li { margin-bottom: 0.25rem; word-break: break-all; }
.newzlet-sources a { color: var(--nz-accent); }

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.site-footer,
.site-info,
.footer-bar {
  --base-3:   #09090b;
  --contrast: rgba(250,250,250,.55);
  --accent:   rgba(250,250,250,.55);
}

.site-info a:hover,
.footer-bar a:hover { color: #fff !important; text-decoration: none; }

.nz-footer-brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: #fff !important;
}

/* ═══════════════════════════════════════════════════
   SINGLE ARTICLE — FULL WIDTH STACKED LAYOUT
   GP makes .site-content a flex row, which puts our
   .nz-article-wrap and .nz-container side by side.
   Switch it to block so they stack vertically.
═══════════════════════════════════════════════════ */
.nz-article-page .site-content { display: block !important; }
.nz-article-page #secondary,
.nz-article-page .widget-area  { display: none !important; }

/* ═══════════════════════════════════════════════════
   SUPPRESS GP DEFAULT CHROME on our custom pages
═══════════════════════════════════════════════════ */
.nz-article-page .entry-header,
.nz-article-page .entry-footer,
.nz-article-page .post-image,
.nz-article-page .entry-meta { display: none !important; }

.nz-article-page .entry-content { margin: 0 !important; padding: 0 !important; }

.nz-homepage-page .entry-header,
.nz-homepage-page .post-image,
.nz-homepage-page .entry-footer { display: none !important; }

.nz-homepage-page .entry-content { padding: 0 !important; margin: 0 !important; }

/* ═══════════════════════════════════════════════════
   CATEGORY ARCHIVE HEADER
═══════════════════════════════════════════════════ */
.nz-cat-header {
  background: #09090b;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 2.75rem 0 2.5rem;
}

.nz-cat-header__inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nz-cat-header__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0;
  line-height: 1.15;
}

.nz-cat-header__meta {
  font-size: 0.875rem;
  color: rgba(250,250,250,.45);
  font-weight: 500;
  margin: 0;
}

.nz-cat-header__desc {
  font-size: 1rem;
  color: rgba(250,250,250,.65);
  margin: 0.25rem 0 0;
  max-width: 600px;
  line-height: 1.6;
}

/* Accent line on left edge per category colour */
.nz-cat-header--ai-machine-learning,
.nz-cat-header--ai         { border-left: 5px solid var(--cat-ai); }
.nz-cat-header--consumer-tech,
.nz-cat-header--tech       { border-left: 5px solid var(--cat-tech); }
.nz-cat-header--startups-business,
.nz-cat-header--business   { border-left: 5px solid var(--cat-business); }
.nz-cat-header--gadgets-reviews,
.nz-cat-header--gadgets    { border-left: 5px solid var(--cat-gadgets); }
.nz-cat-header--cybersecurity,
.nz-cat-header--security   { border-left: 5px solid var(--cat-security); }
.nz-cat-header--crypto-fintech,
.nz-cat-header--crypto     { border-left: 5px solid var(--cat-crypto); }
.nz-cat-header--health     { border-left: 5px solid var(--cat-health); }

/* Suppress GP's default archive chrome */
.nz-archive-page .site-content   { display: block !important; }
.nz-archive-page #secondary,
.nz-archive-page .widget-area    { display: none !important; }
.nz-archive-page .page-header    { display: none !important; }
.nz-archive-page .entry-header,
.nz-archive-page .entry-footer,
.nz-archive-page .entry-meta,
.nz-archive-page .post-image     { display: none !important; }
.nz-archive-page .entry-content  { margin: 0 !important; padding: 0 !important; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nz-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .nz-grid { grid-template-columns: 1fr; }

  .nz-hero__link,
  .nz-hero__content { min-height: 340px; }

  .nz-hero__content { padding: 1.25rem; }
  .nz-hero__title { font-size: 1.5rem; }

  .nz-container { padding: 0 1rem; }
  .nz-article-wrap { padding: 1.25rem 1rem; }
}
