/**
 * National Voter Education Center — Premium Redesign Styles
 * Theme: Classic Statesmanship Scholastic (Lora Serif + Outfit Sans + Glass Elements)
 */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- General Core Reset & Typography Overrides --- */
.ec-edu-public-page {
  font-family: 'Outfit', sans-serif;
  scroll-behavior: smooth;
}

/* --- Classic Scholastic Typography --- */
.ec-edu-blog-masthead h1,
.ec-edu-blog-hero-glass h2,
.ec-edu-blog-card-title,
.ec-edu-blog-section-head h2,
.ec-edu-blog-article h1,
.ec-edu-blog-aside-widget h3 {
  font-family: 'Lora', Georgia, serif !important;
  letter-spacing: -0.01em;
}

/* --- Masthead Styling --- */
.ec-edu-blog {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.ec-edu-blog-masthead {
  position: relative;
  margin-bottom: 2rem;
  padding: 2rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

html.dark .ec-edu-blog-masthead {
  background: rgba(5, 11, 20, 0.65);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Academy Tagline Badge */
.ec-edu-blog-masthead::before {
  content: "🏛  APC NATIONAL CIVIC ACADEMY";
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #E5B25D; /* Brand Gold */
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.ec-edu-blog-masthead h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--apc-text-primary, #0f172a);
  line-height: 1.15;
}

html.dark .ec-edu-blog-masthead h1 {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ec-edu-blog-masthead p {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--apc-text-muted, #475569);
  max-width: 48rem;
  line-height: 1.6;
}

html.dark .ec-edu-blog-masthead p {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Search & Toolbar Redesign --- */
.ec-edu-blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

html.dark .ec-edu-blog-toolbar {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.ec-edu-blog-search {
  flex: 1;
  min-width: 14rem;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  color: #0f172a;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ec-edu-blog-search:focus {
  border-color: #217C46; /* Brand Green */
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(33, 124, 70, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

html.dark .ec-edu-blog-search {
  background: rgba(10, 20, 35, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

html.dark .ec-edu-blog-search:focus {
  border-color: #E5B25D; /* Brand Gold */
  background: rgba(10, 20, 35, 0.95);
  box-shadow: 0 0 0 3px rgba(229, 178, 93, 0.2);
}

/* --- Category Navigation Pills --- */
.ec-edu-blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  padding: 0.35rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

html.dark .ec-edu-blog-cats {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.04);
}

.ec-edu-blog-cat-pill {
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--apc-text-label, #475569);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark .ec-edu-blog-cat-pill {
  color: rgba(255, 255, 255, 0.7);
}

.ec-edu-blog-cat-pill:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

html.dark .ec-edu-blog-cat-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.ec-edu-blog-cat-pill.ec-edu-blog-cat-active {
  background: #217C46 !important; /* Brand Green */
  border-color: rgba(33, 124, 70, 0.2) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(33, 124, 70, 0.25);
}

html.dark .ec-edu-blog-cat-pill.ec-edu-blog-cat-active {
  background: #E5B25D !important; /* Brand Gold */
  border-color: rgba(229, 178, 93, 0.2) !important;
  color: #050B14 !important;
  box-shadow: 0 4px 12px rgba(229, 178, 93, 0.35);
  font-weight: 700;
}

/* --- Live Marquee Ticker --- */
.ec-edu-blog-ticker-wrap {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(33, 124, 70, 0.15);
  background: linear-gradient(90deg, rgba(33, 124, 70, 0.03), rgba(229, 178, 93, 0.03));
  padding: 0.5rem 0;
  margin-bottom: 2rem;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

html.dark .ec-edu-blog-ticker-wrap {
  border-color: rgba(229, 178, 93, 0.15);
  background: linear-gradient(90deg, rgba(33, 124, 70, 0.08), rgba(5, 11, 20, 0.6));
  box-shadow: none;
}

.ec-edu-blog-ticker-item {
  font-size: 0.72rem;
  font-weight: 600;
  color: #217C46;
}

html.dark .ec-edu-blog-ticker-item {
  color: #E5B25D;
}

/* --- Premium Magazine Hero --- */
.ec-edu-blog-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  margin-bottom: 2.5rem;
  cursor: pointer;
  min-height: 380px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .ec-edu-blog-hero {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.ec-edu-blog-hero:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

html.dark .ec-edu-blog-hero:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Preset background image gradients if empty */
.ec-edu-blog-hero-banner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ec-edu-blog-hero:hover .ec-edu-blog-hero-banner {
  transform: scale(1.02);
}

/* Static theme gradients */
.ec-edu-blog-hero-banner.ec-blog-theme-green {
  background: linear-gradient(135deg, #102a18, #217C46, #0e1e12);
}
.ec-edu-blog-hero-banner.ec-blog-theme-gold {
  background: linear-gradient(135deg, #2c210e, #E5B25D, #161005);
}
.ec-edu-blog-hero-banner.ec-blog-theme-navy {
  background: linear-gradient(135deg, #050B14, #12243d, #03060c);
}
.ec-edu-blog-hero-banner.ec-blog-theme-yobe {
  background: linear-gradient(135deg, #0e2015, #217C46, #2c210e);
}

.ec-edu-blog-hero-glass {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 1.5rem;
  max-width: 44rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(5, 11, 20, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

html.light .ec-edu-blog-hero-glass {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.ec-edu-blog-hero-glass h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

html.light .ec-edu-blog-hero-glass h2 {
  color: #050B14;
}

.ec-edu-blog-hero-glass p {
  margin-top: 0.75rem;
  font-size: 0.925rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

html.light .ec-edu-blog-hero-glass p {
  color: #475569;
}

/* --- Dynamic Articles Grid & Cards --- */
.ec-edu-blog-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .ec-edu-blog-layout {
    grid-template-columns: 1fr 320px;
  }
}

.ec-edu-blog-section-head {
  margin: 2rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html.dark .ec-edu-blog-section-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ec-edu-blog-section-head h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--apc-text-primary, #0f172a);
}

html.dark .ec-edu-blog-section-head h2 {
  color: #ffffff;
}

.ec-edu-blog-section-head p {
  font-size: 0.8rem;
  color: var(--apc-text-muted, #64748b);
  margin-top: 0.25rem;
}

.ec-edu-blog-masonry {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .ec-edu-blog-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ec-edu-blog-card {
  cursor: pointer;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: flex-col;
}

html.dark .ec-edu-blog-card {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ec-edu-blog-card:hover {
  border-color: rgba(33, 124, 70, 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  transform: translateY(-3px) scale(1.005);
}

html.dark .ec-edu-blog-card:hover {
  border-color: rgba(229, 178, 93, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.ec-edu-blog-card-banner {
  height: 8rem;
  width: 100%;
}

/* Dynamic theme gradients on card covers if empty */
.ec-edu-blog-card-banner.ec-blog-theme-green {
  background: linear-gradient(135deg, #102a18, #217C46, #1b3823);
}
.ec-edu-blog-card-banner.ec-blog-theme-gold {
  background: linear-gradient(135deg, #2c210e, #E5B25D, #4a3818);
}
.ec-edu-blog-card-banner.ec-blog-theme-navy {
  background: linear-gradient(135deg, #050B14, #12243d, #1a2f4c);
}
.ec-edu-blog-card-banner.ec-blog-theme-yobe {
  background: linear-gradient(135deg, #0e2015, #217C46, #4a3818);
}

.ec-edu-blog-card-body {
  padding: 1.25rem;
}

.ec-edu-blog-card-cat {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #217C46;
}

html.dark .ec-edu-blog-card-cat {
  color: #E5B25D;
}

.ec-edu-blog-card-title {
  margin-top: 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--apc-text-primary, #0f172a);
}

html.dark .ec-edu-blog-card-title {
  color: #ffffff;
}

.ec-edu-blog-card-excerpt {
  margin-top: 0.6rem;
  font-size: 0.825rem;
  line-height: 1.5;
  color: var(--apc-text-secondary, #64748b);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html.dark .ec-edu-blog-card-excerpt {
  color: rgba(255, 255, 255, 0.65);
}

.ec-edu-blog-card-meta {
  margin-top: 1rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--apc-text-muted, #94a3b8);
}

html.dark .ec-edu-blog-card-meta {
  color: rgba(255, 255, 255, 0.4);
}

/* --- Premium Editorial Box & Timeline Checklists --- */
.ec-edu-blog-editorial-box {
  border-left: 4px solid #217C46;
  background: rgba(33, 124, 70, 0.02);
  padding: 1.25rem 1.5rem;
  border-radius: 0 1rem 1rem 0;
  margin: 1.5rem 0;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-left-width: 4px;
}

html.dark .ec-edu-blog-editorial-box {
  border-left-color: #E5B25D;
  background: rgba(229, 178, 93, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  border-left-width: 4px;
}

/* --- Scholastic Sidebar Widgets --- */
.ec-edu-blog-aside-widget {
  border-radius: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
}

html.dark .ec-edu-blog-aside-widget {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ec-edu-blog-aside-widget h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #217C46;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding-bottom: 0.5rem;
}

html.dark .ec-edu-blog-aside-widget h3 {
  color: #E5B25D;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* PVC Step Indicators inside widgets */
.ec-edu-blog-aside-widget p {
  line-height: 1.5;
}

/* --- Immersive Article Reading View --- */
.ec-edu-blog-article {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 0;
}

.ec-edu-blog-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #217C46;
  margin-bottom: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

html.dark .ec-edu-blog-back {
  color: #E5B25D;
}

.ec-edu-blog-back:hover {
  background: rgba(33, 124, 70, 0.08);
}

html.dark .ec-edu-blog-back:hover {
  background: rgba(229, 178, 93, 0.1);
}

.ec-edu-blog-article-banner {
  height: 16rem;
  border-radius: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

html.dark .ec-edu-blog-article-banner {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ec-edu-blog-article h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--apc-text-primary, #0f172a);
}

html.dark .ec-edu-blog-article h1 {
  color: #ffffff;
}

.ec-edu-blog-article-byline {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--apc-text-muted, #64748b);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding-bottom: 1rem;
}

html.dark .ec-edu-blog-article-byline {
  color: rgba(255, 255, 255, 0.5);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ec-edu-blog-article-body {
  margin-top: 2rem;
}

.ec-edu-blog-article-body p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--apc-text-secondary, #334155);
}

html.dark .ec-edu-blog-article-body p {
  color: rgba(255, 255, 255, 0.8);
}

/* --- Interactive reading progress indicator --- */
#ec-edu-read-progress {
  position: fixed;
  top: 4.1rem; /* Aligns beneath sticky topbar */
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, #217C46, #E5B25D);
  z-index: 60;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(229, 178, 93, 0.45);
}

/* --- Heatmap cell details --- */
.ec-edu-heatmap-cell {
  background: rgba(33, 124, 70, 0.08);
  border: 1px solid rgba(33, 124, 70, 0.15);
  color: #217C46 !important;
}

html.dark .ec-edu-heatmap-cell {
  background: rgba(229, 178, 93, 0.08);
  border-color: rgba(229, 178, 93, 0.15);
  color: #E5B25D !important;
}

/* --- Voter education video cards & modal --- */
.ec-edu-video-card--playable {
  cursor: pointer;
}

.ec-edu-video-card-banner--thumb {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  padding: 0;
}

.ec-edu-video-card-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.ec-edu-video-card-play {
  position: absolute;
  inset: auto auto 0.75rem 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.75rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

.ec-edu-video-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ec-edu-video-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 6, 23, 0.72);
  cursor: pointer;
}

.ec-edu-video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
  color: #fff;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

.ec-edu-video-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.5rem;
}

.ec-edu-video-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.ec-edu-video-modal__close {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.ec-edu-video-modal__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.ec-edu-video-modal__iframe,
.ec-edu-video-modal__video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.ec-edu-video-modal__desc,
.ec-edu-video-modal__empty {
  margin: 0;
  padding: 0.75rem 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}
