:root {
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0284c7;
  --border-color: #334155;
  --brand-cream: #F4EFE6;
  --brand-charcoal: #333333;
  --brand-teal: #2B7A78;
}

h1, h2, h3 {
  color: var(--text-main);
  font-weight: 700;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 80px;
}

header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.9);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

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

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover, nav a.active {
  color: var(--accent);
}

main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Audio Player Section */
.hero-audio {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.audio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.badge {
  background-color: var(--accent);
  color: #0f172a;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

audio {
  width: 100%;
  margin-top: 1rem;
  border-radius: 8px;
}

details {
  margin-top: 1rem;
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.transcript {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  white-space: pre-line;
}

/* Category Filter Bar */
.category-filter {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--accent);
  color: #0f172a;
  font-weight: 600;
  border-color: var(--accent);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.news-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.news-image {
  width: 100%;
  height: 180px;
  object-fit: cover; /* Crops the image proportionally to fit the height */
  border-radius: 8px;
  margin-bottom: 1rem;
  background-color: var(--bg-color); /* Shows if image is loading or broken */
}

.subscribe-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.subscribe-card h3 {
  margin-bottom: 0.5rem;
}

.subscribe-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.subscribe-form-container {
  flex: 1;
  min-width: 300px;
}

#subscribe-form {
  display: flex;
  gap: 0.5rem;
}

#subscribe-email {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-main);
  outline: none;
}

#subscribe-email:focus {
  border-color: var(--accent);
}
.logo {
  display: inline-flex;
  align-items: center;
  padding-left: 90px; /* space for the logo image */
  padding-top: 90px; /* space for the logo image */
  background: url('TheDailyTakeLogoWhite.jpg') no-repeat left center;
  background-size: 90px 90px; /* logo dimensions */
  text-decoration: none;
}

.filter-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.filter-pill {
  padding: 8px 16px;
  background-color: #E2E8F0;
  color: var(--brand-charcoal);
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background-color: #cbd5e1;
}

.filter-pill.active {
  background-color: var(--brand-teal);
  color: #ffffff;
}

/* Container reserves space so the page doesn't jump when the card floats */
.player-wrapper {
  margin: 24px 0;
  min-height: 90px;
}

/* Base Top Player Styling */
.audio-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.player-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.player-title {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
}

.audio-card audio {
  width: 100%;
  height: 40px;
  outline: none;
}

/* Floating Bottom-Right State (Desktop) */
.audio-card.is-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 48px);
  z-index: 1000;
  border-color: var(--brand-teal, #2B7A78);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  animation: floatIn 0.3s ease-out;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Fallback: Keep centered at the bottom on smaller screens */
@media (max-width: 640px) {
  .audio-card.is-floating {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}
.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-icon-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.header-icon-btn.youtube {
  background-color: #ff0000;
}

.header-icon-btn.spotify {
  background-color: #1ed760;
}

.header-icon-btn.amazon {
  background-color: #232f3e;
}
    footer {
      margin-top: auto;
      border-top: 1px solid var(--card-border);
      padding: 2rem 1.5rem;
      text-align: center;
      color: var(--text-body);
      font-size: 0.875rem;
    }
