/*
Theme Name: People I Love
Theme URI: https://peopleilove.com
Author: People I Love
Author URI: https://peopleilove.com
Description: A warm, professional documentary hub featuring video content, interactive quizzes, sponsor integration, and organizational content subscriptions.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: Private
Text Domain: peopleilove
*/

/* =============================================
   CSS CUSTOM PROPERTIES — BRAND PALETTE
   ============================================= */
:root {
  --pil-navy:        #1a2744;
  --pil-green:       #0f3d2e;
  --pil-red:         #e8394a;
  --pil-gold:        #f0c040;
  --pil-gold-dark:   #854F0B;
  --pil-gold-bg:     #fff8e6;
  --pil-blue-light:  #e6f1fb;
  --pil-blue-mid:    #185FA5;
  --pil-green-light: #eaf3de;
  --pil-green-mid:   #3B6D11;
  --pil-white:       #ffffff;
  --pil-off-white:   #f8f8f6;
  --pil-border:      rgba(0,0,0,0.1);
  --pil-text:        #1a1a1a;
  --pil-text-muted:  #666660;
  --pil-text-faint:  #999993;
  --pil-radius-sm:   6px;
  --pil-radius-md:   10px;
  --pil-radius-lg:   14px;
  --pil-radius-xl:   20px;
  --pil-shadow:      0 2px 12px rgba(0,0,0,0.08);
  --pil-transition:  all 0.3s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--pil-text);
  background: var(--pil-off-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--pil-blue-mid);
  text-decoration: none;
  transition: var(--pil-transition);
}

a:hover {
  color: var(--pil-red);
}

/* =============================================
   NAVIGATION
   ============================================= */

/* The header tag is the sticky container —
   overflow:visible lets the logo spill above the red line */
.pil-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
}

.pil-nav {
  background: var(--pil-navy);
  padding: 0 2rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--pil-red);
  overflow: visible;
  position: relative;
  z-index: 1001;
}

/* Logo — allow it to overflow the nav height naturally */
.pil-nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.pil-nav-logo img,
.pil-nav-logo .custom-logo-link img,
.pil-nav-logo .custom-logo {
  height: 105px;      /* tall enough to show full logo incl. sheep head */
  width: auto;
  display: block;
  position: relative;
  z-index: 1002;      /* sits above the nav bar so head isn't clipped */
  margin-top: -15px;  /* pulls logo upward to free sheep's head above nav */
}

.pil-nav-logo .custom-logo-link {
  display: flex;
  align-items: center;
}

/* Direct WordPress logo override — must use !important to beat WP inline styles */
img.custom-logo {
  height: 105px !important;
  width: auto !important;
  display: block;
  position: relative;
  z-index: 1002;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-top: -15px !important;
}

.pil-nav-brand {
  color: var(--pil-white);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pil-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.pil-nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: var(--pil-transition);
}

.pil-nav-links a:hover,
.pil-nav-links a.active {
  color: var(--pil-white);
  border-bottom-color: var(--pil-red);
}

.pil-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pil-btn-nav-member {
  border: 1.5px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.85);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--pil-radius-xl);
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
}

.pil-btn-nav-member:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.pil-btn-nav-sponsor {
  border: 1.5px solid rgba(240,192,64,0.5);
  color: #FAC775;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--pil-radius-xl);
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
}

.pil-btn-nav-sponsor:hover {
  background: rgba(240,192,64,0.15);
  color: #f0c040;
}

.pil-btn-nav-subscribe {
  background: var(--pil-red);
  color: var(--pil-white);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: var(--pil-radius-xl);
  cursor: pointer;
  border: none;
  transition: var(--pil-transition);
  text-decoration: none;
}

.pil-btn-nav-subscribe:hover {
  background: #c9202f;
  color: white;
}

/* =============================================
   HERO
   ============================================= */
.pil-hero {
  background: var(--pil-navy);
  padding: 80px 2rem 70px;
  text-align: center;
}

.pil-hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
}

.pil-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--pil-white);
  line-height: 1.15;
  margin-bottom: 20px;
}

.pil-hero h1 em {
  color: var(--pil-red);
  font-style: normal;
}

.pil-hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.pil-hero-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pil-btn-primary {
  background: var(--pil-red);
  color: var(--pil-white);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--pil-radius-xl);
  border: none;
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
  display: inline-block;
}

.pil-btn-primary:hover {
  background: #c9202f;
  color: white;
  transform: translateY(-1px);
}

.pil-btn-outline-white {
  background: transparent;
  color: var(--pil-white);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 11px 28px;
  border-radius: var(--pil-radius-xl);
  border: 1.5px solid rgba(255,255,255,0.35);
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
  display: inline-block;
}

.pil-btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  color: white;
  border-color: rgba(255,255,255,0.6);
}

.pil-btn-outline-gold {
  background: transparent;
  color: #FAC775;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 11px 28px;
  border-radius: var(--pil-radius-xl);
  border: 1.5px solid rgba(240,192,64,0.5);
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
  display: inline-block;
}

.pil-btn-outline-gold:hover {
  background: rgba(240,192,64,0.15);
  color: #f0c040;
  border-color: rgba(240,192,64,0.8);
}

/* =============================================
   WHY / MISSION STRIP
   ============================================= */
.pil-why-strip {
  background: var(--pil-white);
  border-bottom: 1px solid var(--pil-border);
  padding: 20px 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pil-why-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--pil-off-white);
  border: 1px solid var(--pil-border);
  border-radius: var(--pil-radius-lg);
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pil-text);
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
}

.pil-why-btn:hover {
  background: var(--pil-navy);
  color: white;
  border-color: var(--pil-navy);
}

.pil-why-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pil-why-strip-divider {
  width: 1px;
  height: 28px;
  background: var(--pil-border);
  margin: 0 6px;
}

.pil-btn-subscribe-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--pil-blue-light);
  border: 1px solid #85B7EB;
  border-radius: var(--pil-radius-lg);
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pil-blue-mid);
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
}

.pil-btn-subscribe-strip:hover {
  background: var(--pil-blue-mid);
  color: white;
  border-color: var(--pil-blue-mid);
}

.pil-btn-sponsor-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--pil-gold-bg);
  border: 1px solid #f0c040;
  border-radius: var(--pil-radius-lg);
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pil-gold-dark);
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
}

.pil-btn-sponsor-strip:hover {
  background: var(--pil-gold-dark);
  color: white;
  border-color: var(--pil-gold-dark);
}

/* =============================================
   DOCUMENTARY CARD GRID
   ============================================= */
.pil-card-section {
  padding: 48px 2rem;
  background: var(--pil-off-white);
}

.pil-card-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

.pil-card-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pil-text);
}

.pil-card-section-sub {
  font-size: 0.875rem;
  color: var(--pil-text-muted);
}

.pil-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.pil-doc-card {
  background: var(--pil-white);
  border-radius: var(--pil-radius-lg);
  overflow: hidden;
  border: 1px solid var(--pil-border);
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
  display: block;
}

.pil-doc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border-color: rgba(0,0,0,0.15);
}

.pil-card-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.pil-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease;
}

.pil-card-hover-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}

.pil-doc-card:hover .pil-card-img-wrap img {
  opacity: 0;
}

.pil-doc-card:hover .pil-card-hover-overlay {
  opacity: 1;
}

.pil-card-overlay-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  margin-bottom: 8px;
}

.pil-card-overlay-divider {
  width: 32px;
  height: 1px;
  background: rgba(255,255,255,0.4);
  margin: 0 auto 8px;
}

.pil-card-overlay-sponsor {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
}

.pil-card-badge-new {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--pil-red);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pil-card-badge-sponsored {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(240,192,64,0.92);
  color: #412402;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}

.pil-card-body {
  padding: 14px 16px 16px;
}

.pil-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pil-text);
  line-height: 1.35;
  margin-bottom: 4px;
}

.pil-card-meta {
  font-size: 0.8rem;
  color: var(--pil-text-faint);
}

.pil-card-sponsor-line {
  font-size: 0.78rem;
  color: var(--pil-gold-dark);
  margin-top: 6px;
  font-style: italic;
}

.pil-card-sponsor-open {
  font-size: 0.78rem;
  color: var(--pil-green-mid);
  margin-top: 6px;
  font-style: italic;
}

/* =============================================
   FEATURE PAGE
   ============================================= */
.pil-feature-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 2rem;
}

.pil-sponsor-banner {
  background: var(--pil-gold-bg);
  border: 1px solid var(--pil-gold);
  border-radius: var(--pil-radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
}

.pil-sponsor-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--pil-radius-md);
  object-fit: contain;
  background: white;
  padding: 4px;
  flex-shrink: 0;
}

.pil-sponsor-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--pil-radius-md);
  background: var(--pil-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #412402;
  flex-shrink: 0;
}

.pil-sponsor-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pil-gold-dark);
  margin-bottom: 4px;
}

.pil-sponsor-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #412402;
  margin-bottom: 4px;
}

.pil-sponsor-detail {
  font-size: 0.85rem;
  color: var(--pil-gold-dark);
  line-height: 1.5;
}

.pil-sponsor-link {
  font-size: 0.85rem;
  color: var(--pil-blue-mid);
  margin-top: 4px;
  display: inline-block;
}

.pil-video-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.pil-video-embed {
  border-radius: var(--pil-radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--pil-navy);
}

.pil-video-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.pil-download-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.pil-btn-download {
  background: var(--pil-off-white);
  border: 1px solid var(--pil-border);
  border-radius: var(--pil-radius-xl);
  padding: 8px 18px;
  font-size: 0.875rem;
  color: var(--pil-text);
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
}

.pil-btn-download:hover {
  background: var(--pil-navy);
  color: white;
  border-color: var(--pil-navy);
}

.pil-btn-download-member {
  background: var(--pil-blue-light);
  border: 1px solid #85B7EB;
  border-radius: var(--pil-radius-xl);
  padding: 8px 18px;
  font-size: 0.875rem;
  color: var(--pil-blue-mid);
  font-weight: 500;
  cursor: pointer;
  transition: var(--pil-transition);
  text-decoration: none;
}

.pil-btn-download-member:hover {
  background: var(--pil-blue-mid);
  color: white;
}

/* =============================================
   QUIZ
   ============================================= */
.pil-quiz-wrap {
  margin-bottom: 48px;
}

.pil-quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.pil-quiz-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pil-text);
}

.pil-score-pill {
  background: var(--pil-green-light);
  border: 1px solid #97C459;
  border-radius: var(--pil-radius-xl);
  padding: 6px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pil-green-mid);
}

.pil-question-block {
  background: var(--pil-white);
  border: 1px solid var(--pil-border);
  border-radius: var(--pil-radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.pil-question-left {
  flex: 1;
}

.pil-question-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pil-text);
  margin-bottom: 12px;
  line-height: 1.5;
}

.pil-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pil-option {
  font-size: 0.875rem;
  color: var(--pil-text-muted);
  background: var(--pil-off-white);
  border: 1px solid var(--pil-border);
  border-radius: var(--pil-radius-md);
  padding: 8px 14px;
  cursor: pointer;
  transition: var(--pil-transition);
  text-align: left;
  width: 100%;
}

.pil-option:hover {
  background: var(--pil-navy);
  color: white;
  border-color: var(--pil-navy);
}

.pil-option.selected {
  background: var(--pil-navy);
  color: white;
  border-color: var(--pil-navy);
}

.pil-option.correct {
  background: var(--pil-green-light);
  border-color: #639922;
  color: #27500A;
  font-weight: 500;
}

.pil-option.wrong {
  background: #FCEBEB;
  border-color: #E24B4A;
  color: #791F1F;
}

.pil-question-affiliate {
  width: 160px;
  flex-shrink: 0;
}

.pil-aff-card {
  background: var(--pil-off-white);
  border: 1px solid var(--pil-border);
  border-radius: var(--pil-radius-md);
  padding: 10px;
  text-align: center;
}

.pil-aff-card img {
  width: 100%;
  border-radius: var(--pil-radius-sm);
  margin-bottom: 6px;
}

.pil-aff-card-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--pil-text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.pil-aff-card-link {
  font-size: 0.75rem;
  color: var(--pil-blue-mid);
}

/* =============================================
   SPONSOR DIRECTORY
   ============================================= */
.pil-sponsor-dir-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 2rem;
}

.pil-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.pil-filter-pill {
  background: var(--pil-white);
  border: 1px solid var(--pil-border);
  border-radius: var(--pil-radius-xl);
  padding: 6px 14px;
  font-size: 0.825rem;
  color: var(--pil-text-muted);
  cursor: pointer;
  transition: var(--pil-transition);
}

.pil-filter-pill:hover,
.pil-filter-pill.active {
  background: var(--pil-navy);
  color: white;
  border-color: var(--pil-navy);
}

.pil-sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.pil-sponsor-card {
  background: var(--pil-white);
  border: 1px solid var(--pil-border);
  border-radius: var(--pil-radius-lg);
  padding: 20px;
  transition: var(--pil-transition);
}

.pil-sponsor-card:hover {
  box-shadow: var(--pil-shadow);
  border-color: var(--pil-gold);
}

.pil-sponsor-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pil-sponsor-card-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--pil-radius-md);
  object-fit: contain;
  background: var(--pil-gold-bg);
  padding: 4px;
  flex-shrink: 0;
}

.pil-sponsor-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pil-text);
  line-height: 1.3;
}

.pil-sponsor-card-type {
  font-size: 0.78rem;
  color: var(--pil-text-faint);
}

.pil-sponsor-card-detail {
  font-size: 0.825rem;
  color: var(--pil-text-muted);
  line-height: 1.65;
  border-top: 1px solid var(--pil-border);
  padding-top: 10px;
}

.pil-sponsor-card-docs {
  font-size: 0.78rem;
  color: var(--pil-gold-dark);
  margin-top: 6px;
  font-style: italic;
}

/* =============================================
   DONATION / GRATITUDE SECTION
   ============================================= */
.pil-give-section {
  background: var(--pil-navy);
  padding: 56px 2rem;
  text-align: center;
}

.pil-give-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--pil-white);
  margin-bottom: 12px;
}

.pil-give-section p {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* =============================================
   FOOTER
   ============================================= */
.pil-footer {
  background: var(--pil-navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 40px 2rem 24px;
}

.pil-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.pil-footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}

.pil-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pil-footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: var(--pil-transition);
}

.pil-footer-links a:hover {
  color: white;
}

.pil-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
}

.pil-footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.pil-footer-sponsor-cta {
  background: rgba(240,192,64,0.15);
  border: 1px solid rgba(240,192,64,0.4);
  border-radius: var(--pil-radius-xl);
  padding: 6px 14px;
  font-size: 0.8rem;
  color: #FAC775;
  text-decoration: none;
  transition: var(--pil-transition);
}

.pil-footer-sponsor-cta:hover {
  background: rgba(240,192,64,0.25);
  color: #f0c040;
}

/* =============================================
   FEATURE PAGE ADDITIONAL STYLES
   ============================================= */

.pil-breadcrumb {
    font-size: 0.85rem;
    color: var(--pil-text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pil-breadcrumb a {
    color: var(--pil-blue-mid);
}

.pil-breadcrumb span {
    color: var(--pil-text-faint);
}

.pil-feature-title {
    font-size: clamp( 1.5rem, 3vw, 2.25rem );
    font-weight: 700;
    color: var(--pil-text);
    margin-bottom: 12px;
    line-height: 1.2;
}

.pil-feature-excerpt {
    font-size: 1.05rem;
    color: var(--pil-text-muted);
    margin-bottom: 24px;
    line-height: 1.65;
    max-width: 720px;
}

.pil-feature-content {
    margin: 32px 0;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--pil-text);
    max-width: 720px;
}

/* SPONSOR AVAILABLE NUDGE */
.pil-sponsor-available {
    background: var(--pil-gold-bg);
    border: 1px dashed var(--pil-gold);
    border-radius: var(--pil-radius-lg);
    padding: 16px 20px;
    margin-bottom: 28px;
}

.pil-sponsor-available-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pil-sponsor-available-icon {
    font-size: 1.25rem;
    color: var(--pil-gold-dark);
    flex-shrink: 0;
}

.pil-sponsor-available-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #412402;
    margin-bottom: 2px;
}

.pil-sponsor-available-sub {
    font-size: 0.825rem;
    color: var(--pil-gold-dark);
}

.pil-btn-sponsor-cta {
    background: var(--pil-gold-dark);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--pil-radius-xl);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--pil-transition);
    margin-left: auto;
}

.pil-btn-sponsor-cta:hover {
    background: #412402;
    color: white;
}

/* VIDEOS */
.pil-videos-section {
    margin-bottom: 24px;
}

/* DOWNLOADS */
.pil-downloads-section {
    margin-bottom: 36px;
}

/* QUIZ EMPTY STATE */
.pil-quiz-empty {
    background: var(--pil-off-white);
    border: 1px dashed var(--pil-border);
    border-radius: var(--pil-radius-lg);
    padding: 48px 2rem;
    text-align: center;
    margin-bottom: 40px;
}

.pil-quiz-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.pil-quiz-empty h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pil-text);
    margin-bottom: 8px;
}

.pil-quiz-empty p {
    font-size: 0.9rem;
    color: var(--pil-text-muted);
}

/* MEMBER CTA BLOCK */
.pil-member-cta-block {
    background: var(--pil-blue-light);
    border: 1px solid #85B7EB;
    border-radius: var(--pil-radius-lg);
    padding: 24px 28px;
    margin: 48px 0 32px;
}

.pil-member-cta-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.pil-member-cta-left {
    flex: 1;
    min-width: 200px;
}

.pil-member-cta-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pil-blue-mid);
    margin-bottom: 6px;
}

.pil-member-cta-sub {
    font-size: 0.875rem;
    color: #185FA5;
    line-height: 1.55;
}

/* BACK LINK */
.pil-back-link {
    margin: 24px 0 48px;
}

.pil-back-link a {
    font-size: 0.9rem;
    color: var(--pil-text-muted);
    text-decoration: none;
    transition: var(--pil-transition);
}

.pil-back-link a:hover {
    color: var(--pil-navy);
}

/* PAGE TITLE (standard pages) */
.pil-page-title {
    font-size: clamp( 1.5rem, 3vw, 2rem );
    font-weight: 700;
    color: var(--pil-text);
    margin-bottom: 20px;
}

.pil-page-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--pil-text);
    max-width: 720px;
}

/* =============================================
   FEATURE PAGE TWO-COLUMN LAYOUT
   ============================================= */

.pil-feature-columns {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
    margin-bottom: 48px;
}

.pil-feature-main {
    min-width: 0;
}

.pil-videos-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pil-feature-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 84px;
}

/* SPONSOR SIDEBAR CARD */
.pil-sidebar-sponsor-card {
    background: var(--pil-gold-bg);
    border: 1px solid var(--pil-gold);
    border-radius: var(--pil-radius-lg);
    padding: 20px;
}

.pil-sidebar-sponsor-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--pil-gold-dark);
    margin-bottom: 12px;
}

.pil-sidebar-sponsor-logo {
    width: 100%;
    max-height: 80px;
    object-fit: contain;
    border-radius: var(--pil-radius-md);
    margin-bottom: 12px;
    background: white;
    padding: 6px;
}

.pil-sidebar-sponsor-initials {
    width: 64px;
    height: 64px;
    border-radius: var(--pil-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #412402;
    margin-bottom: 12px;
}

.pil-sidebar-sponsor-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #412402;
    line-height: 1.3;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pil-sidebar-sponsor-tagline {
    font-size: 0.85rem;
    color: var(--pil-gold-dark);
    line-height: 1.45;
    margin-bottom: 4px;
    font-style: italic;
}

.pil-sidebar-sponsor-divider {
    height: 1px;
    background: rgba(240,192,64,0.4);
    margin: 12px 0;
}

.pil-sidebar-sponsor-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pil-sidebar-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.825rem;
    color: var(--pil-gold-dark);
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pil-sidebar-detail-row a {
    color: var(--pil-blue-mid);
    word-break: break-all;
}

.pil-sidebar-detail-icon {
    font-size: 0.45rem;
    color: var(--pil-gold);
    flex-shrink: 0;
    margin-top: 5px;
}

/* SPONSOR OPEN CARD */
.pil-sidebar-sponsor-open {
    background: var(--pil-gold-bg);
    border: 1px dashed var(--pil-gold);
    border-radius: var(--pil-radius-lg);
    padding: 20px;
    text-align: center;
}

.pil-sidebar-sponsor-open-icon {
    font-size: 1.5rem;
    color: var(--pil-gold-dark);
    margin-bottom: 8px;
    opacity: 0.7;
}

.pil-sidebar-sponsor-open-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #412402;
    margin-bottom: 8px;
}

.pil-sidebar-sponsor-open-sub {
    font-size: 0.825rem;
    color: var(--pil-gold-dark);
    line-height: 1.5;
}

/* MEMBER CTA SIDEBAR */
.pil-sidebar-member-cta {
    background: var(--pil-blue-light);
    border: 1px solid #85B7EB;
    border-radius: var(--pil-radius-lg);
    padding: 20px;
    text-align: center;
}

.pil-sidebar-member-icon {
    font-size: 1.25rem;
    color: var(--pil-blue-mid);
    margin-bottom: 8px;
}

.pil-sidebar-member-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pil-blue-mid);
    margin-bottom: 8px;
}

.pil-sidebar-member-sub {
    font-size: 0.825rem;
    color: #185FA5;
    line-height: 1.5;
}

/* =============================================
   SPONSOR DIRECTORY FILTERS
   ============================================= */

.pil-dir-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.pil-dir-filters-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    background: var(--pil-white);
    border: 1px solid var(--pil-border);
    border-radius: var(--pil-radius-lg);
    padding: 20px 24px;
}

.pil-dir-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pil-dir-filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pil-text-muted);
    white-space: nowrap;
    min-width: 80px;
}

.pil-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 0 6px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 4px;
    min-width: 18px;
    height: 18px;
}

.pil-filter-pill.active .pil-filter-count {
    background: rgba(255,255,255,0.25);
}

/* =============================================
   EMAIL SIGNUP SECTION
   ============================================= */
.pil-email-signup {
    background: var(--pil-navy);
    padding: 56px 2rem;
    text-align: center;
}

.pil-email-signup-inner {
    max-width: 520px;
    margin: 0 auto;
}

.pil-email-signup h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pil-white);
    margin-bottom: 12px;
}

.pil-email-signup p {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 28px;
    line-height: 1.65;
}

.pil-email-signup .mc4wp-form input[type="email"] {
    width: 100%;
    padding: 12px 18px;
    border-radius: var(--pil-radius-xl);
    border: none;
    font-size: 1rem;
    margin-bottom: 12px;
}

.pil-email-signup .mc4wp-form input[type="text"] {
    width: 100%;
    padding: 12px 18px;
    border-radius: var(--pil-radius-xl);
    border: none;
    font-size: 1rem;
    margin-bottom: 12px;
}

.pil-email-signup .mc4wp-form input[type="submit"] {
    background: var(--pil-red);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: var(--pil-radius-xl);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pil-transition);
    width: 100%;
}

.pil-email-signup .mc4wp-form input[type="submit"]:hover {
    background: #c9202f;
}

/* =============================================
   HAMBURGER BUTTON
   ============================================= */
.pil-hamburger {
  display: none;  /* hidden on desktop — shown via media query below */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--pil-radius-sm);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: var(--pil-transition);
}

.pil-hamburger:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
}

.pil-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.25s ease;
  transform-origin: center;
}

/* Animate into X when open */
.pil-hamburger--open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.pil-hamburger--open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.pil-hamburger--open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   MOBILE MENU DRAWER
   ============================================= */
.pil-mobile-menu {
  display: none;  /* hidden on desktop — shown via media query below */
  background: var(--pil-navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 2px solid var(--pil-red);
  position: sticky;
  top: 80px;
  z-index: 999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.pil-mobile-menu--open {
  max-height: 500px;
  padding-top: 20px;
  padding-bottom: 24px;
}

.pil-mobile-nav-links {
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pil-mobile-nav-links li a {
  display: block;
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pil-mobile-nav-links li:last-child a {
  border-bottom: none;
}

.pil-mobile-nav-links li a:hover {
  color: white;
}

.pil-mobile-menu-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.pil-mobile-menu-btns .pil-btn-nav-subscribe,
.pil-mobile-menu-btns .pil-btn-nav-member,
.pil-mobile-menu-btns .pil-btn-nav-sponsor {
  display: block !important;
  text-align: center;
  padding: 11px 16px;
  font-size: 0.95rem;
}

/* Prevent body scroll when menu open */
body.pil-menu-open {
  overflow: hidden;
}

/* =============================================
   RESPONSIVE — 768px and below
   ============================================= */
@media (max-width: 768px) {

  /* Show hamburger, hide desktop nav elements */
  .pil-hamburger {
    display: flex;
  }

  .pil-nav-links {
    display: none;
  }

  .pil-nav-right {
    display: none;
  }

  /* Show mobile drawer */
  .pil-mobile-menu {
    display: block;
  }

  /* Nav padding tighter on mobile */
  .pil-nav {
    padding: 0 1.25rem;
  }

  /* Logo on mobile — slightly smaller but still proud, head freed */
  .pil-nav-logo img,
  .pil-nav-logo .custom-logo-link img,
  .pil-nav-logo .custom-logo {
    height: 80px;
    margin-top: -12px;
  }

  /* Card grid — 2 columns on tablet */
  .pil-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  /* Card section header stacks */
  .pil-card-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  /* Why strip — tighter on mobile */
  .pil-why-strip {
    padding: 16px 1.25rem;
    gap: 8px;
  }

  /* Hide the vertical divider in why strip on mobile */
  .pil-why-strip-divider {
    display: none;
  }

  /* Quiz blocks go single column */
  .pil-question-block {
    grid-template-columns: 1fr;
  }

  .pil-question-affiliate {
    width: 100%;
  }

  /* Footer goes single column */
  .pil-footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Videos stack */
  .pil-video-row {
    grid-template-columns: 1fr;
  }

  /* Feature page sponsor/member blocks */
  .pil-sponsor-available-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .pil-btn-sponsor-cta {
    margin-left: 0;
  }

  .pil-member-cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Feature two-column layout goes single column */
  .pil-feature-columns {
    grid-template-columns: 1fr;
  }

  .pil-feature-sidebar {
    position: static;
  }
}

/* =============================================
   RESPONSIVE — 480px and below (phones)
   ============================================= */
@media (max-width: 480px) {

  /* Hero breathing room */
  .pil-hero {
    padding: 48px 1.25rem 40px;
  }

  .pil-hero-sub {
    font-size: 1rem;
  }

  /* Card grid — 2 columns on small phones */
  .pil-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Card section padding */
  .pil-card-section {
    padding: 32px 1.25rem;
  }

  /* Feature page padding */
  .pil-feature-wrap {
    padding: 32px 1.25rem;
  }

  /* Email signup padding */
  .pil-email-signup {
    padding: 40px 1.25rem;
  }

  /* Footer padding */
  .pil-footer {
    padding: 32px 1.25rem 20px;
  }

  /* Sponsor banner stacks */
  .pil-sponsor-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* =============================================
   INLINE-STYLE MOBILE OVERRIDES
   Targets hardcoded inline styles in PHP templates
   using !important to override inline styles
   ============================================= */
@media (max-width: 768px) {

  /* Fix section padding — inline style says 40px, too wide on mobile */
  main section[style*="padding:72px 40px"],
  main section[style*="padding: 72px 40px"],
  main section[style*="padding:64px 40px"],
  main section[style*="padding: 64px 40px"],
  main section[style*="padding:48px 40px"],
  main section[style*="padding: 48px 40px"],
  main section[style*="padding:56px 40px"],
  main section[style*="padding: 56px 40px"] {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* Prevent any element from overflowing viewport */
  main section,
  main section > div {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* Two-column grids → single column */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:280px 1fr"],
  div[style*="grid-template-columns: 280px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Three-column grids → single column */
  div[style*="grid-template-columns:repeat(3,1fr)"],
  div[style*="grid-template-columns: repeat(3,1fr)"],
  div[style*="grid-template-columns:repeat(3, 1fr)"],
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* About page — two-column opening section */
  div[style*="grid-template-columns:1fr 1fr"][style*="gap:48px"],
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 48px"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Subscribe page comparison grid */
  div[style*="grid-template-columns:1fr 1fr"][style*="gap:24px"],
  div[style*="grid-template-columns:1fr 1fr"][style*="gap:28px"] {
    grid-template-columns: 1fr !important;
  }

  /* Greek roots band — flex wrap already set but force it */
  div[style*="display:flex"][style*="gap:48px"] {
    gap: 20px !important;
  }

  /* Pull quote on about page — tighten padding */
  div[style*="padding:32px 40px"] {
    padding: 24px 1.25rem !important;
  }

  /* CTA button rows — already flex-wrap but ensure it */
  div[style*="display:flex"][style*="justify-content:center"] {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  /* Ensure images don't overflow */
  main img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Inline max-width containers — ensure they don't add overflow */
  div[style*="max-width:1000px"],
  div[style*="max-width: 1000px"],
  div[style*="max-width:800px"],
  div[style*="max-width: 800px"] {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {

  /* Even tighter padding on very small phones */
  main section[style*="padding:72px 40px"],
  main section[style*="padding: 72px 40px"] {
    padding-top: 48px !important;
    padding-bottom: 40px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  main section[style*="padding:64px 40px"],
  main section[style*="padding: 64px 40px"] {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* TNT red band — tighten */
  section[style*="background:#e8394a"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Sponsor page three cards — single column on small phone */
  div[style*="grid-template-columns:repeat(3,1fr)"],
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}
