/* ============================================================
   GeeksV2 blog theme — supplemental styles for blog-only
   components. Shared chrome (header, nav, footer, CTA banner,
   buttons, tokens) comes from /css/geeks.css on the main site —
   this file only covers things the main site doesn't have.
   ============================================================ */

/* ── NAV SEARCH BOX ── */
.blog-nav-search { display: flex; align-items: center; }
.blog-search-input {
  max-width: 160px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--gip-navy);
}
.blog-search-input::placeholder { color: var(--gip-muted); }

/* ── HERO / FEATURED POSTS CAROUSEL ── */
.blog-hero-carousel { position: relative; overflow: hidden; }
.blog-hero-carousel .carousel-inner { overflow: hidden; }
/* Defensive override in case Bootstrap's own carousel CSS isn't loading for
   some reason — without this, every slide would stack and show at once. */
.blog-hero-carousel .carousel-item { display: none; float: left; width: 100%; margin-right: -100%; }
.blog-hero-carousel .carousel-item.active { display: block; }
.blog-hero-slide {
  position: relative;
  min-height: 380px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--gip-navy);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.blog-hero-slide-fallback { background-color: var(--gip-navy); }
.blog-hero-fallback-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 260px;
  max-height: 140px;
  width: auto;
  height: auto;
  opacity: 0.92;
}
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,33,55,0.35) 0%, rgba(13,33,55,0.88) 100%);
}
.blog-hero-caption {
  position: relative;
  /* Must beat Bootstrap's .carousel-control-prev/.carousel-control-next (z-index:1) —
     those buttons render after .carousel-inner in the DOM, so at equal z-index they
     win the stacking tie and swallow clicks on the "Read Post" link/left edge of
     the caption. */
  z-index: 2;
  padding: 40px 0 44px;
  max-width: 760px;
  color: var(--gip-white);
}
.blog-hero-caption h2 { margin: 6px 0 12px; font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
.blog-hero-caption h2 a { color: var(--gip-white); text-decoration: none; }
.blog-hero-caption h2 a:hover { text-decoration: underline; }
.blog-hero-excerpt { color: #E8F1FF; margin-bottom: 20px; }
.blog-hero-carousel .carousel-indicators { margin-bottom: 8px; }
.blog-hero-carousel .carousel-control-prev,
.blog-hero-carousel .carousel-control-next { width: 6%; }

/* ── SIDEBAR / WIDGETS ── */
.blog-sidebar { position: sticky; top: calc(var(--gip-header-h, 96px) + 20px); }
.blog-widget {
  background: var(--gip-white);
  border: 1px solid var(--gip-border);
  border-radius: var(--gip-radius);
  box-shadow: var(--gip-shadow);
  padding: 22px;
  margin-bottom: 24px;
}
.blog-widget-title {
  font-size: 1.05rem;
  color: var(--gip-navy);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.blog-widget-content ul { list-style: none; padding-left: 0; margin-bottom: 0; }
.blog-widget-content li { margin-bottom: 8px; }
.blog-widget-content a { color: var(--gip-blue); text-decoration: none; }
.blog-widget-content a:hover { text-decoration: underline; }
.blog-widget-adminlinks { font-size: 0.8rem; }

/* ── POST CARDS (list view) ── */
.blog-post-card {
  display: flex;
  gap: 20px;
  background: var(--gip-white);
  border: 1px solid var(--gip-border);
  border-radius: var(--gip-radius);
  box-shadow: var(--gip-shadow);
  padding: 20px;
  margin-bottom: 24px;
}
.blog-post-card.no-thumbnail { display: block; }
.blog-post-card-thumb { flex: 0 0 200px; display: block; border-radius: var(--gip-radius); overflow: hidden; }
.blog-post-card-thumb img { width: 200px; height: 140px; object-fit: cover; display: block; }
.blog-post-card-body { flex: 1 1 auto; min-width: 0; }
.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--gip-muted);
  margin-bottom: 8px;
}
.blog-post-meta a { color: var(--gip-muted); text-decoration: none; }
.blog-post-meta a:hover { color: var(--gip-blue); }
.blog-post-card-title { font-size: 1.25rem; margin-bottom: 8px; }
.blog-post-card-title a { color: var(--gip-navy); text-decoration: none; }
.blog-post-card-title a:hover { color: var(--gip-blue); }
.blog-post-card-excerpt { color: var(--gip-text); margin-bottom: 10px; }
.blog-post-card-more { font-weight: 600; color: var(--gip-blue); text-decoration: none; font-size: 0.9rem; }
.blog-post-card-more:hover { text-decoration: underline; }

@media (max-width: 575.98px) {
  .blog-post-card { flex-direction: column; }
  .blog-post-card-thumb { flex: none; }
  .blog-post-card-thumb img { width: 100%; height: 180px; }
}

/* ── SINGLE POST ── */
.blog-post-single-cover { border-radius: var(--gip-radius); overflow: hidden; margin-bottom: 24px; }
.blog-post-single-cover img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.blog-post-single-title { font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--gip-navy); margin-bottom: 12px; }
.blog-post-single-header .blog-post-meta { margin-bottom: 18px; align-items: center; }
.blog-post-share { display: inline-block; }
.blog-post-single-body { color: var(--gip-text); line-height: 1.75; margin-bottom: 24px; }
.blog-post-single-body img { max-width: 100%; height: auto; border-radius: var(--gip-radius); }
.blog-post-single-footer {
  border-top: 1px solid var(--gip-border);
  padding-top: 16px;
  margin-bottom: 28px;
}
.blog-post-tags { font-size: 0.88rem; color: var(--gip-muted); margin-bottom: 6px; }
.blog-post-tags a { color: var(--gip-blue); text-decoration: none; }
.blog-post-tags a:hover { text-decoration: underline; }

/* ── POST NAVIGATION ── */
.blog-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--gip-border);
  border-bottom: 1px solid var(--gip-border);
  padding: 16px 0;
  margin-bottom: 32px;
}
.blog-post-nav a { color: var(--gip-navy); text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 8px; max-width: 48%; }
.blog-post-nav a:hover { color: var(--gip-blue); }
.blog-post-nav-next { margin-left: auto; text-align: right; }

/* ── RELATED POSTS ── */
.blog-related-posts {
  background: var(--gip-blue-light);
  border-left: 4px solid var(--gip-blue);
  border-radius: var(--gip-radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.blog-related-posts-title { font-size: 1.05rem; color: var(--gip-navy); margin-bottom: 10px; }
.blog-related-posts-list { list-style: none; padding-left: 0; margin-bottom: 0; }
.blog-related-posts-list li { margin-bottom: 8px; }
.blog-related-posts-list a { color: var(--gip-blue); text-decoration: none; font-weight: 600; }
.blog-related-posts-list a:hover { text-decoration: underline; }
.blog-related-posts-list span { display: block; font-size: 0.85rem; color: var(--gip-muted); }

/* ── COMMENTS ── */
.blog-comment-form {
  background: var(--gip-white);
  border: 1px solid var(--gip-border);
  border-radius: var(--gip-radius);
  box-shadow: var(--gip-shadow);
  padding: 24px;
  margin-bottom: 32px;
}
.blog-comment-form-title { color: var(--gip-navy); margin-bottom: 18px; }

.blog-comment { padding: 18px 0; border-bottom: 1px solid var(--gip-border); }
.blog-comment-author { background: var(--gip-blue-light); border-radius: var(--gip-radius); padding: 14px 16px; }
.blog-comment-body { display: flex; gap: 14px; }
.blog-comment-avatar img { border-radius: 50%; }
.blog-comment-content { flex: 1 1 auto; min-width: 0; }
.blog-comment-meta { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.blog-comment-name { font-weight: 600; color: var(--gip-navy); text-decoration: none; }
.blog-comment-date { font-size: 0.8rem; color: var(--gip-muted); }
.blog-comment-text { color: var(--gip-text); margin-bottom: 6px; }
.blog-comment-actions { font-size: 0.82rem; color: var(--gip-muted); }
.blog-comment-actions a { color: var(--gip-blue); text-decoration: none; }
.blog-comment-replies { margin-left: 44px; }

/* ── BACK TO TOP ── */
.blog-back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--gip-blue);
  color: var(--gip-white);
  font-size: 1.1rem;
  box-shadow: var(--gip-shadow-lg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1030;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.blog-back-to-top:hover { background: var(--gip-blue-hover); transform: translateY(-2px); }
.blog-back-to-top.is-visible { display: flex; }
