/* ============================================================
   THEME EXTRA — Category row grids, section layout, polish
   ============================================================ */

/* ── Category Section Rows ── */
.category-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

.category-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.cat-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: .5rem;
}

.cat-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}

.cat-thumb:hover img { transform: scale(1.03); }

.cat-side-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--color-border);
}

.cat-side-list .story-item {
  padding: .7rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cat-side-list .story-item:last-child {
  border-bottom: none;
}

/* ── Article body heading refinements ── */
.article-body h3 + p {
  margin-top: .5rem;
}

/* ── Action Steps section — special callout style ── */
.article-body h3[id*="action"],
.article-body h3:has(+ ul) {
  background: var(--color-accent);
  padding: .6rem 1rem;
  border-left: 4px solid var(--color-brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-left: -1rem;
}

/* ── Sources section muted style ── */
.article-body h3:last-of-type {
  color: var(--color-ink-soft);
  font-size: var(--text-base);
  border-left-color: var(--color-border);
}

/* ── Blockquote pull-quote style ── */
.article-body blockquote p {
  font-size: var(--text-md);
  margin: 0;
}

/* ── Tag cloud on archive ── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ── Search overlay ── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.search-overlay[hidden] { display: none; }

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.search-overlay-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.search-overlay-form {
  display: flex;
  flex: 1;
  align-items: center;
}

.search-overlay-form input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 1rem 1.25rem;
  font-size: var(--text-lg);
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: transparent;
  -webkit-appearance: none;
}

.search-overlay-form input[type="search"]::placeholder {
  color: var(--color-ink-muted);
}

.search-overlay-form button[type="submit"] {
  padding: 0 1.25rem;
  background: none;
  border: none;
  color: var(--color-ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  align-self: stretch;
  transition: color .15s;
}

.search-overlay-form button[type="submit"]:hover { color: var(--color-brand); }

.search-overlay-close {
  padding: 0 1rem;
  background: none;
  border: none;
  border-left: 1px solid var(--color-border);
  color: var(--color-ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  align-self: stretch;
  transition: color .15s, background .15s;
}

.search-overlay-close:hover {
  color: var(--color-brand);
  background: var(--color-surface);
}

/* ── Search form (widget/sidebar) ── */
.search-form {
  display: flex;
  gap: .5rem;
}

.search-form input[type="search"] {
  flex: 1;
  padding: .5rem .75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-family: inherit;
  background: var(--color-surface);
}

.search-form button,
.search-form input[type="submit"] {
  padding: .5rem 1rem;
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: background .15s;
}

.search-form button:hover,
.search-form input[type="submit"]:hover {
  background: var(--color-brand-dark);
}

/* ── No-thumbnail fallback ── */
.thumb-placeholder {
  background: linear-gradient(135deg, var(--color-accent), var(--color-border));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── AI disclosure notice ── */
.ai-disclosure {
  font-size: .75rem;
  color: var(--color-ink-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .625rem .875rem;
  margin-top: 1.5rem;
  line-height: 1.5;
}

/* ── Sticky header — desktop only ── */
@media (min-width: 768px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
  }
}

/* ── Hover underline on card titles ── */
.post-card .card-title a,
.list-post-card .post-title a {
  background-image: linear-gradient(var(--color-brand), var(--color-brand));
  background-repeat: no-repeat;
  background-size: 0 2px;
  background-position: 0 100%;
  transition: background-size .25s ease;
}

.post-card .card-title a:hover,
.list-post-card .post-title a:hover {
  background-size: 100% 2px;
  text-decoration: none;
  color: var(--color-ink);
}

/* ── Category badge colours ── */
.category-badge[href*="security"]  { color: #c0392b; }
.category-badge[href*="core"]      { color: #2980b9; }
.category-badge[href*="hosting"]   { color: #27ae60; }
.category-badge[href*="industry"]  { color: #8e44ad; }
.category-badge[href*="community"] { color: #d35400; }
.category-badge[href*="jobs"]      { color: #16a085; }

/* ── Section header accent pulse on hover ── */
.section-header:hover .section-label-accent { opacity: .85; }

/* ── Responsive category grid ── */
@media (max-width: 768px) {
  .category-row-grid {
    grid-template-columns: 1fr;
  }

  .cat-side-list {
    border-top: none;
  }
}

/* ── Card hover lift shadow ── */
.hero-primary {
  transition: box-shadow .2s ease;
}

.hero-primary:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
  z-index: 1;
}

.hero-secondary .story-item {
  transition: background .15s;
}

.hero-secondary .story-item:hover {
  background: var(--color-surface);
}

/* ── Category lead card hover ── */
.cat-lead {
  transition: box-shadow .2s ease;
}

.cat-lead:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

/* ── Jobs spotlight strip ── */
.jobs-strip {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #f0faf8;
  border: 1px solid #b2dfdb;
  border-left: 4px solid #16a085;
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 2.5rem;
}

.jobs-strip-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
}

.jobs-strip-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #16a085;
  white-space: nowrap;
  flex-shrink: 0;
}

.jobs-strip-title {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-ink);
  flex: 1;
  min-width: 0;
}

.jobs-strip-title a {
  color: inherit;
  text-decoration: none;
}

.jobs-strip-title a:hover { color: #16a085; }

.jobs-strip-meta {
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.jobs-strip-cta {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem 1rem;
  background: #16a085;
  color: #fff;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  transition: background .15s;
}

.jobs-strip-cta:hover {
  background: #12876f;
  text-decoration: none;
  color: #fff;
}

@media (max-width: 768px) {
  .jobs-strip {
    flex-wrap: wrap;
    gap: .6rem;
  }

  .jobs-strip-label { order: 1; }
  .jobs-strip-icon  { order: 2; }
  .jobs-strip-title { order: 3; flex-basis: 100%; }
  .jobs-strip-meta  { order: 4; }
  .jobs-strip-cta   { order: 5; }
}

/* ── Section spacing improvements ── */
.hero-section {
  margin-bottom: 2rem;
}

.category-section:last-of-type {
  border-bottom: none;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

/* ── Sidebar newsletter CTA ── */
.sidebar-newsletter {
  background: linear-gradient(135deg, var(--color-header-bg) 0%, #1a2d3d 100%);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: #fff;
  text-align: center;
  margin-bottom: 2rem;
}

.sidebar-newsletter h4 {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  margin-bottom: .5rem;
  color: #fff;
}

.sidebar-newsletter p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.65);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.sidebar-newsletter a.btn-subscribe {
  display: block;
  padding: .55rem 1rem;
  background: var(--color-brand);
  color: #fff;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: background .15s;
}

.sidebar-newsletter a.btn-subscribe:hover {
  background: var(--color-brand-dark);
  text-decoration: none;
}
