:root {
  --black: #000000;
  --gray-dark: #1f2937;
  --gray-muted: #6b7280;
  --border: 1px solid #000000;
  --light-divider: 1px solid #eee;
}

/* --- Base & Layout --- */
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--black);
  background-color: #fff;
}

.site-wrap {
  overflow-x: hidden;
}

/* --- Utility Bar --- */
.utility-bar {
  background-color: var(--black);
  color: #ffffff;
  padding: 10px 20px;
  text-align: center;
}

.utility-container p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Navigation --- */
.main-nav {
  border-bottom: var(--border);
  padding: 5px 0;
  background: #fff;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
}

.nav-logo {
  height: 70px;
}

.menu-items a {
  text-decoration: none;
  color: var(--black);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-left: 30px;
  
  /* This creates a hidden underline using a shadow */
  display: inline-block;
  box-shadow: inset 0 -1px 0 0 transparent;
  transition: box-shadow 0.3s ease;
  padding-bottom: 2px; /* Adds a tiny gap for the underline */
}

.menu-items .resource-btn{
  padding-bottom: 8px;
}

.menu-items a.bulletin-link{
  background-color: var(--black);
  color: #fff;
}

/* Hover effect for desktop only */
@media (min-width: 851px) {
  .menu-items a:hover {
    /* This reveals the underline without moving the text */
    box-shadow: inset 0 -1px 0 0 var(--black);
  }

  /* Keep the Bulletin link from getting the underline since it has a border */
  .menu-items a.bulletin-link:hover {
    box-shadow: none;
    background-color: #fff;
    color: var(--black);
  }
}

/* --- New Mobile Menu Logic --- */

/* Hide Toggle on Desktop */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: var(--black);
  transition: all 0.3s ease;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 999;
}

@media (max-width: 850px) {
  .menu-toggle {
    display: flex;
  }

  /* Transform desktop menu into a mobile drawer */
  .menu-items {
    display: flex;
    position: fixed;
    right: -100%; /* Hidden by default */
    top: 0;
    flex-direction: column;
    background: #fff;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    padding: 100px 40px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
  }

  .menu-items.open {
    right: 0;
  }

  .menu-items a {
    margin: 20px 0;
    font-size: 1.2rem; /* Larger links for touch */
  }

  .mobile-overlay.active {
    display: block;
  }

  /* Hamburger to X Animation */
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Reset previous mobile styles that were forcing display: grid/flex */
  .nav-container {
    flex-direction: row !important;
    justify-content: space-between;
    padding: 15px 25px !important;
  }
}

.bulletin-link {
  border: var(--border);
  padding: 8px 18px;
}

/* --- Hero Section --- */
.hero-header {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.hero-text {
  padding: 80px 40px;
  border-right: var(--border);
}

.hero-image-container {
  width: 100%;
  height: 70%;
  margin: auto;
  overflow: hidden;
}

.hero-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35%;
  display: block;
  filter: grayscale(1);
}

.eyebrow {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  margin-bottom: 24px;
  color: var(--gray-muted);
}

.hero-header h1 {
  font-size: 4.2rem;
  line-height: 1.05;
  margin: 0 0 32px 0;
  letter-spacing: -0.04em;
}

.hero-header p {
  font-size: 1.35rem;
  max-width: 650px;
  line-height: 1.6;
  color: var(--gray-dark);
}

/* --- Content Rows --- */
.content-row,
.split-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  border-top: var(--border);
}

.content-row {
  grid-template-columns: 220px 1fr;
  padding: 70px 40px;
}

.stat-header > .content-row {
  border-top: unset;
}

.split-grid {
  grid-template-columns: 1fr 1fr;
  padding: 0px 40px;
}

.row-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray-muted);
}

.row-body {
  width: 100%;
}

.grid-col {
  padding: 60px 40px;
  border-right: var(--border);
  display: flex;
  flex-direction: column;
}

.grid-col:last-child {
  border-right: none;
  border-bottom:none;
}

/* --- Sermon Section --- */
.sermon-editorial-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  margin-bottom: 40px;
}

.AudioDate {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-muted);
  margin-bottom: 8px;
}

.speaker-name {
  font-size: 2.4rem;
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.audio-container {
  margin: 30px 0;
}

.audioplay {
  width: 100%;
  filter: grayscale(1);
  height: 35px;
}

.sermon-sidebar {
  border-left: var(--light-divider);
  padding-left: 30px;
}

.sidebar-box {
  position: sticky;
  top: 20px;
}

.sidebar-note {
  margin-top: 40px;
  padding-top: 20px;
  border-top: var(--light-divider);
}

.sidebar-note p {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1rem !important;
  line-height: 1.4;
}

/* --- Faith & Maps --- */
.faith-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 20px;
}

.faith-item strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.faith-item p {
  margin-top: 0px;
}

.minimal-map {
  width: 100%;
  height: 390px;
  filter: grayscale(1) contrast(1.2);
  border: var(--border);
  margin: 24px 0;
  transition: filter 0.3s ease;
}

.minimal-map:hover {
  filter: grayscale(0);
}

/* --- Buttons & Links --- */
.action-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--gray-muted);
}

.resource-btn {
  display: inline-block;
  text-decoration: none;
  color: var(--black);
  border: var(--border);
  padding: 8px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align:center;
  transition: all 0.2s ease;
}

.resource-btn:hover {
  background: var(--black);
  color: #fff;
}

.text-cta {
  display: inline-block;
  margin-top: 24px;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  border-bottom: 2px solid var(--black);
  font-size: 0.9rem;
}

/* --- Middle-Ground Footer --- */
.site-footer {
  border-top: var(--border);
  background-color: #fff;
  padding: 60px 40px;
}

.footer-navigation-row,
.footer-identity-row {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr; /* Matches your content-row grid  */
  padding: 40px 0;
}

.footer-navigation-row {
  border-bottom: 1px solid #eee;
}

.footer-links-wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.link-group {
  display: flex;
  gap: 30px;
}

.link-group a {
  text-decoration: none;
  color: var(--black);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.identity-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.address-block p,
.history-block p {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  margin: 0 0 5px 0;
}

.address-block span,
.history-block span {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gray-muted);
  letter-spacing: 0.1em;
}

/* Mobile Adjustments */
@media (max-width: 850px) {
  .footer-navigation-row,
  .footer-identity-row {
    grid-template-columns: 1fr;
    padding: 30px 0;
  }

  .link-group {
    flex-direction: column;
    gap: 15px;
  }

  .identity-content {
    flex-direction: column;
    gap: 20px;
  }
}

/* --- Responsive Styles --- */
@media (max-width: 1000px) {
  .hero-grid,
  .sermon-editorial-grid {
    grid-template-columns: 1fr;
  }

  .hero-text {
    border-right: none;
    border-bottom: var(--border);
    padding: 40px 20px;
  }

  .hero-image-container {
    height: 300px;
  }

  .sermon-sidebar {
    border-left: none;
    padding-left: 0;
    border-top: var(--light-divider);
    padding-top: 30px;
  }
}

@media (max-width: 850px) {
  .hero-header h1 {
    font-size: 2.8rem;
  }
  .content-row,
  .split-grid {
    grid-template-columns: 1fr;
    
  }

  .split-grid{
    padding:0px;
  }
  .grid-col {
    border-right: none;
    border-bottom: var(--border);
  }
  .row-label {
    margin-bottom: 5px;
  }
  .nav-container {
    padding: 0 20px;
  }
}

/* --- Global Mobile Adjustments --- */
@media (max-width: 768px) {
  /* Adjusting the main containers for less horizontal padding */
  .nav-container,
  .hero-text,
  .content-row,
  .split-grid,
  .footer-container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* --- Navigation --- */
  .nav-container {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  /* --- Hero Section --- */
  .hero-header h1 {
    font-size: 2.5rem; /* Shrink large text for mobile screens */
    line-height: 1.1;
  }

  .hero-header p {
    font-size: 1.1rem;
  }

  /* --- Content Layouts --- */
  .content-row {
    grid-template-columns: 1fr; /* Stack label above content */
    padding: 40px 20px;
    gap: 20px;
  }

  .row-label {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .grid-col {
    padding: 40px 0;
    border-right: none;
    border-bottom: var(--border);
  }

  .grid-col:last-child {
    border-bottom: none;
  }

  /* --- Sermon Section --- */
  .speaker-name {
    font-size: 1.8rem;
  }

  .sermon-editorial-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .sermon-sidebar {
    border-left: none;
    border-top: var(--light-divider);
    padding-left: 0;
    padding-top: 30px;
  }

  /* --- Statement of Faith Specifics --- */

  .stat-header {
    background-color: #fafafa; /* Subtle background for the intro */
  }

  .intro-text {
    font-size: 1.4rem;
    line-height: 1.6;
    max-width: 800px;
    color: var(--gray-dark);
    margin-top: 20px;
    font-family: Georgia, serif; /* Serifs make long theological text easier to read */
  }

  .faith-points .content-row {
    padding: 80px 40px;
  }

  .stat-heading {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    font-weight: 700;
    max-width: 900px;
  }

  .faith-points p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--gray-dark);
    max-width: 750px;
  }

  /* Mobile Tweak for Statements */
  @media (max-width: 768px) {
    .stat-heading {
      font-size: 1.5rem;
      margin-top:5px;
    }

    .faith-points .content-row {
      padding: 40px 20px;
    }
  }
  /* --- Footer --- */
  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }
}

/* Small Phone Optimization (iPhone SE / Fold size) */
@media (max-width: 400px) {
  .hero-header h1 {
    font-size: 2rem;
  }

  .utility-bar {
    font-size: 0.6rem;
  }

  .menu-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: center;
    width: 100%;
  }
}

/* --- Resource Page Specifics --- */
.resource-list {
  margin: 20px 0;
  padding-left: 20px;
  list-style-type: square;
}

.resource-list li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  font-size: 0.85rem;
}

.resource-header {
  background-color: #fdfdfd;
  border-bottom: 1px solid #eee;
}

.resource-header .content-row {
  border-top: none;;
}
/* --- Narrative Editorial Style --- */
.narrative-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 40px;
}

.narrative-header {
  margin-bottom: 80px;
  border-bottom: 1px solid #eee;
  padding-bottom: 40px;
}

.narrative-header h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin: 10px 0;
}

.byline {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-muted);
}

.narrative-section {
  display: flex;
  gap: 60px;
  margin-bottom: 60px;
}

.narrative-aside {
  flex: 0 0 120px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gray-muted);
  padding-top: 10px;
  border-top: 2px solid var(--black);
  height: fit-content;
}

.narrative-body {
  flex: 1;
}

.narrative-body h2 {
  font-size: 1.8rem;
  margin-top: 0;
}

.narrative-body p {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1.5em;
}

.narrative-full-image {
  margin: 60px 0 80px 180px; /* Aligns with the narrative body */
}

.narrative-full-image img {
  width: 100%;
  height: auto;
  border: 1px solid #eee;
}

/* Mobile Tweak */
@media (max-width: 800px) {
  .narrative-section {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 5px;
  }
  .narrative-aside {
    flex: 0 0 0;
    border-top: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    width: 100%;
  }
  .narrative-full-image {
    margin: 40px 0;
  }
  .narrative-header h1 {
    font-size: 2.5rem;
  }
  .narrative-header{
    padding-bottom:5px;
    margin-bottom:5px;
  }
}

/* --- Events Feed Styles --- */
.events-feed-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 40px;
}

.feed-header {
  margin-bottom: 100px;
  text-align: center;
}

.feed-header h1 {
  font-size: 3.5rem;
  letter-spacing: -0.03em;
}

.feed-timeline {
  position: relative;
  border-left: 2px solid var(--black); /* The "spine" of the journal */
  padding-left: 60px;
  margin-left: 100px; /* Offset to let the dates breathe */
}

.feed-item {
  position: relative;
  margin-bottom: 100px;
}

.feed-marker {
  position: absolute;
  left: -180px; /* Positions the date on the other side of the line */
  top: 0;
  width: 100px;
  text-align: right;
}

.marker-date {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.feed-item::before {
  content: "";
  position: absolute;
  left: -67px; /* Centers the dot on the line */
  top: 8px;
  width: 12px;
  height: 12px;
  background-color: var(--black);
  border-radius: 50%;
}

.feed-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gray-muted);
  margin-bottom: 10px;
}

.feed-content h2 {
  font-size: 2rem;
  margin: 0 0 20px 0;
}

.feed-content p {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 25px;
}

.feed-details {
  list-style: none;
  padding: 0;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.feed-details li {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .feed-timeline {
    margin-left: 20px;
    padding-left: 30px;
  }
  .feed-marker {
    position: static;
    width: auto;
    text-align: left;
    margin-bottom: 10px;
  }
  .feed-item::before {
    left: -37px;
  }
}

/* --- 404 Error Page Styles --- */
.error-container {
  padding: 100px 20px;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.error-paper {
  max-width: 700px;
  margin: 0 auto;
  background: white;
  padding: 80px 60px;
  border: 1px solid #e0e0e0;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.error-stamp {
  display: block;
  font-size: 6rem;
  font-weight: 900;
  color: #eee; /* Light gray to look like a faint stamp */
  line-height: 1;
  margin-bottom: 10px;
  font-family: "Inter", sans-serif;
}

.error-header h1 {
  font-size: 3rem;
  margin-top: 10px;
  letter-spacing: -0.04em;
}

.error-content p {
  font-family: Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--gray-dark);
  margin-bottom: 30px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  border-top: 1px solid #eee;
  padding-top: 30px;
}

/* Mobile Tweak */
@media (max-width: 600px) {
  .error-paper {
    padding: 40px 20px;
  }
  .error-actions {
    flex-direction: column;
    gap: 20px;
  }
  .error-stamp {
    font-size: 4rem;
  }
}

/* --- Sermon Archive Layout --- */
.sermon-archive-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  padding: 60px 40px;
}

/* Sidebar Search & Filters */
.archive-sidebar {
  position: sticky;
  top: 40px;
  height: fit-content;
}

.minimal-input {
  width: 100%;
  border: var(--border);
  padding: 12px;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  margin-bottom: 40px;
  box-sizing:border-box;
}

.filter-links {
  list-style: none;
  padding: 0;
}

.filter-links li {
  margin-bottom: 12px;
}

.filter-links a {
  text-decoration: none;
  color: var(--gray-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.2s;
}

.filter-links a.active,
.filter-links a:hover {
  color: var(--black);
  border-left: 3px solid var(--black);
  padding-left: 10px;
}

/* Sermon Cards */
.sermon-card {
  border-bottom: 1px solid #eee;
  padding-bottom: 60px;
  margin-bottom: 60px;
}

.sermon-card.featured {
  background: #fcfcfc;
  padding: 40px;
  border: var(--border);
}

.sermon-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.sermon-tag {
  font-size: 0.6rem;
  background: var(--black);
  color: white;
  padding: 4px 8px;
  text-transform: uppercase;
  font-weight: 800;
}

.speaker-name-sm {
  font-size: 1rem;
  font-weight: 700;
  margin: 5px 0 20px 0;
  color: var(--gray-dark);
}

.sermon-desc-short {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gray-muted);
}

/* Minimal Audio Player Inversion */
.audio-player-minimal audio {
  width: 100%;
  height: 35px;
  filter: grayscale(1) contrast(1.1);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .sermon-archive-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* --- Master Player Styles --- */
.master-player-section {
  background-color: #f9f9f9;
  border-bottom: var(--border);
  padding: 80px 40px;
}

.player-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

#master-title {
  font-size: 3rem;
  line-height: 1.1;
  margin: 10px 0;
  letter-spacing: -0.04em;
}

.player-interface audio {
  width: 100%;
  filter: grayscale(1) contrast(1.1);
}

/* --- Archive List Styles --- */
.archive-entry {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.archive-entry:hover {
  background-color: #fdfdfd;
}

.archive-entry .entry-content h2 {
  margin-bottom: 0; /* Keeps the layout tight since there's no speaker subtext */
}

.archive-list {
  height: calc(100vh - 400px);
  overflow-y: auto;
}

/* Container must be relative so the button can be absolute to IT */
.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-container .minimal-input {
    width: 100%;
    padding-right: 35px; /* Creates space so text doesn't hit the 'X' */
}

#clear-search {
    display: none;
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

#clear-search:hover {
    color: #333;
}

.entry-meta {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.play-trigger {
  background: none;
  border: var(--border);
  padding: 8px 12px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  width: fit-content;
  transition: all 0.2s;
}

.play-trigger:hover {
  background: var(--black);
  color: white;
}

.speaker-label {
  font-weight: 700;
  color: var(--gray-muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  margin-top: 5px;
}

/* Historical styling */
.historical .sermon-tag {
  display: inline-block;
  background: #eee;
  color: var(--black);
  font-size: 0.6rem;
  padding: 2px 6px;
  margin-bottom: 10px;
  font-weight: 800;
}

@media (max-width: 900px) {
  /* 1. Reset the Grid so it doesn't overlap */
  .sermon-archive-grid {
    display: flex;
    flex-direction: column; /* Stack vertically */
    padding: 20px;
    gap: 20px;
  }

  .player-container{
    grid-template-columns:1fr;
    grid-template-rows:1fr auto;
    gap:5px;
  }

  .master-player-section{
    padding:40px;
  }



  .archive-sidebar {
    position: relative; /* Remove sticky */
    top: 0;
    width: 100%;
    z-index: 10;
    background: white; /* Ensure it stays above list if needed */
  }

  /* 2. Fix the Year Filter Usability */
  .filter-group {
    margin-top: 10px;
  }

  .filter-links {
    display: flex;
    flex-wrap: nowrap; /* Keep them in one line */
    overflow-x: auto;  /* Enable side-scrolling */
    gap: 10px;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for clean look */
  }

  .filter-links::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
  }

  .filter-links li {
    flex: 0 0 auto; /* Prevent chips from shrinking */
  }


  .filter-links a {
    display: block;
    padding: 10px 20px; /* Bigger tap target */
    background: #f0f0f0;
    border-radius: 50px; /* Pill shape */
    border: none;
    font-size: 0.85rem;
    color: var(--black);
    text-align: center;
  }

  .filter-links a.active {
    background: var(--black);
    color: white;
    border: none;
    padding-left: 20px; /* Reset the desktop border-left padding */
  }

  /* 3. Fix the Clickability of Sermons */
  .archive-list {
    height: auto; 
    overflow: visible; /* Let the main window handle scrolling */
    position: relative;
    z-index: 1; /* Keep it below filters */
  }

  .archive-entry {
    grid-template-columns: 1fr;
    border: 1px solid #eee; /* Give them a border so they look like cards */
    padding: 20px;
    margin-bottom: 15px;
    gap:5px;
    border-radius: 8px;
    pointer-events: auto; /* Force clickability */
  }

  .entry-content{
    grid-row:1;
  }

  .entry-meta{
    gap:5px;
  }

  /* 4. Make the Play Button Huge */
  .play-trigger {
    width: 100%; /* Full width button is easier to tap */
    padding: 15px;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
  }
}


.download-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.master-download-btn {
    padding: 5px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    color: #333;
    border: 1px solid #ccc;
    transition: background 0.2s;
}

.master-download-btn:hover {
    background: #e0e0e0;
}


/* --- 10. SCROLLBAR CUSTOMIZATION --- */
::-webkit-scrollbar {
  width: 2px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #555;
}