/* ══════════════════════════════════════════════════════════════
   EMIT Yachts — EMIT Talks Page Stylesheet
   Dedicated talks page at /talks/
   Uses CSS custom properties from style.css
   ══════════════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────────────── */
/* Uses exact same .hero styles from style.css — no overrides. */

/* ── Overview Section ──────────────────────────────────────── */
.talks-overview-section { padding: 80px 5%; }
.talks-overview-layout {
    display: flex;
    gap: 48px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}
.talks-overview-image { flex: 1; }
.talks-overview-img { width: 100%; border-radius: var(--radius-standard); display: block; }
.talks-overview-text { flex: 1; }
.talks-overview-title {
    font-family: 'Protrakt-Semi-Bold-Exp-One', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-pearl);
    margin-bottom: 16px;
}
.talks-overview-body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-accent-pearl);
    opacity: 0.75;
    line-height: 1.7;
    margin-bottom: 16px;
}
.talks-overview-cta { margin-top: 8px; }

/* ── Episode Archive ───────────────────────────────────────── */
.talks-archive-section { padding: 0 5% 80px; }

.section-header { margin-bottom: 40px; }
.section-header .section-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-accent-pearl);
    opacity: 0.6;
    margin-top: 8px;
}

.talks-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.talk-card {
    border-radius: var(--radius-standard);
    overflow: hidden;
    background: rgba(10, 10, 10, 0.4);
    border: 1px solid rgba(242, 240, 239, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}
.talk-card:hover { border-color: rgba(242, 240, 239, 0.25); transform: translateY(-2px); }
.talk-card:active { transform: scale(0.98); }

.talk-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}
.talk-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.talk-card:hover .talk-card-thumb img { transform: scale(1.05); }

.talk-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
}
.talk-card-play i {
    font-size: 3rem;
    color: var(--color-pearl);
    opacity: 0.85;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
    transition: all 0.3s ease;
}
.talk-card:hover .talk-card-play i {
    opacity: 1;
    transform: scale(1.1);
    color: #ff0000;
}

.talk-card-body { padding: 20px; }
.talk-card-title {
    font-family: 'Protrakt-Semi-Bold-Exp-One', sans-serif;
    font-size: 1.1rem;
    color: var(--color-pearl);
    margin-bottom: 6px;
}
.talk-card-date {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--color-accent-pearl);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.talk-card-desc {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-accent-pearl);
    opacity: 0.7;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Video Modal ───────────────────────────────────────────── */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.video-modal.active { opacity: 1; visibility: visible; }
.video-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}
.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    z-index: 1;
}
.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--color-pearl);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    z-index: 2;
}
.video-modal-close:hover,
.video-modal-close:active { opacity: 1; }
.video-modal-wrapper { width: 100%; height: 100%; }
.video-modal-iframe { width: 100%; height: 100%; border: none; border-radius: 8px; }

/* ── CTA ───────────────────────────────────────────────────── */
.talks-cta-section { padding: 60px 5% 100px; }
.talks-cta-title {
    font-family: 'Protrakt-Semi-Bold-Exp-One', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--color-pearl);
    margin-bottom: 12px;
}
.talks-cta-text {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-accent-pearl);
    opacity: 0.7;
    margin-bottom: 24px;
}

/* ── Loading & Empty ───────────────────────────────────────── */
.talks-loading {
    text-align: center; padding: 60px 20px;
    color: var(--color-accent-pearl); opacity: 0.5;
}
.talks-loading .spinner {
    width: 32px; height: 32px;
    border: 2px solid rgba(242,240,239,0.15);
    border-top-color: var(--color-accent-pearl);
    border-radius: 50%;
    animation: talks-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes talks-spin { to { transform: rotate(360deg); } }
.talks-empty { text-align: center; padding: 60px 20px; color: var(--color-accent-pearl); opacity: 0.5; }

/* ── Shorts Carousel ────────────────────────────────────── */
.talks-shorts-section {
    padding: 0 5% 60px;
}

.shorts-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(242, 240, 239, 0.15) transparent;
}
.shorts-carousel::-webkit-scrollbar {
    height: 6px;
}
.shorts-carousel::-webkit-scrollbar-track {
    background: transparent;
}
.shorts-carousel::-webkit-scrollbar-thumb {
    background: rgba(242, 240, 239, 0.15);
    border-radius: 3px;
}
.shorts-carousel::-webkit-scrollbar-thumb:hover {
    background: rgba(242, 240, 239, 0.3);
}

.short-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-standard);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(242, 240, 239, 0.08);
    transition: all 0.3s ease;
}
.short-card:hover {
    border-color: rgba(242, 240, 239, 0.25);
    transform: translateY(-3px);
}
.short-card:active {
    transform: scale(0.97);
}

.short-card-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.short-card:hover .short-card-thumb {
    transform: scale(1.05);
}

.short-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
    z-index: 1;
}
.short-card-play i {
    font-size: 2.2rem;
    color: var(--color-pearl);
    opacity: 0.85;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
    transition: all 0.3s ease;
}
.short-card:hover .short-card-play i {
    opacity: 1;
    transform: scale(1.15);
    color: #ff0000;
}

.short-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 10px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--color-pearl);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    z-index: 2;
}

/* ── Shorts Modal (vertical variant) ────────────────────── */
.shorts-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.shorts-modal.active {
    opacity: 1;
    visibility: visible;
}
.shorts-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}
.shorts-modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    aspect-ratio: 9 / 16;
    max-height: 90vh;
    z-index: 1;
}
.shorts-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--color-pearl);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    z-index: 2;
}
.shorts-modal-close:hover,
.shorts-modal-close:active {
    opacity: 1;
}
.shorts-modal-wrapper {
    width: 100%;
    height: 100%;
}
.shorts-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* ── Responsive Shorts ──────────────────────────────────── */
@media (max-width: 768px) {
    .talks-shorts-section { padding: 0 5% 40px; }
    .short-card { flex: 0 0 160px; }
    .short-card-play i { font-size: 1.8rem; }
    .shorts-modal-content { max-width: 320px; }
}

/* ── Talk Card Dual Buttons ───────────────────────────────── */
.talk-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.talk-card-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    border: 1px solid rgba(242, 240, 239, 0.15);
    background: rgba(22, 24, 29, 0.6);
    color: var(--color-accent-pearl);
    transition: all 0.25s ease;
    text-decoration: none;
}
.talk-card-action-btn:hover {
    background: rgba(242, 240, 239, 0.1);
    border-color: rgba(242, 240, 239, 0.3);
    color: var(--color-pearl);
}
.talk-card-action-btn:active { transform: scale(0.96); }
.talk-card-action-btn.listen-btn.active-listening {
    background: rgba(26, 58, 42, 0.4);
    border-color: var(--color-accent-pearl);
    color: var(--color-pearl);
}
.talk-card-action-btn i { font-size: 0.9rem; }

/* ── Persistent Player Bar (Spotify-style) ────────────────── */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(180deg, rgba(30, 32, 38, 0.98) 0%, rgba(22, 24, 29, 0.99) 100%);
    border-top: 1px solid rgba(242, 240, 239, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.player-bar.active { transform: translateY(0); }

.player-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    gap: 16px;
    height: 64px;
}

/* Left: episode info */
.player-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 0 0 280px;
}
.player-bar-thumb {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(242, 240, 239, 0.1);
}
.player-bar-info {
    min-width: 0;
    overflow: hidden;
}
.player-bar-title {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-pearl);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.player-bar-subtitle {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--color-accent-pearl);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Center: controls + progress */
.player-bar-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 600px;
}
.player-bar-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}
.player-bar-btn {
    background: none;
    border: none;
    color: var(--color-accent-pearl);
    opacity: 0.6;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.player-bar-btn:hover { opacity: 1; color: var(--color-pearl); }
.player-bar-btn:active { transform: scale(0.9); }
.player-bar-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(242, 240, 239, 0.12);
    font-size: 1rem;
    opacity: 1;
    color: var(--color-pearl);
}
.player-bar-play:hover {
    background: rgba(242, 240, 239, 0.2);
    transform: scale(1.05);
}

.player-bar-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.player-bar-time {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--color-accent-pearl);
    opacity: 0.5;
    min-width: 32px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.player-bar-track {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(242, 240, 239, 0.1);
    cursor: pointer;
    position: relative;
}
.player-bar-track:hover { height: 6px; }
.player-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--color-accent-pearl);
    width: 0%;
    transition: width 0.3s linear;
    position: relative;
}
.player-bar-handle {
    display: none;
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-pearl);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.player-bar-track:hover .player-bar-handle { display: block; }

/* Right: extra actions */
.player-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 80px;
    justify-content: flex-end;
}
.player-bar-right .player-bar-btn { font-size: 1.1rem; }

/* Player bar padding for page content */
.player-bar-spacer { height: 64px; }

/* ── Now playing indicator on cards ─────────────────────────── */
.talk-card.now-playing {
    border-color: var(--color-accent-pearl);
    box-shadow: 0 0 0 1px rgba(232, 228, 222, 0.15);
}
.talk-card.now-playing .talk-card-body { border-top: 1px solid rgba(232, 228, 222, 0.15); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .talks-overview-layout { flex-direction: column; gap: 24px; }
    .talks-overview-section { padding: 40px 5%; }
    .talks-archive-section { padding: 0 5% 60px; }
    .talks-archive-grid { grid-template-columns: 1fr; }

    .talk-card-play i { font-size: 2.5rem; }
    .video-modal-content { width: 95%; }
    .player-bar-inner { padding: 8px 12px; height: 56px; gap: 8px; }
    .player-bar-left { flex: 0 0 auto; min-width: 0; }
    .player-bar-thumb { width: 36px; height: 36px; }
    .player-bar-title { font-size: 0.78rem; max-width: 120px; }
    .player-bar-subtitle { display: none; }
    .player-bar-center { max-width: none; }
    .player-bar-controls { gap: 12px; }
    .player-bar-progress { display: none; }
    .player-bar-right { flex: 0 0 auto; }
    .player-bar-spacer { height: 56px; }
    .talk-card-actions { flex-direction: column; }
}
