/**
 * Adventure Episodes V2 Styles
 * Simplified, reliable styling following Band of Beans design patterns
 */

/* Typography System for Long-Form Reading */
.adventure-episode-v2 {
    background: #FDFCFB; /* Slightly warm background for eye comfort */
}

/* Episode Hero */
.episode-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.hero-parallax {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* This creates the parallax effect */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.3) 0%,
        rgba(0,0,0,0.5) 50%,
        rgba(0,0,0,0.7) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 2rem;
}

.episode-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.episode-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1.1;
    margin: 0 0 1rem 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.episode-subtitle {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.reading-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    opacity: 0.8;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    animation: bounce 3s ease-in-out infinite;
}

.scroll-indicator span {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    margin: 0 auto;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
    opacity: 0.6;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Progress Indicator */
.episode-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.1);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.episode-progress.visible {
    opacity: 1;
}

.progress-bar {
    height: 100%;
    background: #C9CC68;
    width: 0%;
    transition: width 0.2s ease;
}

/* Act Navigation Markers */
.act-markers {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.act-markers.visible {
    opacity: 1;
}

.act-marker {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(126, 93, 76, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
    font-family: 'Stardos Stencil', serif;
}

.act-marker:hover {
    border-color: #7E5D4C;
    background: #7E5D4C;
    color: white;
    transform: scale(1.1);
}

.act-marker.active {
    border-color: #7E5D4C;
    background: #7E5D4C;
    color: white;
}

.act-marker.completed {
    background: #C9CC68;
    border-color: #C9CC68;
}

.act-number {
    font-size: 14px;
    font-weight: 600;
}

/* Episode Content */
.episode-content {
    font-family: 'Literata', Georgia, serif;
    font-size: 20px;
    line-height: 1.8;
    color: #2C2C2C;
    font-weight: 400;
}

.episode-act-v2 {
    position: relative;
    padding: 6rem 0;
}

.narrative-container {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 2rem;
}

.act-header {
    text-align: center;
    margin-bottom: 4rem;
}

.act-title {
    font-family: 'Stardos Stencil', serif;
    font-size: 2.5rem;
    color: #7E5D4C;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.act-roman {
    font-size: 3rem;
    opacity: 0.5;
}

/* Narrative Text */
.narrative-text-v2 {
    margin-bottom: 3rem;
}

.narrative-text-v2 p {
    margin-bottom: 1.5em;
    text-indent: 2em;
}

.narrative-text-v2 p:first-child {
    text-indent: 0;
}

/* Pull Quotes */
.episode-pull-quote-v2 {
    margin: 4rem 0;
    padding: 2rem;
    border-top: 3px solid #C9CC68;
    border-bottom: 3px solid #C9CC68;
    text-align: center;
    background: transparent;
}

.episode-pull-quote-v2 p {
    font-family: 'Stardos Stencil', serif;
    font-size: 28px;
    line-height: 1.4;
    color: #7E5D4C;
    margin: 0;
    text-indent: 0 !important;
}

.episode-pull-quote-v2 cite {
    display: block;
    margin-top: 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #666;
    font-style: normal;
}

/* Act Images */
.act-image {
    margin: 4rem -2rem;
    position: relative;
}

.act-image img {
    width: 100%;
    height: auto;
    display: block;
}

.act-image figcaption {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 1rem;
    padding: 0 2rem;
}

/* Subscription CTA */
.subscription-cta {
    background: linear-gradient(135deg, #FDFCFB 0%, #F9F7F5 100%);
    border-left: 4px solid #C9CC68;
    margin: 4rem -2rem;
    padding: 3rem 2rem;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-headline {
    font-family: 'Stardos Stencil', serif;
    font-size: 2rem;
    color: #7E5D4C;
    margin-bottom: 1rem;
}

.cta-description {
    font-family: 'Literata', Georgia, serif;
    font-size: 20px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 16px 32px;
    background: #7E5D4C;
    color: white;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cta-button:hover {
    background: transparent;
    color: #7E5D4C;
    border-color: #7E5D4C;
}

.impact-note {
    margin-top: 2rem;
}

.impact-note p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #999;
}

/* Related Research */
.related-research {
    background: #F9F7F5;
    padding: 6rem 0;
    margin-top: 4rem;
}

.related-research h2 {
    font-family: 'Stardos Stencil', serif;
    font-size: 2.5rem;
    text-align: center;
    color: #7E5D4C;
    margin-bottom: 3rem;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.research-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

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

.research-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.research-content {
    padding: 1.5rem;
}

.research-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2C2C2C;
}

.research-subtitle {
    font-family: 'Literata', Georgia, serif;
    font-size: 16px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.research-meta {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #999;
    margin-bottom: 1rem;
}

.research-link {
    color: #7E5D4C;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    transition: gap 0.3s ease;
}

.research-link:hover {
    gap: 1rem;
}

/* Episode Footer */
.episode-footer {
    background: #F9F7F5;
    color: #3D2817;
    padding: 6rem 0;
    margin-top: 6rem;
}

.episode-footer .cta-headline {
    color: #3D2817 !important;
}

.episode-footer .cta-description {
    color: #3D2817 !important;
}

.episode-footer .impact-note {
    color: #3D2817;
}

.episode-footer .impact-note small {
    color: #3D2817;
}

.episode-footer .cta-button {
    background: #C9CC68;
    color: #2C2C2C;
}

.episode-footer .cta-button:hover {
    background: white;
    color: #7E5D4C;
}

/* Trip Wire Modal */
.trip-wire-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.trip-wire-modal.active {
    display: flex;
}

.trip-wire-modal-content {
    background: white;
    max-width: 600px;
    width: 90%;
    padding: 3rem;
    border-radius: 12px;
    position: relative;
}

.trip-wire-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.trip-wire-close:hover {
    color: #333;
}

/* Trip Wire Phrases - More Visible Options */

/* Option 1: Subtle Underline with Icon */
.trip-wire-phrase {
    position: relative;
    cursor: pointer;
    color: #7E5D4C;
    border-bottom: 1px dotted #C9CC68;
    transition: all 0.3s ease;
    padding-right: 20px;
}

.trip-wire-phrase::after {
    content: "✦";
    position: absolute;
    right: 0;
    top: -2px;
    color: #C9CC68;
    font-size: 12px;
    animation: pulse 2s ease-in-out infinite;
}

.trip-wire-phrase:hover {
    background: linear-gradient(
        180deg,
        transparent 60%,
        rgba(201, 204, 104, 0.3) 60%
    );
    border-bottom-color: #7E5D4C;
    color: #5A4339;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Option 2: Margin Note Style (uncomment to use) */
/*
.trip-wire-phrase {
    position: relative;
    cursor: pointer;
    color: #7E5D4C;
    font-weight: 500;
}

.trip-wire-phrase::before {
    content: attr(data-hint);
    position: absolute;
    right: calc(100% + 20px);
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    font-size: 14px;
    color: #999;
    font-style: italic;
    font-weight: normal;
    text-align: right;
    opacity: 0.7;
}

@media (max-width: 1200px) {
    .trip-wire-phrase::before {
        display: none;
    }
}
*/

/* Option 3: Inline Discovery Bubble (uncomment to use) */
/*
.trip-wire-phrase {
    position: relative;
    cursor: pointer;
    background: rgba(201, 204, 104, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.trip-wire-phrase::after {
    content: "?";
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #C9CC68;
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    line-height: 16px;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: super;
    font-family: 'Inter', sans-serif;
}
*/

/* Placeholder Content */
.no-acts-placeholder {
    padding: 4rem 0;
    text-align: center;
}

.no-acts-placeholder h2 {
    font-family: 'Stardos Stencil', serif;
    font-size: 2rem;
    color: #7E5D4C;
    margin-bottom: 1rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .act-markers {
        display: none;
    }
    
    .episode-content {
        font-size: 18px;
        line-height: 1.7;
    }
    
    .narrative-container {
        padding: 0 1.5rem;
    }
    
    .episode-title {
        font-size: 2.5rem;
    }
    
    .episode-pull-quote-v2 p {
        font-size: 22px;
    }
    
    .act-image {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }
    
    .subscription-cta {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }
}