/* ============================================================================
   GLOBAL STYLES AND RESETS
   ============================================================================ */
html {
  box-sizing: border-box;
  font-size: 18px;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-weight: normal;
  background-color: #330033;
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  color: #fcfcfc;
  text-align: center;
  font-size: 18px;
}

h1, h2, h3, h4, h5, h6, p, ol, ul, li, table, tr, td, q {
  padding: 0;
  margin: 0;
  font-weight: normal;
}

h1, h2, h3, h4, h5, h6, ol, ul, li, table, tr, td {
  font-size: 18px;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: pretty;
}

p:not(:last-child) { margin-bottom: 0.3em; }

q {
  quotes: none;
}

ol, ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #ccccee;
}
a:hover {
  color: #eeeeff;
}

/* ============================================================================
   BACKGROUND AND LAYOUT
   ============================================================================ */

/* Faded background image overlay */
#background-fade {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0));
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0));
}

  #background-fade img {
    width: 100%;
    height: auto;
    display: block;
  }

/* Site header with logo and tagline */
header {
  max-width: 720px;
  margin: 40px auto 10px;
  padding: 10px;
}

header h1 {
  display: block;
  width: 80%;
  margin: auto;
}

header h2 {
  padding: 10px 20px;
  margin: 10px 0 0;
  color: #fff;
  font-weight: bold;
  text-align: center;
}

/* ============================================================================
   MAIN CONTENT LAYOUT
   ============================================================================ */

/* Primary content container */
main {
  max-width: 720px;
  margin: auto;
}

body.wide main {
  max-width: 1000px; 
}

/* Grid container for homepage content boxes */
#content-wrapper {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile, two columns on desktop */
  gap: 20px;
  margin-bottom: 40px;
  padding: 0 20px; 
}

/* ============================================================================
   CONTENT BOXES AND GRID SYSTEM
   ============================================================================ */

/* Base styling for all content containers */
.box, .half-box, .full-box {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.gold-trim {
  border: 1px solid gold;
}

/* Box headings */
h3 {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
}

/* Listen Section */
#listen-section {
  max-width: 720px;
  margin: 0 auto;
}

/* ============================================================================
   THUMBNAIL LAYOUTS (Episodes, Club, etc.)
   ============================================================================ */

/* Flexible thumbnail layout for episodes and promotional items */
.thumbnail-item {
  display: flex;        
  align-items: center;  
  margin-bottom: 20px;  
  padding-bottom: 20px; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.2); 
  text-align: left;    
}

.thumbnail-item:last-child {
  margin-bottom: 0;     
  padding-bottom: 0;    
  border-bottom: none;  
}

.thumbnail-image {
  flex: 0 0 25%;     
  margin-right: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.thumbnail-image img {
  display: block;       
  width: 100%;          
  height: auto;         
  border-radius: 5px;   
}

.thumbnail-details {
  flex: 1;              
}

.thumbnail-details h4 {
  margin-bottom: 5px;   
  font-size: 1.1em;     
  font-weight: bold;
}

.thumbnail-details p {
  font-size: 0.9em;     
  color: #eee;          
}


/* ============================================================================
   MEDIA PLAYER AND LISTENING LINKS
   ============================================================================ */

/* Embedded Spotify player styling */
.player { 
  margin-bottom: 40px;
  padding: 0;
}

.player iframe {
  background-color: #ccc;
  width: 100%;
  aspect-ratio: 16 / 9;
}

#listen { 
  margin-bottom: 20px;
}

#listen-links img { 
  height: 50px;
  margin: 5px 0; 
}

.link-buttons { 
  max-width: 720px;
  text-align: center;
  margin: 0 auto;
}

.link-buttons ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; 
  gap: 10px; 
}

.link-buttons li {
  margin: 0;
  flex: 0 1 auto; 
}

.link-buttons li img {
  width: auto; 
  height: 50px; 
  border-radius: 10px;
}

/* RSS feed text styling */
.link-buttons p {
  margin: 15px auto 0;
  font-size: 0.85em;
}

@media (max-width: 600px) {
  .link-buttons ul {
     justify-content: center; 
  }
  
  /* Compact subscribe button sizing */
  .link-buttons li img {
    height: 35px;
  }
  
  /* Compact RSS feed text on mobile */
  .link-buttons p {
    font-size: 0.7em;
    margin: 8px 20px 0;
    line-height: 1.2;
  }
}

/* ============================================================================
   CONTACT AND LINK SECTIONS
   ============================================================================ */

/* Contact form and link styling */
#contact {
  margin-bottom: 0;
}

.link-list {
  margin-bottom: 0;
}

.link-list li a {
  display: block;
  padding: 12px 20px;
  margin: 10px auto;
  text-decoration: none;
  background-color: #336;
  border-radius: 15px;
  font-weight: bold;
  font-size: 0.9em;
}

.link-list li a:hover {
  background-color: #669;
}

/* ============================================================================
   SOCIAL MEDIA BUTTONS
   ============================================================================ */

/* Social media icon grid layout */
#social-section {
  margin-bottom: 40px;
  text-align: center; 
}

.social-buttons ul {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; 
  gap: 15px; 
}

.social-buttons li {
  margin: 0;
  flex: 0 0 auto;
}

.social-buttons li svg {
    width: 30px; 
    height: 30px;
    fill: #ccccee; 
}
.social-buttons li a:hover svg {
    fill: #eeeeff; /* Hover color */
}


@media (max-width: 600px) { 
  .social-buttons ul {
      gap: 10px;
  }
}

/* Episode credits table styling */
.episode-credits {
  margin: 20px 0;
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  text-align: left;
  font-size: 0.85em;
}

.episode-credits h4 {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
  color: #fff;
}

.credits-table {
  width: 100%;
  border-collapse: collapse;
}

.credits-table tr:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.credit-category {
  font-weight: bold;
  padding: 6px 12px 6px 0;
  vertical-align: top;
  color: #ccc;
  white-space: nowrap;
  width: 1%;
  font-size: 0.9em;
}

.credit-names {
  padding: 6px 0;
  color: #fff;
  line-height: 1.3;
  font-size: 0.85em;
}

@media (max-width: 600px) {
  .credits-table tr {
    display: block;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .credit-category,
  .credit-names {
    display: block;
    width: 100%;
    padding: 2px 0;
  }
  
  .credit-category {
    white-space: normal;
    margin-bottom: 5px;
  }
}

/* ============================================================================
   FOOTER
   ============================================================================ */

/* Site footer styling */
footer {
  font-size: 0.7em;
  margin: 100px 10px 40px; 
  text-align: center; 
}

/* ============================================================================
   EPISODE PAGE SPECIFIC STYLES
   ============================================================================ */

/* Episode introduction and metadata */
.intro {
  margin-bottom: 20px;
  text-align: center;
}

/* Three-column navigation: Previous | All Episodes | Next */
.episode-navigation {
  margin-bottom: 20px;
  width: 100%;
}

/* Grid layout for navigation items */
.nav-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

/* Individual navigation item container */
.nav-item {
  display: flex;
  align-items: stretch;
}

/* Navigation link styling with hover effects */
.nav-item a {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: rgba(0,0,0,0.3);
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.2s;
  width: 100%;
  min-height: 100%;
}

.nav-item a:hover {
  background-color: rgba(0,0,0,0.5);
}

/* Small episode thumbnail images for navigation */
.nav-thumb {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  object-fit: cover;
}

/* Text content area for navigation items */
.nav-text {
  flex: 1;
  margin: 0 10px;
}

/* Navigation direction labels (Previous/Next) */
.nav-label {
  font-size: 0.8em;
  color: #ccc;
  margin-bottom: 2px;
}

/* Episode titles in navigation */
.nav-title {
  font-size: 0.9em;
  font-weight: bold;
}

/* Center alignment for All Episodes button */
.nav-center {
  justify-content: center;
}

/* Styling for the central All Episodes button */
.all-episodes-link {
  padding: 15px 20px !important;
  font-weight: bold;
  text-align: center;
}

@media (max-width: 768px) {
  .nav-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }
  
  .nav-item {
    justify-content: center;
  }
  
  .nav-item a {
    justify-content: center;
    padding: 12px 8px;
    text-align: center;
    font-size: 0.8em;
  }
  
  /* Simplified navigation layout */
  .nav-title {
    display: none;
  }
  
  .nav-thumb {
    width: 25px;
    height: 25px;
  }
  
  .nav-text {
    margin: 0;
  }
  
  .nav-label {
    font-size: 0.8em;
    margin-bottom: 0;
  }
  
  /* Unified button styling */
  .all-episodes-link {
    padding: 12px 8px !important;
    font-size: 0.8em;
    font-weight: normal;
  }
}

.description {
  margin-bottom: 20px;
  text-align: center;
}


.transcribe-credit {
  text-align: center;
  font-size: 0.7em;
  margin-bottom: 20px;
}

.episode-player {
  margin-bottom: 20px;
}

.transcript {
  width: 100%;
  margin: 0 auto 40px;
  text-align: left;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  padding: 20px;
}

.transcript-data {
  display: table;
  width: 100%; 
}

.transcript p { 
  margin: 0;
}

.quote {
  display: table-row;
}

.quote:hover {
  background-color: #336;
}

.speaker, .text {
  display: table-cell;
  padding: 8px;
  vertical-align: top;
}

.speaker {
    font-weight: bold;
    white-space: nowrap;
    padding-right: 15px;
}

.text {
  border-left: 2px solid #333; 
  padding-left: 15px;
  width: 100%; 
  word-break: break-word; 
}
.text br {
    content: "";
    display: block;
    margin-bottom: 0.5em; 
}


.maintext { 
  text-align: left;
  margin-top: 10px;
  margin-bottom: 40px;
  padding: 10px 40px 40px;
  background-color: rgba(0,0,0,0.5);
}

.maintext h4 {
  padding-top: 20px;
  font-weight: bold;
}

.maintext p {
  margin-top: 10px;
}


/* ============================================================================
   RESPONSIVE DESIGN - DESKTOP
   ============================================================================ */

/* Two-column grid layout for larger screens */
@media (min-width: 768px) {
  #content-wrapper {
    grid-template-columns: 1fr 1fr; /* Two columns on desktop */
  }

  /* Full-width content elements */
  .full-box {
    grid-column: 1 / -1;
  }
  /* .half-box elements will naturally take one column */

}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE
   ============================================================================ */

/* Mobile thumbnail layout adjustments */
@media (max-width: 600px) {
  .thumbnail-item {
    flex-direction: column;
    align-items: center;   
    text-align: center;    
    margin-bottom: 30px;   
  }

  .thumbnail-image {
    flex-basis: auto;      
    max-width: 150px;      
    margin-right: 0;       
    margin-bottom: 15px;   
  }

  .thumbnail-details {
    text-align: center;    
    width: 100%;           
  }
}