/*
Theme Name: TechBlog.AI
Theme URI: https://techblog.ai
Description: TechBlog.AI Custom Theme - HBR Style
Version: 1.0
Author: TechBlog.AI
*/

/* Reset WordPress defaults */
body { margin:0 !important; padding:0 !important; }


:root {
  --red:    #c1121f;
  --ink:    #1a1a1a;
  --soft:   #444444;
  --muted:  #767676;
  --rule:   #d8d8d8;
  --bg:     #ffffff;
  --offbg:  #f7f6f3;
  --tag-bg: #f0efec;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; }
body { font-family:'Source Sans 3', Georgia, serif; background:var(--bg); color:var(--ink); -webkit-font-smoothing:antialiased; }
a { color:inherit; text-decoration:none; }
img { display:block; max-width:100%; }

/* ── ASTRA FULL WIDTH OVERRIDE ── */
/* Hide Astra header and footer */
.main-header-bar-wrap,
.ast-main-header-wrap,
#masthead,
.site-header,
.ast-site-header-wrap,
.ast-header-break-point,
#colophon,
.site-footer,
.ast-site-footer,
.footer-widget-area,
.ast-footer-overlay,
h1.entry-title,
.entry-header,
.ast-breadcrumbs-wrapper { display: none !important; }

/* Make Astra containers full width */
#ast-container,
#primary,
#secondary,
.ast-article-single,
.site-content,
.ast-container,
.entry-content,
.ast-grid-right-sidebar,
.ast-grid-left-sidebar,
#content,
.ast-page-builder-template,
.page-content,
main#main,
.ast-separate-container,
.ast-plain-container { 
  max-width: 100% !important; 
  width: 100% !important;
  padding: 0 !important; 
  margin: 0 !important;
  float: none !important;
  display: block !important;
}

/* Remove any body/html restrictions */
body, html {
  overflow-x: hidden !important;
  padding-top: 0 !important;
}

/* ── TOP BAR ── */
.topbar {
  background:var(--ink);
  color:rgba(255,255,255,0.7);
  font-family:'Source Sans 3', sans-serif;
  font-size:0.72rem;
  letter-spacing:0.06em;
  text-transform:uppercase;
  text-align:center;
  padding:7px 1rem;
}
.topbar a { color:white; font-weight:600; border-bottom:1px solid rgba(255,255,255,0.4); }

/* ── HEADER ── */
header { border-bottom:3px solid var(--ink); }

.header-top {
  max-width:1280px;
  margin:0 auto;
  padding:1.25rem 2rem 1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
}

.logo-wrap { text-align:center; flex:1; }

.logo {
  font-family:'Playfair Display', Georgia, serif;
  font-size:2.6rem;
  font-weight:700;
  letter-spacing:-0.01em;
  color:var(--ink);
  line-height:1;
  display:inline-block;
}

.logo span {
  color:var(--red);
}

.logo-tagline {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.72rem;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--muted);
  margin-top:4px;
}

.header-actions {
  display:flex;
  gap:0.75rem;
  align-items:center;
  min-width:200px;
  justify-content:flex-end;
}

.btn-sub {
  background:var(--red);
  color:white;
  font-family:'Source Sans 3', sans-serif;
  font-size:0.72rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.1em;
  padding:0.5rem 1.1rem;
  border:none;
  cursor:pointer;
  transition:background 0.2s;
}
.btn-sub:hover { background:#9e0e1a; }

.btn-search {
  background:none;
  border:1px solid var(--rule);
  color:var(--soft);
  font-size:0.85rem;
  padding:0.45rem 0.75rem;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:0.4rem;
  font-family:'Source Sans 3', sans-serif;
  transition:border-color 0.2s;
}
.btn-search:hover { border-color:var(--ink); }

/* ── NAV ── */
.main-nav {
  border-top:1px solid var(--rule);
  background:var(--bg);
  position:sticky;
  top:0;
  z-index:100;
  box-shadow:0 1px 0 var(--rule);
}

.nav-inner {
  max-width:1280px;
  margin:0 auto;
  padding:0 2rem;
  display:flex;
  align-items:center;
  gap:0;
  overflow-x:auto;
  scrollbar-width:none;
}
.nav-inner::-webkit-scrollbar { display:none; }

.nav-inner a {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.8rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.09em;
  color:var(--soft);
  padding:0.85rem 1rem;
  border-bottom:3px solid transparent;
  white-space:nowrap;
  transition:color 0.15s, border-color 0.15s;
  cursor:pointer;
}
.nav-inner a:hover, .nav-inner a.active {
  color:var(--ink);
  border-bottom-color:var(--red);
}

/* ── TICKER ── */
.ticker-bar {
  border-bottom:1px solid var(--rule);
  display:flex;
  align-items:center;
  overflow:hidden;
}
.ticker-label {
  background:var(--red);
  color:white;
  font-family:'Source Sans 3',sans-serif;
  font-size:0.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.12em;
  padding:0.45rem 0.9rem;
  white-space:nowrap;
  flex-shrink:0;
}
.ticker-scroll {
  overflow:hidden;
  flex:1;
  padding:0 1.5rem;
}
.ticker-track {
  display:inline-block;
  white-space:nowrap;
  animation:ticker 70s linear infinite;
  font-family:'Source Sans 3',sans-serif;
  font-size:0.78rem;
  color:var(--soft);
}
.ticker-track span { margin:0 2.5rem; }
.ticker-track span::before { content:'— '; color:var(--muted); }
@keyframes ticker { 0%{transform:translateX(60vw)} 100%{transform:translateX(-100%)} }

/* ── LAYOUT ── */
.page-wrap {
  max-width:1280px;
  margin:0 auto;
  padding:0 2rem;
}

/* ── HERO GRID ── */
.hero-section {
  padding:2rem 0 0;
  border-bottom:1px solid var(--rule);
  margin-bottom:2.5rem;
}

.hero-grid {
  display:grid;
  grid-template-columns:1fr 1px 320px;
  gap:0;
}

.hero-divider { background:var(--rule); margin:0 2rem; }

/* MAIN FEATURE */
.hero-main {
  padding-bottom:2rem;
  padding-right:2rem;
  cursor:pointer;
}

.hero-main:hover .hero-main-title { text-decoration:underline; text-decoration-color:var(--rule); }

.hero-cat-label {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.7rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.13em;
  color:var(--red);
  margin-bottom:0.6rem;
  display:block;
}

.hero-main-img {
  width:100%;
  aspect-ratio:16/9;
  background:var(--offbg);
  margin-bottom:1.25rem;
  overflow:hidden;
  position:relative;
}

.hero-main-img-inner {
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:5rem;
  background:linear-gradient(145deg,#1a1a2e,#16213e,#0f3460);
  position:relative;
}

.hero-main-title {
  font-family:'Playfair Display', Georgia, serif;
  font-size:2rem;
  font-weight:700;
  line-height:1.25;
  color:var(--ink);
  margin-bottom:0.75rem;
  letter-spacing:-0.01em;
}

.hero-main-dek {
  font-family:'Source Sans 3', sans-serif;
  font-size:1rem;
  color:var(--soft);
  line-height:1.55;
  margin-bottom:0.75rem;
  font-weight:300;
}

.hero-meta {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.75rem;
  color:var(--muted);
  display:flex;
  gap:0.75rem;
  align-items:center;
}

/* HERO SIDEBAR LIST */
.hero-sidebar {
  padding-bottom:2rem;
  padding-left:2rem;
}

.hero-sidebar-heading {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.15em;
  color:var(--muted);
  margin-bottom:1rem;
  padding-bottom:0.5rem;
  border-bottom:2px solid var(--ink);
}

.sidebar-article {
  padding:1rem 0;
  border-bottom:1px solid var(--rule);
  cursor:pointer;
}
.sidebar-article:last-child { border-bottom:none; }
.sidebar-article:hover .sa-title { text-decoration:underline; text-decoration-color:var(--rule); }

.sa-cat {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.67rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.12em;
  color:var(--red);
  margin-bottom:0.35rem;
  display:block;
}

.sa-title {
  font-family:'Playfair Display', Georgia, serif;
  font-size:1rem;
  font-weight:600;
  line-height:1.3;
  color:var(--ink);
  margin-bottom:0.35rem;
}

.sa-meta {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.72rem;
  color:var(--muted);
}

/* ── SECTION RULES ── */
.section-rule {
  display:flex;
  align-items:baseline;
  gap:1rem;
  margin-bottom:1.25rem;
  border-top:3px solid var(--ink);
  padding-top:0.6rem;
}
.section-rule-title {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.72rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.15em;
  color:var(--ink);
  white-space:nowrap;
}
.section-rule-line {
  flex:1;
  height:1px;
  background:var(--rule);
}
.section-rule-link {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.72rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:var(--red);
  white-space:nowrap;
  cursor:pointer;
}
.section-rule-link:hover { text-decoration:underline; }

/* ── MAIN + SIDEBAR LAYOUT ── */
.content-layout {
  display:grid;
  grid-template-columns:1fr 1px 300px;
  gap:0;
  margin-bottom:3rem;
}

.content-main { padding-right:2.5rem; }
.content-div  { background:var(--rule); margin:0 0; }
.content-side { padding-left:2.5rem; }

/* ── ARTICLE LIST (HBR text-list style) ── */
.article-list-item {
  padding:1.25rem 0;
  border-bottom:1px solid var(--rule);
  cursor:pointer;
  display:grid;
  grid-template-columns:1fr 100px;
  gap:1.25rem;
  align-items:start;
}
.article-list-item:first-child { padding-top:0; }
.article-list-item:last-child { border-bottom:none; }
.article-list-item:hover .ali-title { text-decoration:underline; text-decoration-color:var(--rule); }

.ali-cat {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.67rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.12em;
  margin-bottom:0.35rem;
  display:block;
}
.ali-cat.ai     { color:#5b21b6; }
.ali-cat.cyber  { color:#0369a1; }
.ali-cat.web    { color:#b45309; }
.ali-cat.gadget { color:var(--red); }

.ali-title {
  font-family:'Playfair Display', Georgia, serif;
  font-size:1.05rem;
  font-weight:600;
  line-height:1.3;
  color:var(--ink);
  margin-bottom:0.35rem;
}

.ali-dek {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.85rem;
  color:var(--soft);
  line-height:1.5;
  font-weight:300;
  margin-bottom:0.4rem;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.ali-meta {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.72rem;
  color:var(--muted);
}

.ali-thumb {
  width:100px;
  height:70px;
  background:var(--offbg);
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2rem;
  overflow:hidden;
}
.ali-thumb.ai     { background:#ede9fe; }
.ali-thumb.cyber  { background:#e0f2fe; }
.ali-thumb.web    { background:#fef3c7; }
.ali-thumb.gadget { background:#ffe4e6; }

/* ── CATEGORY STRIP (cards) ── */
.cat-strip {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1.5px;
  background:var(--rule);
  border:1px solid var(--rule);
  margin-bottom:2.5rem;
}

.cat-card {
  background:var(--bg);
  padding:1.25rem;
  cursor:pointer;
  transition:background 0.15s;
}
.cat-card:hover { background:var(--offbg); }

.cat-card-label {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.67rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.13em;
  margin-bottom:0.6rem;
  display:block;
}
.cat-card-label.ai     { color:#5b21b6; }
.cat-card-label.cyber  { color:#0369a1; }
.cat-card-label.web    { color:#b45309; }
.cat-card-label.gadget { color:var(--red); }

.cat-card-title {
  font-family:'Playfair Display', Georgia, serif;
  font-size:0.95rem;
  font-weight:600;
  line-height:1.35;
  color:var(--ink);
  margin-bottom:0.35rem;
}
.cat-card:hover .cat-card-title { text-decoration:underline; text-decoration-color:var(--rule); }

.cat-card-meta {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.7rem;
  color:var(--muted);
}

/* ── SIDEBAR WIDGETS ── */
.widget { margin-bottom:2rem; }

.widget-rule {
  border-top:3px solid var(--ink);
  padding-top:0.6rem;
  margin-bottom:1rem;
  font-family:'Source Sans 3', sans-serif;
  font-size:0.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.15em;
  color:var(--ink);
}

.trending-item {
  padding:0.85rem 0;
  border-bottom:1px solid var(--rule);
  cursor:pointer;
  display:flex;
  gap:0.85rem;
}
.trending-item:last-child { border-bottom:none; }
.trending-item:hover .ti-title { text-decoration:underline; }

.ti-num {
  font-family:'Playfair Display', Georgia, serif;
  font-size:1.5rem;
  font-weight:400;
  color:var(--rule);
  line-height:1;
  flex-shrink:0;
  margin-top:2px;
  min-width:22px;
}
.trending-item:hover .ti-num { color:var(--red); }

.ti-body {}
.ti-cat {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.65rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:var(--red);
  margin-bottom:0.2rem;
  display:block;
}
.ti-title {
  font-family:'Source Sans 3', sans-serif;
  font-size:0.85rem;
  font-weight:600;
  line-height:1.35;
  color:var(--ink);
}
.ti-meta { font-size:0.7rem; color:var(--muted); margin-top:0.2rem; font-family:'Source Sans 3',sans-serif; }

/* Newsletter */
.newsletter-box {
  background:var(--offbg);
  border:1px solid var(--rule);
  padding:1.25rem;
}
.newsletter-box p {
  font-family:'Source Sans 3',sans-serif;
  font-size:0.82rem;
  color:var(--soft);
  line-height:1.5;
  margin-bottom:0.85rem;
  font-weight:300;
}
.nl-input {
  width:100%;
  border:1px solid var(--rule);
  padding:0.55rem 0.75rem;
  font-family:'Source Sans 3',sans-serif;
  font-size:0.85rem;
  outline:none;
  margin-bottom:0.5rem;
  background:white;
  transition:border-color 0.2s;
}
.nl-input:focus { border-color:var(--ink); }
.nl-btn {
  width:100%;
  background:var(--red);
  color:white;
  border:none;
  padding:0.6rem;
  font-family:'Source Sans 3',sans-serif;
  font-weight:700;
  font-size:0.75rem;
  text-transform:uppercase;
  letter-spacing:0.1em;
  cursor:pointer;
  transition:background 0.2s;
}
.nl-btn:hover { background:#9e0e1a; }

/* Refresh widget */
.refresh-widget {
  background:var(--ink);
  color:white;
  padding:1.25rem;
  text-align:center;
}
.rw-label {
  font-family:'Source Sans 3',sans-serif;
  font-size:0.65rem;
  text-transform:uppercase;
  letter-spacing:0.15em;
  color:rgba(255,255,255,0.5);
  margin-bottom:0.4rem;
}
.rw-timer {
  font-family:'Playfair Display',Georgia,serif;
  font-size:2.2rem;
  font-weight:400;
  color:white;
  margin-bottom:0.4rem;
  letter-spacing:0.05em;
}
.rw-sub {
  font-family:'Source Sans 3',sans-serif;
  font-size:0.7rem;
  color:rgba(255,255,255,0.4);
  margin-bottom:0.85rem;
}
.rw-btn {
  background:var(--red);
  color:white;
  border:none;
  padding:0.5rem 1.25rem;
  font-family:'Source Sans 3',sans-serif;
  font-size:0.72rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.1em;
  cursor:pointer;
  transition:background 0.2s;
}
.rw-btn:hover { background:#9e0e1a; }

/* ── TOPIC SECTIONS ── */
.topic-section { margin-bottom:3rem; }

/* ── FULL-WIDTH PROMO ── */
.promo-band {
  background:var(--offbg);
  border-top:1px solid var(--rule);
  border-bottom:1px solid var(--rule);
  padding:2rem;
  margin:2.5rem 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
}
.promo-band-text {}
.promo-band-eyebrow {
  font-family:'Source Sans 3',sans-serif;
  font-size:0.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.15em;
  color:var(--muted);
  margin-bottom:0.5rem;
}
.promo-band-title {
  font-family:'Playfair Display',Georgia,serif;
  font-size:1.5rem;
  font-weight:700;
  color:var(--ink);
  margin-bottom:0.4rem;
}
.promo-band-dek {
  font-family:'Source Sans 3',sans-serif;
  font-size:0.9rem;
  color:var(--soft);
  font-weight:300;
}
.promo-band-action { flex-shrink:0; }

/* ── MODAL ── */
.modal-overlay {
  position:fixed; inset:0;
  background:rgba(0,0,0,0.5);
  z-index:500;
  display:flex; align-items:flex-start; justify-content:center;
  padding:2rem 1rem;
  opacity:0; pointer-events:none;
  transition:opacity 0.25s;
  overflow-y:auto;
}
.modal-overlay.open { opacity:1; pointer-events:all; }
.modal {
  background:white;
  max-width:700px; width:100%;
  border-top:4px solid var(--red);
  transform:translateY(20px);
  transition:transform 0.25s;
  margin:auto;
}
.modal-overlay.open .modal { transform:translateY(0); }
.modal-head {
  padding:1.75rem 2rem 1.25rem;
  border-bottom:1px solid var(--rule);
  display:flex; gap:1rem; justify-content:space-between; align-items:flex-start;
}
.modal-close {
  background:none; border:1px solid var(--rule);
  width:30px; height:30px;
  cursor:pointer; font-size:1rem;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; color:var(--soft);
  transition:all 0.15s;
}
.modal-close:hover { border-color:var(--ink); color:var(--ink); }
.modal-cat {
  font-family:'Source Sans 3',sans-serif;
  font-size:0.68rem; font-weight:700;
  text-transform:uppercase; letter-spacing:0.13em;
  color:var(--red); margin-bottom:0.5rem; display:block;
}
.modal-title {
  font-family:'Playfair Display',Georgia,serif;
  font-size:1.5rem; font-weight:700; line-height:1.25;
  color:var(--ink);
}
.modal-body { padding:1.5rem 2rem 2rem; }
.modal-body p {
  font-family:'Source Sans 3',sans-serif;
  font-size:0.95rem; line-height:1.7;
  color:var(--soft); font-weight:300;
}
.modal-foot {
  padding:1.25rem 2rem;
  border-top:1px solid var(--rule);
  display:flex; gap:0.75rem;
}

/* ── FOOTER ── */
footer {
  border-top:3px solid var(--ink);
  background:var(--ink);
  color:rgba(255,255,255,0.7);
  padding:2.5rem 2rem 1.5rem;
}
.footer-inner { max-width:1280px; margin:0 auto; }
.footer-top {
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:2.5rem;
  padding-bottom:2rem;
  border-bottom:1px solid rgba(255,255,255,0.1);
  margin-bottom:1.25rem;
}
.footer-brand-name {
  font-family:'Playfair Display',Georgia,serif;
  font-size:1.6rem; font-weight:700;
  color:white; margin-bottom:0.6rem;
}
.footer-brand-name span { color:var(--red); }
.footer-brand-desc {
  font-family:'Source Sans 3',sans-serif;
  font-size:0.82rem; line-height:1.6;
  color:rgba(255,255,255,0.45);
  max-width:260px; font-weight:300;
}
.footer-col h4 {
  font-family:'Source Sans 3',sans-serif;
  font-size:0.67rem; font-weight:700;
  text-transform:uppercase; letter-spacing:0.15em;
  color:rgba(255,255,255,0.4);
  margin-bottom:0.85rem;
}
.footer-col a {
  display:block;
  font-family:'Source Sans 3',sans-serif;
  font-size:0.82rem; color:rgba(255,255,255,0.6);
  margin-bottom:0.45rem; transition:color 0.15s;
}
.footer-col a:hover { color:white; }
.footer-bottom {
  display:flex; align-items:center;
  justify-content:space-between;
  font-family:'Source Sans 3',sans-serif;
  font-size:0.72rem; color:rgba(255,255,255,0.3);
}

/* ── LOADING ── */
.skeleton {
  background:linear-gradient(90deg,#f0f0f0 25%,#e8e8e8 50%,#f0f0f0 75%);
  background-size:200% 100%;
  animation:shimmer 1.5s infinite;
}
@keyframes shimmer { to{background-position:-200% 0} }

/* ── RESPONSIVE ── */
@media(max-width:960px) {
  .hero-grid { grid-template-columns:1fr; }
  .hero-divider { display:none; }
  .hero-sidebar { padding-left:0; border-top:1px solid var(--rule); margin-top:1.5rem; padding-top:1.5rem; }
  .hero-main { padding-right:0; }
  .content-layout { grid-template-columns:1fr; }
  .content-div { display:none; }
  .content-side { padding-left:0; border-top:1px solid var(--rule); padding-top:2rem; margin-top:1rem; }
  .cat-strip { grid-template-columns:1fr 1fr; }
  .footer-top { grid-template-columns:1fr 1fr; }
}
@media(max-width:600px) {
  .header-top { flex-direction:column; padding:1rem; gap:0.5rem; }
  .header-actions { justify-content:center; }
  .logo { font-size:2rem; }
  .hero-main-title { font-size:1.6rem; }
  .cat-strip { grid-template-columns:1fr; }
  .footer-top { grid-template-columns:1fr; gap:1.5rem; }
  .article-list-item { grid-template-columns:1fr; }
  .ali-thumb { display:none; }
  .page-wrap { padding:0 1rem; }
}
