/* ============================================================
   Savory Salt Podcast — Styles
   Purple/Gold theme inspired by the 100 Day Hero palette
   ============================================================ */

:root {
    --bg-dark: #241046;
    --bg-light: #2d1456;
    --primary: #723795;
    --primary-light: #B467AA;
    --primary-dark: #4a1d6b;
    --gold: #D28829;
    --gold-light: #FEF491;
    --surface: #1a0e30;
    --surface-light: #2d1456;
    --surface-border: #3d2066;
    --text: #f5f5f5;
    --text-secondary: #c4b5d0;
    --text-muted: #8b7a9e;
    --radius: 8px;
    --max-width: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Header / Nav ---- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--surface-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo { display: flex; flex-direction: column; gap: 0; }
.logo-text { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.logo-text:hover { color: var(--gold); }
.logo-tagline { font-size: 0.75rem; color: var(--text-muted); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--gold); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--text); margin: 5px 0; transition: 0.3s;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.btn-primary {
    background: var(--gold);
    color: var(--bg-dark);
}
.btn-primary:hover {
    background: var(--gold-light);
    color: var(--bg-dark);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--surface-border);
}
.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--surface) 0%, var(--primary-dark) 50%, var(--bg-dark) 100%);
    padding: 5rem 1.5rem;
    text-align: center;
}

.hero-content { max-width: 700px; margin: 0 auto; }

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }

.hero-platforms-main {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.hero-platforms-main a {
    font-size: 0.95rem;
    color: var(--primary-light);
    font-weight: 600;
    transition: color 0.2s;
}
.hero-platforms-main a:hover { color: var(--gold); }

.hero-platforms {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.hero-platforms a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.hero-platforms a:hover { color: var(--gold); }

.hero-stat {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---- Search ---- */
.search-section { padding: 2rem 0; }

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 2px solid var(--surface-border);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--primary-light); }
.search-box input::placeholder { color: var(--text-muted); }

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.search-result-item {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--surface-border);
    display: block;
    color: var(--text);
}
.search-result-item:hover { background: var(--bg-light); }
.search-result-item:last-child { border-bottom: none; }
.search-result-title { font-weight: 600; font-size: 0.95rem; }
.search-result-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.archive-search { margin-bottom: 2rem; max-width: 100%; }

/* ---- Episodes Grid ---- */
.episodes-section { padding: 3rem 0; }

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.episode-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.episode-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.episode-card-link {
    display: block;
    padding: 1.25rem;
    color: var(--text);
    height: 100%;
}

.episode-card .episode-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.episode-number {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
}

.episode-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.episode-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.episode-card-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.episode-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.episode-duration { font-size: 0.85rem; color: var(--text-muted); }
.episode-listen { font-size: 0.85rem; color: var(--primary-light); font-weight: 600; }

.section-cta { text-align: center; padding-top: 1rem; }

/* ---- Episode Page ---- */
.episode-page { padding: 2rem 0 4rem; }

.episode-header { margin-bottom: 2rem; }
.episode-header .episode-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.episode-header .episode-meta span { font-size: 0.9rem; color: var(--text-muted); }
.episode-header .episode-number { color: var(--gold); }

.episode-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Audio Player */
.audio-player {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}

.audio-player audio { display: none; }

/* Top row: play button + title/time */
.player-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--gold);
    color: var(--bg-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}
.play-btn:hover { background: var(--gold-light); transform: scale(1.05); }
.play-btn:active { transform: scale(0.95); }
.play-btn.playing { background: var(--primary-light); }
.play-btn svg { width: 20px; height: 20px; }
.play-btn .icon-play { margin-left: 2px; }

.player-info { flex: 1; min-width: 0; }
.player-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-times {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}
.player-sep { margin: 0 0.25rem; }

/* Progress bar */
.player-progress {
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-bg {
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--surface-border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-buffered {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: rgba(114, 55, 149, 0.3);
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-light), var(--gold));
    border-radius: 3px;
    transition: width 0.05s linear;
}

.progress-input {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 2;
    width: 100%;
    height: 24px;
    background: transparent;
    cursor: pointer;
    margin: 0;
}
.progress-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-dark);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: transform 0.15s;
}
.progress-input::-webkit-slider-thumb:hover { transform: scale(1.3); }
.progress-input::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-dark);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    cursor: pointer;
}
.progress-input::-webkit-slider-runnable-track { background: transparent; }
.progress-input::-moz-range-track { background: transparent; }

/* Bottom controls row */
.player-controls-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.speed-btn {
    background: var(--surface-border);
    border: none;
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.speed-btn:hover { background: var(--primary-dark); color: var(--text); }

.player-volume {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.volume-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}
.volume-btn:hover { color: var(--text); }
.volume-btn svg { width: 18px; height: 18px; }

.volume-input {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 4px;
    background: var(--surface-border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.volume-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-secondary);
    cursor: pointer;
}
.volume-input::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-secondary);
    border: none;
    cursor: pointer;
}

.player-cta-links {
    margin-left: auto;
    display: flex;
    gap: 1rem;
}
.player-cta-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.2s;
}
.player-cta-links a:hover { color: var(--gold); }

/* Show Notes */
.show-notes {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--surface-border);
}

.show-notes h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.show-notes h3 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; color: var(--primary-light); }

.show-notes-summary {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.key-points { padding-left: 1.5rem; }
.key-points li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.takeaway {
    border-left: 4px solid var(--gold);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(210, 136, 41, 0.08);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.takeaway p {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.6;
}

.scripture-refs { padding-left: 1.5rem; }
.scripture-refs li { margin-bottom: 0.25rem; color: var(--text-secondary); }

/* Transcript */
.transcript { margin-bottom: 2.5rem; }
.transcript h2 { font-size: 1.5rem; margin-bottom: 1rem; }

.transcript-toggle {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    color: var(--primary-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}
.transcript-toggle:hover { border-color: var(--primary); }

.transcript-content {
    max-height: 250px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s;
}
.transcript-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, #1e0f38);
    pointer-events: none;
}

.transcript.expanded .transcript-content {
    max-height: none;
}
.transcript.expanded .transcript-content::after { display: none; }
.transcript.expanded .transcript-toggle::before { content: "Hide "; }

.transcript-body {
    background: rgba(45, 20, 86, 0.5);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
}

.transcript-body p {
    font-size: 1.05rem;
    color: #ddd0e8;
    line-height: 1.9;
    margin-bottom: 1.25rem;
    letter-spacing: 0.01em;
}

.transcript-body p:last-child {
    margin-bottom: 0;
}

.transcript-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1rem;
}

/* Episode Navigation */
.episode-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--surface-border);
}

.nav-prev, .nav-next {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    max-width: 48%;
    transition: border-color 0.2s;
    color: var(--text);
}
.nav-prev:hover, .nav-next:hover { border-color: var(--primary); }
.nav-next { text-align: right; margin-left: auto; }

.nav-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.nav-title { font-size: 0.9rem; font-weight: 600; line-height: 1.3; }

/* ---- Archive Page ---- */
.page-header {
    padding: 3rem 0 1.5rem;
}
.page-header h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.5rem; }
.page-header p { color: var(--text-secondary); font-size: 1.05rem; }

.season-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--text); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: var(--text); }

.episodes-list { margin-bottom: 3rem; }

.episode-row {
    border-bottom: 1px solid var(--surface-border);
}

.episode-row-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0.5rem;
    color: var(--text);
    transition: background 0.2s;
}
.episode-row-link:hover { background: rgba(114, 55, 149, 0.1); }

.episode-row-number {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
    min-width: 4.5rem;
}

.episode-row-title {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.episode-row-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 6rem;
    text-align: right;
}

.episode-row-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 3.5rem;
    text-align: right;
}

/* ---- About Page ---- */
.about-content { max-width: 700px; padding-bottom: 4rem; }
.about-section { margin-bottom: 2.5rem; }
.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}
.about-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.listen-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

.about-cta {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
}
.about-cta h2 { margin-bottom: 0.5rem; }
.about-cta p { text-align: center; }
.about-cta-links { display: flex; gap: 1rem; justify-content: center; margin-top: 1rem; }

/* ---- Footer ---- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--surface-border);
    padding: 3rem 0 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.25rem; }
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; }

.footer-heading { font-weight: 600; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
    border-top: 1px solid var(--surface-border);
    padding: 1rem 1.5rem;
    text-align: center;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero { padding: 3rem 1.5rem; }
    .hero-title { font-size: 2.5rem; }
    .hero-tagline { font-size: 1.1rem; }

    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 1rem 1.5rem; gap: 1rem; border-bottom: 1px solid var(--surface-border); }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

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

    .episode-title { font-size: 1.75rem; }

    .episode-row-link { flex-wrap: wrap; }
    .episode-row-date, .episode-row-duration { font-size: 0.75rem; }

    .footer-container { grid-template-columns: 1fr; gap: 1.5rem; }

    .episode-nav { flex-direction: column; }
    .nav-prev, .nav-next { max-width: 100%; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; }
}
