/*
 Theme Name:   Kids Podcast Guide Child
 Theme URI:    https://kidspodcastguide.com/
 Description:  Child theme of Astra for Kids Podcast Guide
 Author:       Duncan Smith
 Template:     astra
 Version:      1.0.4
 Text Domain:  kids-pg-child
*/

/* ============================================
   Base Vars & Resets
   ============================================ */

:root {
  --color-primary: #1A73E8;
  --color-accent: #FFB300;
  --color-bg: #F4F7FB;
  --color-card: #FFFFFF;
  --color-border: #E5E7EB;
  --color-text: #111827;
  --color-muted: #4B5563;
  --color-trust-bg: #E0F2FE;
  --color-trust-border: #BFDBFE;

  --max-width: 1100px;
  --radius: 8px;

  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
}

/* ============================================
   HEADER POLISH
   ============================================ */

.ast-primary-header-bar {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--color-border);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.ast-primary-header-bar .ast-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Site title / logo */
.site-branding a {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  color: var(--color-text);
}

/* Main navigation */
.main-header-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.main-header-menu > .menu-item > .menu-link {
  font-size: 0.98rem;
  font-weight: 500;
  padding: 0;
  color: var(--color-text);
  text-decoration: none;
  position: relative;
}

.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu > .menu-item.current-menu-item > .menu-link {
  color: var(--color-primary);
}

.main-header-menu > .menu-item > .menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.2s ease;
}

.main-header-menu > .menu-item > .menu-link:hover::after,
.main-header-menu > .menu-item.current-menu-item > .menu-link::after {
  width: 100%;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .ast-primary-header-bar {
    padding: 0.6rem 0;
  }
}

/* ============================================
   Typography & Utilities
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }

.kidspg-text {
  color: var(--color-muted);
}

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ============================================
   Sections
   ============================================ */

.kidspg-section {
  padding: 3.5rem 1rem;
}

.kidspg-section .inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.white-bg { background: #ffffff; }
.light-bg { background: var(--color-bg); }

/* ============================================
   HERO
   ============================================ */

.kidspg-hero {
  background: #E0F2FE;
  padding: 4rem 1rem;
}

.kidspg-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.kidspg-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
}

.kidspg-hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-muted);
  margin-top: 0.75rem;
}

.kidspg-buttons {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.kidspg-btn-primary,
.kidspg-btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.kidspg-btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.25);
}

.kidspg-btn-primary:hover {
  background: #1557b0;
  transform: translateY(-1px);
}

.kidspg-btn-secondary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(255, 179, 0, 0.25);
}

.kidspg-btn-secondary:hover {
  background: #e39c00;
  transform: translateY(-1px);
}

/* Trust box */
.kidspg-trust-box {
  background: var(--color-trust-bg);
  border: 2px solid var(--color-trust-border);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-light);
}

@media (max-width: 900px) {
  .kidspg-hero {
    padding: 3rem 1rem;
  }

  .kidspg-hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .kidspg-hero-title {
    font-size: 2rem;
  }
}

/* ============================================
   Cards & Grid
   ============================================ */

.kidspg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.kidspg-card {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

/* small tag pill */
.tag {
  display: inline-block;
  background: var(--color-accent);
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* ============================================
   Browse Chips (Age & Topic)
   ============================================ */

.kidspg-browse-chips,
.kidspg-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.kidspg-chip {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--color-border);
  background: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.kidspg-chip:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* ============================================
   Latest Reviews
   ============================================ */

.kidspg-list {
  list-style: none;
  max-width: 720px;
  margin: 1rem auto 3rem;
}

.kidspg-list li {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.kidspg-list a {
  font-weight: 600;
}

.kidspg-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
}

@media (max-width: 768px) {
  .kidspg-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   Safety Section Grid
   ============================================ */

.kidspg-safety-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 2.5rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .kidspg-safety-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Back to Top Button
   ============================================ */

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.35);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ============================================
   FOOTER STYLING
   ============================================ */

.site-footer,
#colophon,
.ast-footer-wrap {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 3rem 1rem;
  margin-top: 4rem;
}

.ast-footer-widget-area {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer a {
  color: var(--color-primary);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Hide the custom kids-footer-simple if it exists */
.kids-footer-simple {
  display: none !important;
}

/* Ensure small footer text is readable */
.ast-small-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* ============================================
   Hide Duplicate Page Titles on Subpages
   ============================================ */

.ast-page-title-bar {
  display: none !important;
}

/* ============================================
   AGE PAGE CONTENT STYLING
   ============================================ */

.entry-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

.entry-content section {
  margin-bottom: 3rem;
}

.entry-content h2 {
  font-size: 1.8rem;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  color: var(--color-text);
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.entry-content h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-weight: 700;
}

.entry-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  color: var(--color-text);
}

.entry-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.entry-content ul li {
  margin-bottom: 0.6rem;
  color: var(--color-text);
  font-size: 1.05rem;
}

.entry-content ul li strong {
  color: var(--color-primary);
  font-weight: 700;
}

.entry-content > div {
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  background: #ffffff;
  border-left: 4px solid var(--color-accent);
  border-radius: 4px;
  box-shadow: var(--shadow-light);
}

.entry-content > div h3 {
  margin-top: 0;
}

.entry-content > div p {
  margin-bottom: 0;
  color: var(--color-muted);
}

@media (max-width: 768px) {
  .entry-content {
    padding: 1.5rem 1rem;
  }

  .entry-content h2 {
    font-size: 1.5rem;
  }

  .entry-content h3 {
    font-size: 1.1rem;
  }
}
/* ============================================
   AGE PAGE CONTENT STYLING
   ============================================ */

.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 2rem 0 1.5rem 0;
  color: var(--color-text);
  text-align: center;
}

.entry-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 2rem 1rem;
}

.entry-content section {
  margin-bottom: 3rem;
}

.entry-content h2 {
  font-size: 1.8rem;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  color: var(--color-text);
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.entry-content h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-weight: 700;
}

.entry-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  color: var(--color-text);
}

.entry-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.entry-content ul li {
  margin-bottom: 0.6rem;
  color: var(--color-text);
  font-size: 1.05rem;
}

.entry-content ul li strong {
  color: var(--color-primary);
  font-weight: 700;
}

.entry-content > div {
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  background: #ffffff;
  border-left: 4px solid var(--color-accent);
  border-radius: 4px;
  box-shadow: var(--shadow-light);
}

.entry-content > div h3 {
  margin-top: 0;
}

.entry-content > div p {
  margin-bottom: 0;
  color: var(--color-muted);
}

@media (max-width: 768px) {
  .page-title {
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem 0;
  }

  .entry-content {
    padding: 0 1rem 1.5rem 1rem;
  }

  .entry-content h2 {
    font-size: 1.5rem;
  }

  .entry-content h3 {
    font-size: 1.1rem;
  }
}
/* Latest Reviews Header */
.kidspg-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

@media (max-width: 768px) {
    .kidspg-reviews-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* Podcast Grid Styling */
.podcast-grid {
    margin: 2rem 0;
}

.podcasts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.podcast-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.podcast-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.podcast-card-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #e0e0e0;
}

.podcast-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podcast-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.podcast-card-content h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    line-height: 1.4;
    color: #333;
    font-weight: 600;
}

.podcast-description {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
    flex: 1;
}

.podcast-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.podcast-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.podcast-link:hover {
    background: #0052a3;
}

@media (max-width: 768px) {
    .podcasts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .podcast-card-content {
        padding: 1rem;
    }

    .podcast-card-content h3 {
        font-size: 1rem;
    }

    .podcast-description {
        font-size: 0.85rem;
    }

    .podcast-links {
        gap: 0.5rem;
    }

    .podcast-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}