/* ═══════════════════════════════════════════════════════
   LEANSIMCORP BLOG — STYLESHEET
   Theme: White Editorial · Fraunces + Nunito Sans
   ═══════════════════════════════════════════════════════ */

/* ── VARIABLES ──────────────────────────────────────── */
:root {
  --white:       #ffffff;
  --bg:          #f7f6f3;
  --bg-card:     #ffffff;
  --border:      #e8e4de;
  --border-light:#f0ede8;
  --text:        #1a1a1a;
  --text-2:      #3d3d3d;
  --text-muted:  #767676;
  --accent:      #c94a0a;        /* warm burnt-orange */
  --accent-light:#fff0e8;
  --accent-dark: #a33a06;
  --header-h:    56px;
  --r:           8px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.07);
  --shadow-md:   0 4px 16px rgba(0,0,0,.09);
  --font-head:   'Fraunces', Georgia, serif;
  --font-body:   'Nunito Sans', 'Segoe UI', sans-serif;
  --max-w:       1200px;
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }
ul { list-style: none; }

/* ── CONTAINER ──────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow-sm);
}

/* Top bar */
.header-top {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  padding: 6px 0;
}
.header-top-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.header-tagline { letter-spacing: 0.06em; font-weight: 700; color: var(--text-muted); text-transform: uppercase; font-size: 0.68rem; }
.header-top-links { display: flex; gap: 16px; }
.header-top-links a { color: var(--text-muted); font-weight: 600; transition: color .2s; }
.header-top-links a:hover { color: var(--accent); }
.divider { color: var(--border); }

/* Main bar */
.header-main { padding: 0; }
.header-main-inner {
  display: flex; align-items: center;
  gap: 24px; height: 60px;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}
.logo-name { font-size: 1.3rem; color: var(--text); }
.logo-sep  { color: var(--border); font-weight: 300; font-size: 1.2rem; }
.logo-sub  { font-size: 0.85rem; font-weight: 600; color: var(--accent); letter-spacing: .03em; font-family: var(--font-body); }

/* Nav */
.main-nav { display: flex; gap: 2px; margin-left: auto; }
.nav-link {
  font-size: 0.82rem; font-weight: 600;
  padding: 6px 12px; border-radius: 20px;
  color: var(--text-muted); cursor: pointer;
  transition: all .18s; white-space: nowrap;
  border: none; background: none;
}
.nav-link:hover { color: var(--accent); background: var(--accent-light); }
.nav-link.active { color: var(--accent); background: var(--accent-light); }

/* Search toggle */
.search-toggle {
  background: none; border: none;
  color: var(--text-muted); padding: 8px;
  border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center;
  transition: all .18s;
}
.search-toggle:hover { background: var(--bg); color: var(--accent); }

/* Search bar */
.search-bar-wrap {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  padding: 0;
}
.search-bar-wrap.open { max-height: 80px; padding: 10px 0 12px; }
.search-bar-inner {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 8px 14px;
  transition: border-color .2s;
}
.search-bar-inner:focus-within { border-color: var(--accent); }
.search-bar-inner svg { color: var(--text-muted); flex-shrink: 0; }
.search-bar-inner input {
  flex: 1; border: none; background: none;
  font-family: var(--font-body); font-size: .9rem;
  color: var(--text); outline: none;
}
.search-bar-inner input::placeholder { color: var(--text-muted); }
#search-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1rem; padding: 2px 4px; border-radius: 4px;
  transition: color .2s;
}
#search-close:hover { color: var(--accent); }

/* Mobile pills */
.mobile-pills-bar {
  border-top: 1px solid var(--border-light);
  display: none;
  overflow: hidden;
}
.mobile-pills-scroll {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 10px 0;
  scrollbar-width: none;
}
.mobile-pills-scroll::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0; padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .78rem; font-weight: 600;
  color: var(--text-muted); background: none;
  transition: all .18s;
}
.pill:hover, .pill.active {
  background: var(--accent); border-color: var(--accent);
  color: var(--white);
}

/* ═══════════════════════════════════════════════════════
   AD ZONES
   ═══════════════════════════════════════════════════════ */
.ad-zone { background: var(--bg); padding: 12px 0; }
.ad-zone--leaderboard { border-bottom: 1px solid var(--border-light); }
.ad-zone--prefooter   { border-top: 1px solid var(--border-light); margin-top: 40px; }

.ad-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--r);
  position: relative;
  margin: 0 auto;
}
.ad-placeholder__label {
  font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}
.ad-placeholder--728x90  { width: 100%; max-width: 728px; height: 90px; }
.ad-placeholder--300x250 { width: 300px; max-width: 100%; height: 250px; }
.ad-placeholder--responsive { width: 100%; min-height: 100px; height: auto; padding: 40px; }

.ad-zone--infeed { margin: 32px 0; }
.ad-zone--sidebar .ad-placeholder { width: 100%; max-width: 100%; }

.sticky-ad { position: sticky; top: 130px; }

/* ═══════════════════════════════════════════════════════
   FEATURED / HERO
   ═══════════════════════════════════════════════════════ */
.featured-section { padding: 36px 0 0; }

.section-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-muted); margin-bottom: 20px;
}
.eyebrow-line { flex: 1; height: 1px; background: var(--border); }

.hero-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.hero-img-link { display: block; overflow: hidden; }
.hero-img-link img {
  width: 100%; height: 100%;
  object-fit: cover; min-height: 300px;
  transition: transform .4s;
}
.hero-img-link:hover img { transform: scale(1.03); }
.hero-img-ph {
  min-height: 300px; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light);
  font-family: var(--font-head); font-size: 1.5rem;
  color: var(--accent); font-weight: 700;
}

.hero-body {
  padding: 36px 36px 36px 8px;
  display: flex; flex-direction: column;
  justify-content: center; gap: 16px;
}

.badge {
  display: inline-block;
  background: var(--accent); color: var(--white);
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 10px; border-radius: 20px;
  width: fit-content;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700; line-height: 1.2;
  color: var(--text);
}
.hero-title a:hover { color: var(--accent); }

.hero-excerpt {
  font-size: .95rem; color: var(--text-2);
  line-height: 1.75; flex: 1;
}

.hero-foot {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.hero-foot time { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.hero-read {
  font-size: .83rem; font-weight: 700;
  color: var(--accent); transition: gap .2s;
}
.hero-read:hover { text-decoration: underline; }

/* Hero skeleton */
.hero-skeleton {
  display: grid; grid-template-columns: 1fr 1fr;
  width: 100%; min-height: 300px;
}
.sk-hero-img { background: var(--bg); min-height: 300px; }
.sk-hero-body {
  padding: 36px 36px 36px 8px;
  display: flex; flex-direction: column; gap: 14px;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════ */
.site-main { padding: 40px 0 60px; }

.main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* Section header */
.articles-header {
  display: flex; align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--text);
  padding-bottom: 10px; margin-bottom: 28px;
}
.articles-heading {
  font-family: var(--font-head);
  font-size: 1.25rem; font-weight: 700;
  color: var(--text);
}
.articles-count {
  font-size: .78rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: .04em;
}

/* ═══════════════════════════════════════════════════════
   POST CARDS GRID
   ═══════════════════════════════════════════════════════ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .22s, transform .22s;
  box-shadow: var(--shadow-sm);
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-thumb {
  display: block; position: relative;
  aspect-ratio: 16/9; overflow: hidden;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb-ph {
  width: 100%; height: 100%;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
}
.card-thumb-ph span {
  font-family: var(--font-head); font-size: 1rem;
  color: var(--accent); font-weight: 600;
}

.card-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: var(--white);
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 20px;
}

.card-body {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; flex: 1;
  gap: 8px;
}
.card-date { font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.card-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; line-height: 1.35; color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-excerpt { font-size: .85rem; color: var(--text-2); line-height: 1.65; flex: 1; }
.card-link { font-size: .78rem; font-weight: 700; color: var(--accent); margin-top: 4px; transition: text-decoration .15s; }
.card-link:hover { text-decoration: underline; }

/* ─── Skeleton cards ─────────────────────────────────── */
.sk-card { pointer-events: none; }
.sk { background: var(--bg); border-radius: 4px; animation: pulse 1.3s ease infinite; }
.sk-img   { aspect-ratio: 16/9; width: 100%; border-radius: 0; }
.sk-sm    { height: 12px; width: 40%; }
.sk-lg    { height: 18px; width: 90%; }
.sk-md    { height: 13px; width: 75%; }
.sk-hero-img { background: var(--bg); min-height: 300px; animation: pulse 1.3s ease infinite; }

@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .45; }
}

/* ─── Empty + Load more ──────────────────────────────── */
.empty-msg { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: .95rem; }
.load-more-wrap { display: flex; justify-content: center; padding: 24px 0 12px; }
.load-more-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 2px solid var(--accent);
  color: var(--accent); font-weight: 700; font-size: .88rem;
  padding: 11px 28px; border-radius: 30px;
  transition: all .2s;
}
.load-more-btn:hover { background: var(--accent); color: var(--white); }

/* ═══════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════ */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}
.widget--accent { background: var(--accent-light); border-color: #f0c6ac; }

.about-badge {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}

.widget-title {
  font-family: var(--font-head); font-size: 1rem;
  font-weight: 700; color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  width: fit-content;
}

.widget-text { font-size: .85rem; color: var(--text-2); line-height: 1.65; margin-bottom: 14px; }

.widget-btn {
  display: inline-block;
  background: var(--accent); color: var(--white);
  font-size: .8rem; font-weight: 700;
  padding: 9px 18px; border-radius: 6px;
  transition: background .2s;
}
.widget-btn:hover { background: var(--accent-dark); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud-item {
  background: none; border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px;
  font-size: .75rem; font-weight: 600; color: var(--text-muted);
  transition: all .18s;
}
.tag-cloud-item:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* Subscribe form */
.subscribe-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.subscribe-form input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: 6px;
  font-family: var(--font-body); font-size: .85rem;
  color: var(--text); background: var(--white);
  transition: border-color .2s; outline: none;
}
.subscribe-form input:focus { border-color: var(--accent); }
.subscribe-form button {
  width: 100%; padding: 9px;
  background: var(--accent); color: var(--white);
  border: none; border-radius: 6px;
  font-weight: 700; font-size: .85rem;
  transition: background .2s;
}
.subscribe-form button:hover { background: var(--accent-dark); }

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.site-footer {
  background: var(--text);
  color: #ccc;
  padding: 52px 0 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid #333;
}

.footer-logo .logo-name { color: var(--white); }
.footer-logo .logo-sub  { color: var(--accent); }

.footer-about p {
  font-size: .85rem; line-height: 1.7;
  color: #aaa; margin: 12px 0 18px;
  max-width: 280px;
}

.social-row { display: flex; gap: 16px; }
.social-row a {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: #888;
  transition: color .2s;
}
.social-row a:hover { color: var(--accent); }

.footer-col h4 {
  font-family: var(--font-head); font-weight: 700;
  font-size: .9rem; color: var(--white);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  font-size: .82rem; color: #888;
  transition: color .2s; cursor: pointer;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center; padding: 18px 0;
  font-size: .75rem; color: #555;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .sticky-ad { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-pills-bar { display: block; }
  .hero-post { grid-template-columns: 1fr; }
  .hero-img-link img { min-height: 200px; }
  .hero-body { padding: 24px; }
  .hero-skeleton { grid-template-columns: 1fr; }
  .sk-hero-img { min-height: 200px; }
  .header-top .header-tagline { display: none; }
  .header-top-links { font-size: 0.7rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .sidebar { display: flex; flex-direction: column; }
  .ad-placeholder--728x90 { height: 60px; }
  .ad-placeholder--300x250 { width: 100%; height: 200px; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .hero-body { padding: 18px; }
  .hero-title { font-size: 1.35rem; }
  .articles-heading { font-size: 1.1rem; }
}
