/* =============================================
   The Path to Bitcoin - Custom Homepage Styles
   ============================================= */

/* Hide the page title banner on the front page */
body.home .qodef-page-title,
body.home .qodef-title-holder,
body.page-id-18 .qodef-page-title,
body.page-id-18 .qodef-title-holder {
  display: none !important;
}

/* Make hero cover block full-width */
body.home .wp-block-cover,
body.page-id-18 .wp-block-cover {
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  max-width: 100vw !important;
  width: 100vw !important;
}

/* Make the Listen & Subscribe footer full-width */
body.home .wp-block-group.has-background,
body.page-id-18 .wp-block-group.has-background {
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  max-width: 100vw !important;
  width: 100vw !important;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Episode grid card styling */
.wp-block-latest-posts.episode-grid {
  list-style: none;
  padding: 0;
}

.wp-block-latest-posts.episode-grid li {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding-bottom: 1.5rem;
}

.wp-block-latest-posts.episode-grid li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.wp-block-latest-posts.episode-grid .wp-block-latest-posts__featured-image {
  margin-bottom: 0;
}

.wp-block-latest-posts.episode-grid .wp-block-latest-posts__featured-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0;
}

.wp-block-latest-posts.episode-grid .wp-block-latest-posts__post-title {
  padding: 0.75rem 1rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
  display: block;
}

.wp-block-latest-posts.episode-grid .wp-block-latest-posts__post-title:hover {
  color: #f7931a;
}

.wp-block-latest-posts.episode-grid time {
  padding: 0 1rem;
  font-size: 0.85rem;
  color: #888;
}

.wp-block-latest-posts.episode-grid .wp-block-latest-posts__post-excerpt {
  padding: 0 1rem;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

/* Button styling - ensure consistent look */
.wp-block-button__link {
  border-radius: 25px !important;
  padding: 12px 28px !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  transition: opacity 0.2s ease !important;
}

.wp-block-button__link:hover {
  opacity: 0.9;
}

/* Hide the redundant "Home" in breadcrumb if any */
body.home .qodef-breadcrumbs {
  display: none !important;
}

/* Reduce top padding on homepage content area */
body.home .qodef-page-content-section,
body.page-id-18 .qodef-page-content-section {
  padding-top: 0 !important;
}

/* Fix header branding (carried over from Customizer) */
.qodef-header-logo-link {
  font-size: 0;
  display: flex;
  align-items: center;
}
.qodef-header-logo-image {
  display: none !important;
}
.qodef-header-logo-link::after {
  content: "The Path to Bitcoin";
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  font-family: inherit;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* ==========================================
   PODCAST ARCHIVE PAGE (/ptb/)
   ========================================== */

/* Hide the redundant page title on the podcast page */
body.page-id-4608 .qodef-page-title,
body.page-id-4608 .qodef-title-holder {
    display: none !important;
}

body.page-id-4608 .qodef-page-content-section {
    padding-top: 0 !important;
}

/* Episode Grid */
.ptb-episode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

@media (max-width: 900px) {
    .ptb-episode-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .ptb-episode-grid {
        grid-template-columns: 1fr;
    }
}

/* Episode Card */
.ptb-episode-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ptb-episode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

/* Card Image */
.ptb-card-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.ptb-card-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ptb-episode-card:hover .ptb-card-image-link img {
    transform: scale(1.05);
}

.ptb-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ptb-card-placeholder span {
    font-size: 3rem;
    color: #f7931a;
}

/* Card Body */
.ptb-card-body {
    padding: 1rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ptb-card-body time {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.ptb-card-body h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    line-height: 1.35;
}

.ptb-card-body h3 a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ptb-card-body h3 a:hover {
    color: #f7931a;
}

.ptb-card-body p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

/* Card Tags */
.ptb-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.ptb-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #f5f5f5;
    color: #666;
    font-size: 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.ptb-tag:hover {
    background: #f7931a;
    color: #fff;
}

/* Pagination */
.ptb-pagination {
    max-width: 1200px;
    margin: 2.5rem auto;
    text-align: center;
}

.ptb-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ptb-pagination li {
    display: inline-block;
}

.ptb-pagination a,
.ptb-pagination span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.ptb-pagination a {
    color: #333;
    background: #f5f5f5;
}

.ptb-pagination a:hover {
    background: #f7931a;
    color: #fff;
}

.ptb-pagination .current {
    background: #f7931a;
    color: #fff;
    font-weight: 600;
}

.ptb-pagination .prev,
.ptb-pagination .next {
    font-weight: 600;
}
