/* ==========================================================================
   Bitia Podcast - Main Stylesheet (Vanilla CSS)
   ========================================================================== */

:root {
    /* Color Palette */
    --clr-cyan: #3BFCFC;
    --clr-blue: #3B3BFC;
    --clr-red: #FC3B3B;
    --clr-yellow: #FCFC3B;
    --clr-white: #FFFFFF;
    --clr-black: #000000;

    /* Backgrounds & Surfaces (Dark Theme) */
    --bg-main: #050510;
    --bg-surface: rgba(25, 25, 45, 0.4);
    --bg-surface-hover: rgba(45, 45, 75, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Shadow */
    --shadow-glow: 0 0 20px rgba(59, 252, 252, 0.2);
    --shadow-neon-blue: 0 0 20px rgba(59, 59, 252, 0.4);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--clr-white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 59, 252, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(59, 252, 252, 0.05) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

a {
    color: var(--clr-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--clr-yellow);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.text-accent {
    color: var(--clr-cyan);
}

.text-gradient {
    background: linear-gradient(90deg, var(--clr-cyan), var(--clr-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Layout & Components
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--glass-border);
}

nav .logo img {
    height: 60px;
    object-fit: contain;
}

nav ul {
    display: flex;
    gap: var(--space-lg);
}

nav a {
    color: var(--clr-white);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--clr-cyan);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* single page */
.single-page {
    margin: var(--space-xl) 0;
}

.single-page h1,
.single-page h2,
.single-page h3,
.single-page h4 {
    margin: var(--space-lg) 0 var(--space-md) 0;
}

.single-page img {
    border-radius: 16px;
    margin: var(--space-lg) 0;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Hero Section */
.hero {
    padding: var(--space-xl) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero .date {
    color: var(--clr-cyan);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: var(--space-sm);
    font-size: 0.8rem;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    text-shadow: var(--shadow-neon-blue);
}

.hero .description {
    /* max-width: 600px; */
    margin: 0 auto var(--space-sm);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Buttons */
.cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--clr-blue);
    color: var(--clr-white);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 59, 252, 0.4);
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 59, 252, 0.6);
    color: var(--clr-white);
}

.cta.secondary {
    background: transparent;
    border: 2px solid var(--glass-border);
    box-shadow: none;
}

.cta.secondary:hover {
    border-color: var(--clr-cyan);
    background: rgba(59, 252, 252, 0.1);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

/* Grid Lists (Podcasts & Episodes) */
.list-section {
    padding: var(--space-xl) 0;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

/* Cards (Glassmorphism) */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: var(--space-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    background: var(--bg-surface-hover);
    border-color: rgba(59, 252, 252, 0.4);
    box-shadow: var(--shadow-glow);
}

.card img {
    border-radius: 8px;
    margin-bottom: var(--space-md);
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: var(--space-md);
}

/* Episode List View specific */
.episode-row {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    /* Forced row */
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: var(--space-md);
    gap: var(--space-md);
}

.episode-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    border: 1px solid var(--glass-border);
}

.episode-row:hover {
    border-color: var(--clr-cyan);
    transform: translateX(4px);
}

.episode-row h3 {
    margin-bottom: 0.2rem;
    font-size: 1.3rem;
}

.episode-row .meta {
    font-size: 0.8rem;
    color: var(--clr-cyan);
    margin-bottom: var(--space-sm);
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.episode-row h3,
.episode-row p {
    position: relative;
    z-index: 2;
}

.episode-row-action {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    /* Allow wrapping if buttons don't fit */
}

@media (max-width: 850px) {
    .episode-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: var(--space-lg) var(--space-md);
    }

    .episode-thumbnail {
        width: 120px;
        height: 120px;
        margin-bottom: var(--space-sm);
    }

    .episode-row-content {
        width: 100%;
        margin-bottom: var(--space-sm);
    }

    .episode-row-action {
        justify-content: center;
        width: 100%;
    }
}

.ep-number-big {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.15);
    line-height: 1;
    pointer-events: none;
    z-index: 1;
    font-family: var(--font-heading);
    user-select: none;
}

.hero .ep-number-big {
    font-size: 15rem;
    right: -3%;
    top: 15%;
    color: rgba(59, 252, 252, 0.15);
}

/* Hero Refined Layout */
.hero-main-content {
    display: flex;
    flex-direction: row;
    gap: var(--space-lg);
    align-items: stretch;
    margin-bottom: var(--space-lg);
    width: 100%;
}

.hero-image-container {
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    position: relative;
    z-index: 2;
    min-height: 250px;
}

.hero-thumbnail-large {
    /* width: 100%; */
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.hero-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

@media (max-width: 850px) {
    .hero-main-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-image-container {
        flex: 0 0 auto;
        /* width: 100%; */
        max-width: 350px;
        aspect-ratio: 1 / 1;
    }

    .hero-text-content {
        text-align: center;
    }
}

/* Home/Podcast Specific ID & Class Refinements */
#hero-title {
    font-size: 2.5rem;
    margin-bottom: 0.2rem;
    text-align: left;
}

.subscription-section {
    margin: var(--space-md) 0;
    width: 100%;
    text-align: left;
}

.subscription-label {
    display: inline-block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0.5rem 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-text-content .date {
    margin-bottom: 0.2rem;
}

.hero-text-content .hero-date-sub {
    margin-bottom: var(--space-md);
    font-size: 0.8rem;
    opacity: 0.8;
}

.hero-text-content .description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
}

/* Single Episode Page View */
.episode-details {
    padding: var(--space-xl) 0;
}

.episode-layout {
    display: flex;
    flex-direction: row;
    gap: var(--space-xl);
    align-items: flex-start;
}

.episode-image-container {
    flex: 0 0 350px;
}

.episode-thumbnail-large {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.episode-info {
    flex: 1;
}

@media (max-width: 950px) {
    .episode-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .episode-image-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 350px;
        margin-bottom: var(--space-lg);
    }

    .episode-info {
        width: 100%;
    }
}

.glass-panel {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: var(--space-lg);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.audio-player-container {
    margin: var(--space-lg) 0;
    width: 100%;
}

audio {
    width: 100%;
    border-radius: 50px;
    outline: none;
}

/* Audio player custom pseudo elements for webkit */
audio::-webkit-media-controls-panel {
    background: var(--clr-cyan);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
    /* background-color: var(--clr-black); */
    border-radius: 50%;
    /* filter: invert(75%) sepia(100%) saturate(500%) hue-rotate(10deg); */
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: var(--clr-black);
}

.show-notes {
    color: rgba(255, 255, 255, 0.8);
}

.show-notes p {
    margin-bottom: 1rem;
}

.show-notes a {
    color: var(--clr-cyan);
    text-decoration: underline;
}

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--glass-border);
    margin-top: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.platform-icons {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.platform-icons a {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.platform-icons a:hover {
    color: var(--clr-white);
}

/* Loading State */
.loading {
    text-align: center;
    padding: var(--space-xl);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--clr-cyan);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (min-width: 768px) {
    .episode-row {
        flex-direction: row;
        align-items: center;
        gap: var(--space-md);
    }

    .episode-row-content {
        flex: 1;
    }

    .episode-row-action {
        flex-shrink: 0;
    }

    .episode-row h3 {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    nav {
        flex-direction: column;
        gap: var(--space-md);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .button-group {
        flex-direction: column;
        width: 100%;
        padding: 0 var(--space-md);
    }

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