/*
Theme Name: Guardian Child
Template: blocksy
Version: 1.0
Description: Guardian Safety Software child theme — custom single post layout
*/

/* ============================================================
   GUARDIAN BLOG — DESIGN SYSTEM
   Colors: Navy #1A2A4F | Blue #185FA5 | Light #DCE3EB | White #FFF
   Fonts: Montserrat (headings) | Open Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&family=Open+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --g-navy: #1A2A4F;
  --g-blue: #185FA5;
  --g-light: #DCE3EB;
  --g-white: #FFFFFF;
  --g-text: #2C2C2C;
  --g-muted: #6B7280;
  --g-accent-bg: #EEF2F7;
  --g-border: #D1DAE6;
  --g-max: 780px;
  --g-wide: 1100px;
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
#g-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--g-blue), #4A9FD5);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   SINGLE POST WRAPPER
   ============================================================ */
body.single-post {
  background: #F7F9FC;
}

.g-post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  max-width: var(--g-wide);
  margin: 0 auto;
  padding: 48px 24px 80px;
  align-items: start;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.g-post-hero {
  background: var(--g-navy);
  padding: 64px 0 0;
  margin-bottom: 0;
}

.g-post-hero-inner {
  max-width: var(--g-wide);
  margin: 0 auto;
  padding: 0 24px 48px;
}

.g-post-category {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7DB8E8;
  margin-bottom: 16px;
}

.g-post-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--g-white);
  margin: 0 0 24px;
  max-width: 760px;
}

.g-post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.g-post-meta-item {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 6px;
}

.g-post-meta-item svg {
  opacity: 0.7;
}

.g-post-featured-img {
  width: 100%;
  max-width: var(--g-wide);
  margin: 0 auto;
  display: block;
}

.g-post-featured-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* ============================================================
   MAIN CONTENT COLUMN
   ============================================================ */
.g-post-content {
  min-width: 0;
  background: var(--g-white);
  border-radius: 4px;
  padding: 48px 52px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Typography */
.g-post-content p {
  font-family: 'Open Sans', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--g-text);
  margin: 0 0 24px;
}

.g-post-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--g-navy);
  margin: 48px 0 16px;
  padding-top: 8px;
  line-height: 1.25;
}

.g-post-content h2::before {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--g-blue);
  margin-bottom: 12px;
  border-radius: 2px;
}

.g-post-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--g-navy);
  margin: 32px 0 12px;
}

.g-post-content ul,
.g-post-content ol {
  font-family: 'Open Sans', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--g-text);
  margin: 0 0 24px;
  padding-left: 0;
  list-style: none;
}

.g-post-content ul li,
.g-post-content ol li {
  padding: 6px 0 6px 28px;
  position: relative;
  border-bottom: 1px solid #F3F5F8;
}

.g-post-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  background: var(--g-blue);
  border-radius: 50%;
}

.g-post-content ol {
  counter-reset: list-counter;
}

.g-post-content ol li {
  counter-increment: list-counter;
}

.g-post-content ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 8px;
  width: 20px;
  height: 20px;
  background: var(--g-navy);
  color: white;
  border-radius: 50%;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g-post-content a {
  color: var(--g-blue);
  text-decoration: underline;
  text-decoration-color: rgba(24,95,165,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.g-post-content a:hover {
  text-decoration-color: var(--g-blue);
}

/* Blockquote / Callout */
.g-post-content blockquote {
  background: var(--g-accent-bg);
  border-left: 4px solid var(--g-blue);
  border-radius: 0 6px 6px 0;
  margin: 32px 0;
  padding: 24px 28px;
}

.g-post-content blockquote p {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--g-navy);
  margin: 0;
  line-height: 1.6;
}

/* Stat callout — wrap text in <strong class="g-stat"> */
.g-post-content .g-stat,
.g-post-content strong.g-stat {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--g-blue);
  margin-bottom: 4px;
}

/* ============================================================
   STICKY SIDEBAR
   ============================================================ */
.g-post-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* CTA Card */
.g-sidebar-cta {
  background: var(--g-navy);
  border-radius: 8px;
  padding: 32px 28px;
  color: white;
}

.g-sidebar-cta-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7DB8E8;
  margin-bottom: 12px;
}

.g-sidebar-cta h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px;
  line-height: 1.3;
}

.g-sidebar-cta p {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,0.75);
  margin: 0 0 24px;
}

.g-sidebar-cta a.g-btn {
  display: block;
  text-align: center;
  background: var(--g-blue);
  color: white !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 14px 20px;
  border-radius: 4px;
  text-decoration: none !important;
  transition: background 0.2s;
}

.g-sidebar-cta a.g-btn:hover {
  background: #1570C4;
}

/* Table of Contents */
.g-toc {
  background: var(--g-white);
  border: 1px solid var(--g-border);
  border-radius: 8px;
  padding: 24px 24px 20px;
}

.g-toc-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g-muted);
  margin: 0 0 14px;
}

.g-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc-counter;
}

.g-toc ol li {
  counter-increment: toc-counter;
  padding: 7px 0 7px 28px;
  position: relative;
  border-bottom: 1px solid #F0F3F7;
}

.g-toc ol li:last-child {
  border-bottom: none;
}

.g-toc ol li::before {
  content: counter(toc-counter);
  position: absolute;
  left: 0;
  top: 9px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--g-blue);
}

.g-toc ol li a {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: var(--g-navy);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s;
}

.g-toc ol li a:hover {
  color: var(--g-blue);
}

.g-toc ol li a.g-toc-active {
  color: var(--g-blue);
  font-weight: 600;
}

/* Share widget */
.g-sidebar-share {
  background: var(--g-white);
  border: 1px solid var(--g-border);
  border-radius: 8px;
  padding: 20px 24px;
}

.g-sidebar-share-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g-muted);
  margin: 0 0 14px;
}

.g-share-links {
  display: flex;
  gap: 10px;
}

.g-share-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--g-accent-bg);
  color: var(--g-navy);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  font-size: 14px;
}

.g-share-link:hover {
  background: var(--g-navy);
  color: white;
}

/* ============================================================
   BOTTOM CTA BLOCK (inside post content)
   ============================================================ */
.g-post-bottom-cta {
  background: linear-gradient(135deg, var(--g-navy) 0%, #253D6B 100%);
  border-radius: 8px;
  padding: 40px 44px;
  margin: 48px 0 0;
  display: flex;
  gap: 32px;
  align-items: center;
}

.g-post-bottom-cta-text h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0 0 10px;
}

.g-post-bottom-cta-text p {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  margin: 0;
  line-height: 1.6;
}

.g-post-bottom-cta a.g-btn-outline {
  flex-shrink: 0;
  display: inline-block;
  border: 2px solid rgba(255,255,255,0.5);
  color: white !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 14px 24px;
  border-radius: 4px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.g-post-bottom-cta a.g-btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: white;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.g-related-posts {
  max-width: var(--g-wide);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.g-related-posts-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g-muted);
  margin: 0 0 28px;
}

.g-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.g-related-card {
  background: var(--g-white);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--g-border);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
}

.g-related-card:hover {
  box-shadow: 0 4px 20px rgba(26,42,79,0.12);
  transform: translateY(-2px);
}

.g-related-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.g-related-card-body {
  padding: 20px;
}

.g-related-card-cat {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g-blue);
  margin-bottom: 8px;
}

.g-related-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--g-navy);
  line-height: 1.35;
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .g-post-layout {
    grid-template-columns: 1fr;
  }
  .g-post-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .g-related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .g-post-content {
    padding: 32px 24px;
  }
  .g-post-featured-img img {
    height: 260px;
  }
  .g-post-sidebar {
    grid-template-columns: 1fr;
  }
  .g-related-grid {
    grid-template-columns: 1fr;
  }
  .g-post-bottom-cta {
    flex-direction: column;
    padding: 32px 28px;
    gap: 20px;
  }
  .g-post-title {
    font-size: 26px;
  }
}

/* ============================================================
   HIDE BLOCKSY DEFAULT SINGLE POST ELEMENTS
   (we're replacing these with our own layout)
   ============================================================ */
body.single-post .entry-header,
body.single-post .site-main > article > .entry-header,
body.single-post .post-navigation,
body.single-post .blc-container > .content-area {
  /* overridden by our template */
}
