/* APR Film Player — Slide-based layout */

.apr-player-section {
    padding: 2rem 0;
}

.apr-player-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.apr-player-title {
    font-size: 1.3rem;
    font-weight: 400;
    margin: 1rem 0 1.5rem;
    text-align: center;
    letter-spacing: 0.04em;
    color: #2d3e1f;
}

/* The slide — white, bordered, generous padding, holds the currently-playing
   segment (story, requirements, or a single quiz question). */
.apr-slide {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 3rem 4rem;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #1a1a1a;
    position: relative;
    animation: slideFadeIn 0.5s ease;
}

@keyframes slideFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* STORY slide — sentences accumulate as audio plays */
.apr-slide-story {
    font-size: 1.4rem;
    line-height: 1.55;
    font-weight: 300;
}

.apr-slide-story p {
    margin: 0 0 1.1rem;
    animation: sentenceIn 0.4s ease;
}

.apr-slide-story p:last-child {
    margin-bottom: 0;
}

@keyframes sentenceIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* REQUIREMENTS slide — same look as story but with a distinct heading */
.apr-slide-requirements {
    font-size: 1.3rem;
    line-height: 1.55;
    font-weight: 300;
}

.apr-slide-requirements .slide-heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a7c29;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e5e5e5;
}

.apr-slide-requirements .slide-heading-title {
    display: block;
    font-size: 1.5rem;
    color: #2d3e1f;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    margin-top: 0.4rem;
}

.apr-slide-requirements p {
    margin: 0 0 1.1rem;
    animation: sentenceIn 0.4s ease;
}

.apr-slide-requirements p:last-child {
    margin-bottom: 0;
}

/* QUIZ slide — one question per slide, large prompt, tappable options */
.apr-slide-quiz {
    justify-content: flex-start;
    padding-top: 3rem;
}

.apr-slide-quiz .question-number {
    color: #999;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.apr-slide-quiz .question-prompt {
    font-size: 1.7rem;
    line-height: 1.35;
    margin: 0 0 2rem;
    font-weight: 400;
    color: #1a1a1a;
}

.apr-slide-quiz .question-options {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.apr-slide-quiz .question-options li {
    background: #f7f7f4;
    border: 2px solid #e5e5e5;
    padding: 1rem 1.3rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    font-size: 1.05rem;
    line-height: 1.4;
}

.apr-slide-quiz .question-options li:hover {
    background: #efefea;
    border-color: #cfcfcf;
}

.apr-slide-quiz .question-options li.selected-correct {
    background: #e8f3dd;
    border-color: #4a7c29;
    color: #2d4e14;
}

.apr-slide-quiz .question-options li.selected-wrong {
    background: #fbe8e8;
    border-color: #b33;
    color: #7a2222;
}

.apr-slide-quiz .question-options li.disabled {
    cursor: default;
    opacity: 0.6;
}

.apr-slide-quiz .question-options li.disabled.selected-correct,
.apr-slide-quiz .question-options li.disabled.selected-wrong {
    opacity: 1;
}

.apr-slide-quiz .quiz-explanation {
    margin: 0 0 1.5rem;
    padding: 1rem 1.2rem;
    background: #f5f9ef;
    border-left: 4px solid #4a7c29;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0 6px 6px 0;
    color: #1a1a1a;
}

.apr-slide-quiz .quiz-source {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #555;
}

.apr-slide-quiz .quiz-source a {
    color: #2d6a14;
    word-break: break-word;
}

.apr-slide-quiz .apr-player-continue {
    align-self: flex-start;
    width: auto;
    min-width: 180px;
}

/* SOURCES / end-of-stage slide */
.apr-slide-sources h3 {
    margin: 0 0 1.2rem;
    font-size: 1.4rem;
    color: #2d3e1f;
}

.apr-slide-sources ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

.apr-slide-sources ul li {
    padding-left: 1rem;
    border-left: 2px solid #cfcfcf;
    margin-bottom: 0.5rem;
}

.apr-slide-sources a {
    color: #2d6a14;
}

/* Controls under the slide */
.apr-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.apr-player-btn {
    background: #2d3e1f;
    color: #fff;
    border: 1px solid #2d3e1f;
    padding: 0.55rem 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}

.apr-player-btn:hover {
    background: #3d4e2f;
    border-color: #3d4e2f;
}

.apr-player-start {
    background: #4a7c29;
    border-color: #4a7c29;
    padding: 0.8rem 2.2rem;
    font-size: 1rem;
    font-weight: 500;
}

.apr-player-start:hover {
    background: #5a8c39;
    border-color: #5a8c39;
}

.apr-player-progress {
    color: #555;
    font-size: 0.85rem;
    min-width: 5rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.apr-player-continue {
    background: #4a7c29;
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    transition: background 0.2s;
}

.apr-player-continue:hover:not(:disabled) {
    background: #5a8c39;
}

.apr-player-continue:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Next stage button (repurposed as the single navigation control for the player).
   During playback it shows "Continue →" and is disabled until the slide finishes;
   on the final sources slide it returns to "Next stage →" and navigates via href. */
.apr-player-container .course-stage-nav a.btn-primary.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.apr-player-noscript {
    background: #fff3f3;
    border: 1px solid #f1baba;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    color: #7a2222;
}

/* Mobile */
@media (max-width: 768px) {
    .apr-slide {
        padding: 2rem 1.5rem;
        min-height: 380px;
    }

    .apr-slide-story {
        font-size: 1.15rem;
    }

    .apr-slide-requirements {
        font-size: 1.1rem;
    }

    .apr-slide-requirements .slide-heading-title {
        font-size: 1.25rem;
    }

    .apr-slide-quiz .question-prompt {
        font-size: 1.3rem;
    }

    .apr-slide-quiz .question-options li {
        font-size: 1rem;
        padding: 0.9rem 1rem;
    }

    .apr-player-controls {
        gap: 0.5rem;
    }
}
