/* =========================================================
   shorts.css — Quote Shorts: themes, video-like backgrounds,
   motion, progress bar, responsive layout.
   Linked from details.php.
   ========================================================= */

:root {
    --wine: #7c1e2e;
    --wine-dark: #5a1521;
    --cream: #fcf6f1;
    --gold: #f0b66f;
    --text: #241b18;
    --muted: #756a64;
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: #171214;
}

body {
    margin: 0;
    min-height: 100%;
    overflow: hidden;
    font-family: "DM Sans", sans-serif;
    background: #fcf6f1c2;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.shorts-layout {
    width: min(100% - 40px, 900px);
    height: 100vh;
    height: 100svh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.shorts-feed {
    flex: 0 1 760px;
    width: min(100%, 760px);
    min-width: 0;
    height: min(94vh, 980px);
    height: min(94svh, 980px);
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
    border-radius: 26px;
    background: var(--cream);
    box-shadow: 0 2px 3px rgba(255, 242, 242, 0.36), 0 0 0 1px rgba(255,255,255,.08);
    isolation: isolate;
}

.shorts-feed::-webkit-scrollbar { display: none; }

/* =========================================================
   QUOTE SHORT — the "video frame"
   Every theme only overrides CSS variables + a gradient,
   so one set of markup renders many Canva-like designs.
   Layer stack (bottom → top):
   base gradient < .aurora < ::after blob < ::before mark
   < .ambient particles < .quote-content < topbar < progress
   ========================================================= */
.quote-short {
    --bg: #fcf6f1;
    --bg-2: #f1e4dc;
    --ink: #241b18;
    --ink-soft: #4b3f38;
    --accent: #7c1e2e;
    --accent-2: #f0b66f;
    --topbar-bg: rgba(255, 237, 224, .84);
    --topbar-border: rgba(124, 30, 46, .09);
    --shadow-color: rgba(124, 30, 46, .12);
    --mark-opacity: .045;

    position: relative;
    width: 100%;
    min-height: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 76px 30px 72px;
    overflow: hidden;
    scroll-snap-align: start;
    /* Prevent fast mobile flicks from skipping multiple quote slides. */
    scroll-snap-stop: always;
    color: var(--ink);
    background:
        radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--accent-2) 15%, transparent), transparent 27%),
        radial-gradient(circle at 12% 85%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 32%),
        linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* ---------------- MOVING VIDEO BACKGROUND ---------------- */

/* Aurora: two huge soft cones of theme color slowly rotating. */
.aurora {
    position: absolute;
    inset: -45%;
    z-index: 0;
    background:
        conic-gradient(from 0deg at 32% 30%,
            color-mix(in srgb, var(--accent) 24%, transparent),
            transparent 42%),
        conic-gradient(from 180deg at 68% 72%,
            color-mix(in srgb, var(--accent-2) 20%, transparent),
            transparent 48%);
    filter: blur(46px);
    opacity: .85;
    pointer-events: none;
}

/* Giant decorative quote mark that slowly floats. */
.quote-short::before {
    
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -54%);
    color: var(--accent);
    opacity: var(--mark-opacity);
    font: 700 min(75vw, 650px)/.8 Georgia, serif;
    pointer-events: none;
}

/* Soft drifting light blob (Ken Burns feel). */
.quote-short::after {
    content: "";
    position: absolute;
    z-index: 1;
    width: 55vmax;
    height: 55vmax;
    right: -20vmax;
    top: -25vmax;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 65%);
    filter: blur(10px);
    pointer-events: none;
}

/* Floating dust particles — three theme-colored orbs. */
.ambient {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ambient i {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 70%);
}

.ambient i:nth-child(1) {
    width: 14vmax; height: 14vmax;
    left: 6%; top: 62%;
}
.ambient i:nth-child(2) {
    width: 9vmax; height: 9vmax;
    right: 10%; top: 18%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%);
}
.ambient i:nth-child(3) {
    width: 6vmax; height: 6vmax;
    left: 38%; bottom: 8%;
}

/* Motion only runs on the active slide (saves CPU, replays per visit). */
.quote-short.is-active::before    { animation: markFloat 14s ease-in-out infinite alternate; }
.quote-short.is-active::after     { animation: blobDrift 22s ease-in-out infinite alternate; }
.quote-short.is-active .aurora    { animation: auroraSpin 26s linear infinite; }

.quote-short.is-active .ambient i:nth-child(1) { animation: particleFloat1 11s ease-in-out infinite alternate; }
.quote-short.is-active .ambient i:nth-child(2) { animation: particleFloat2 14s ease-in-out infinite alternate; }
.quote-short.is-active .ambient i:nth-child(3) { animation: particleFloat3 9s  ease-in-out infinite alternate; }

@keyframes markFloat {
    from { transform: translate(-52%, -56%) scale(1); }
    to   { transform: translate(-48%, -52%) scale(1.08); }
}

@keyframes blobDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-6vmax, 8vmax) scale(1.15); }
}

@keyframes auroraSpin {
    to { transform: rotate(360deg); }
}

@keyframes particleFloat1 {
    from { transform: translate(0, 0) scale(1); opacity: .7; }
    to   { transform: translate(5vmax, -7vmax) scale(1.3); opacity: 1; }
}
@keyframes particleFloat2 {
    from { transform: translate(0, 0) scale(1.1); opacity: .8; }
    to   { transform: translate(-4vmax, 6vmax) scale(.85); opacity: .5; }
}
@keyframes particleFloat3 {
    from { transform: translate(0, 0) scale(.9); opacity: .6; }
    to   { transform: translate(3vmax, -4vmax) scale(1.2); opacity: .95; }
}

/* ---------------- DESIGN THEMES ---------------- */

.quote-short.theme-wine { /* default variables above */ }

.quote-short.theme-midnight {
    --bg: #0f1526;
    --bg-2: #1a2340;
    --ink: #eef1fa;
    --ink-soft: #9aa5c4;
    --accent: #8ab4f8;
    --accent-2: #f4c87f;
    --topbar-bg: rgba(15, 21, 38, .78);
    --topbar-border: rgba(138, 180, 248, .16);
    --shadow-color: rgba(0, 0, 0, .35);
    --mark-opacity: .07;
}

.quote-short.theme-forest {
    --bg: #10241b;
    --bg-2: #1b3a2a;
    --ink: #ecf4ee;
    --ink-soft: #9db8a7;
    --accent: #d9a441;
    --accent-2: #7fc8a9;
    --topbar-bg: rgba(16, 36, 27, .78);
    --topbar-border: rgba(127, 200, 169, .16);
    --shadow-color: rgba(0, 0, 0, .35);
    --mark-opacity: .07;
}

.quote-short.theme-noir {
    --bg: #101010;
    --bg-2: #262626;
    --ink: #f5f3ef;
    --ink-soft: #a8a29a;
    --accent: #e8e4dc;
    --accent-2: #c84040;
    --topbar-bg: rgba(16, 16, 16, .78);
    --topbar-border: rgba(255, 255, 255, .12);
    --shadow-color: rgba(0, 0, 0, .5);
    --mark-opacity: .06;
}

.quote-short.theme-sky {
    --bg: #eef6fc;
    --bg-2: #d7e9f7;
    --ink: #16324a;
    --ink-soft: #58748c;
    --accent: #1d6fb8;
    --accent-2: #f2b25c;
    --topbar-bg: rgba(238, 246, 252, .84);
    --topbar-border: rgba(29, 111, 184, .12);
    --shadow-color: rgba(29, 111, 184, .12);
    --mark-opacity: .05;
}

.quote-short.theme-sunset {
    --bg: #fff4ea;
    --bg-2: #ffd9c0;
    --ink: #4a1f14;
    --ink-soft: #8a5a48;
    --accent: #c2452d;
    --accent-2: #e8935a;
    --topbar-bg: rgba(255, 244, 234, .86);
    --topbar-border: rgba(194, 69, 45, .12);
    --shadow-color: rgba(194, 69, 45, .14);
    --mark-opacity: .06;
}

.quote-short.theme-royal {
    --bg: #1d1228;
    --bg-2: #342050;
    --ink: #f4effa;
    --ink-soft: #b0a1c9;
    --accent: #c9a0f7;
    --accent-2: #f4c87f;
    --topbar-bg: rgba(29, 18, 40, .78);
    --topbar-border: rgba(201, 160, 247, .18);
    --shadow-color: rgba(0, 0, 0, .4);
    --mark-opacity: .07;
}

.quote-short.theme-ocean {
    --bg: #06222b;
    --bg-2: #0e3a47;
    --ink: #e8f6f8;
    --ink-soft: #8fb8bf;
    --accent: #39c2d7;
    --accent-2: #f2d57e;
    --topbar-bg: rgba(6, 34, 43, .78);
    --topbar-border: rgba(57, 194, 215, .18);
    --shadow-color: rgba(0, 0, 0, .4);
    --mark-opacity: .07;
}

.quote-short.theme-rose {
    --bg: #fdf0f2;
    --bg-2: #fadde3;
    --ink: #571f2b;
    --ink-soft: #96606b;
    --accent: #c2446b;
    --accent-2: #f0a08b;
    --topbar-bg: rgba(253, 240, 242, .86);
    --topbar-border: rgba(194, 68, 107, .14);
    --shadow-color: rgba(194, 68, 107, .14);
    --mark-opacity: .06;
}

.quote-short.theme-candy {
    --bg: #fff0f7;
    --bg-2: #ffd9ec;
    --ink: #5c1f43;
    --ink-soft: #96607f;
    --accent: #d63384;
    --accent-2: #8a5cf6;
    --topbar-bg: rgba(255, 240, 247, .86);
    --topbar-border: rgba(214, 51, 132, .14);
    --shadow-color: rgba(214, 51, 132, .14);
    --mark-opacity: .05;
}

/* =========================================================
   VIDEO-LIKE MOTION
   Entrance animations replay every time a slide becomes
   active again (driven by .is-active from IntersectionObserver).
   ========================================================= */

.quote-short .quote-content {
    position: relative;
    z-index: 2;
    width: min(100%, 560px);
    text-align: center;
}

.quote-short.is-active .quote-content {
    animation: contentIn .7s cubic-bezier(.22,.8,.28,1);
}

@keyframes contentIn {
    from { opacity: 0; transform: scale(.96) translateY(14px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Staggered entrance for each inner element — replays every time the
   slide becomes active again. Content stays visible by default, so the
   quote never remains hidden if JS or the observer fails. */
.quote-short.is-active .quote-content > * {
    animation: riseIn .8s cubic-bezier(.22,.8,.28,1);
}

.quote-short.is-active .quote-content > *:nth-child(1) { animation-delay: .08s; }
.quote-short.is-active .quote-content > *:nth-child(2) { animation-delay: .22s; }
.quote-short.is-active .quote-content > *:nth-child(3) { animation-delay: .32s; }
.quote-short.is-active .quote-content > *:nth-child(4) { animation-delay: .40s; }

@keyframes riseIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Gentle "breathing" on the description — alive like video, not a static card. */
.quote-short.is-active .quote-description {
    animation: breathe 7s ease-in-out 1.2s infinite alternate;
}

@keyframes breathe {
    from { transform: translateY(0); }
    to   { transform: translateY(-6px); }
}

/* Paused state: freezes every animation AND the rAF-driven
   progress bar (handled in JS via the same .is-paused class). */
.quote-short.is-paused .quote-content,
.quote-short.is-paused .quote-content > *,
.quote-short.is-paused .quote-description,
.quote-short.is-paused::before,
.quote-short.is-paused::after,
.quote-short.is-paused .aurora,
.quote-short.is-paused .ambient i {
    animation-play-state: paused !important;
}

/* Slight dim while paused, like a video player overlay. */
.quote-short.is-paused .quote-content {
    filter: saturate(.75) brightness(.92);
    transition: filter .3s ease;
}
.quote-short .quote-content {
    transition: filter .3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .quote-short::before,
    .quote-short::after,
    .quote-short .aurora,
    .quote-short .ambient i,
    .quote-short.is-active .quote-content,
    .quote-short.is-active .quote-content > *,
    .quote-short.is-active .quote-description {
        animation: none !important;
    }
    .quote-short .quote-content,
    .quote-short .quote-content > * { opacity: 1; transform: none; }
}

/* ---------------- TOP BAR ---------------- */

.short-topbar {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    border-bottom: 1px solid var(--topbar-border);
    background: var(--topbar-bg);
    backdrop-filter: blur(12px);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.topbar-left {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.topbar-category {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.topbar-category i { font-size: 13px; }

.topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.quote-counter {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
}

.music-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--topbar-border);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg) 55%, transparent);
    color: var(--accent);
    font-size: 15px;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.music-toggle:hover {
    transform: scale(1.1);
    background: var(--accent);
    color: var(--bg);
}

/* ---------------- QUOTE CONTENT ---------------- */

.quote-title {
    margin: 0 0 18px;
    font-family: "Playfair Display", serif;
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}

.title-divider {
    width: 64px;
    height: 3px;
    margin: 0 auto 20px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.quote-description {
    color: var(--ink-soft);
    font-size: clamp(17px, 2.4vw, 21px);
    line-height: 1.65;
}

.quote-description a { color: var(--accent); }

.quote-description p { margin: 0 0 12px; }
.quote-description p:last-child { margin-bottom: 0; }

.quote-description ul,
.quote-description ol {
    display: inline-block;
    margin: 8px auto;
    padding-left: 1.35em;
    text-align: left;
}

.quote-description blockquote {
    margin: 12px 0;
    padding-left: 14px;
    border-left: 3px solid var(--accent-2);
    font-style: italic;
}

.quote-description h2,
.quote-description h3,
.quote-description h4 {
    margin: 8px 0 12px;
    font-family: "Playfair Display", serif;
    line-height: 1.25;
}

/* ---------------- VIDEO PROGRESS BAR ---------------- */

.short-progress {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.short-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 0 4px 4px 0;
}

/* ---------------- SIDE NAV (desktop) ---------------- */

.desktop-scroll-guide {
    position: relative;
    z-index: 5;
    flex: 0 0 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255,255,255,.78);
}

.reel-nav-arrow {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124,30,46,.16);
    border-radius: 50%;
    background: rgba(255,255,255,.62);
    color: var(--wine);
    font-size: 17px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.reel-nav-arrow:hover {
    background: var(--wine);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 5px 16px rgba(124,30,46,.2);
}

.desktop-scroll-line {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, rgba(124,30,46,.08), rgba(124,30,46,.35), rgba(124,30,46,.08));
}

/* ---------------- EMPTY STATE ---------------- */

.empty-feed {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #fff;
    text-align: center;
}

.empty-feed i { color: var(--gold); font-size: 42px; margin-bottom: 15px; }
.empty-feed h1 { font: 700 30px "Playfair Display", serif; }
.empty-feed p { color: rgba(255,255,255,.7); }
.empty-feed a { color: var(--gold); font-weight: 700; text-decoration: none; }

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 767px) {
    .shorts-layout {
        display: block;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0;
    }

    .desktop-scroll-guide {
        display: none !important;
    }

    html, body {
        width: 100%;
        height: 100%;
        min-height: 100%;
        overflow: hidden;
        background: #211719;
    }

    .shorts-feed {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: y mandatory;
        scroll-snap-stop: always;
        touch-action: pan-y;
    }

    .quote-short {
        width: 100%;
        min-height: 100%;
        height: 100%;
        padding: 88px 20px 38px;
    }

    .short-topbar {
        height: 54px;
        padding: 0 16px;
    }

    .quote-content {
        width: 100%;
        max-width: 100%;
        padding: 8px 2px 12px;
    }

    .quote-title {
        max-width: 100%;
        margin-bottom: 14px;
        font-size: clamp(21px, 6vw, 28px);
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .title-divider { margin-bottom: 16px; }

    .quote-description {
        max-width: 100%;
        font-size: clamp(16px, 4.5vw, 19px);
        line-height: 1.5;
        overflow-wrap: anywhere;
    }
}

@media (min-width: 768px) and (max-height: 650px) {
    .shorts-feed {
        height: 96vh;
        margin-top: 2vh;
    }

    .quote-short {
        padding-top: 66px;
        padding-bottom: 64px;
    }
}


/* ---------------- QUOTE CONTENT GLASS BACKGROUND ---------------- */

.quote-content {
    padding: 28px 30px;
    border-radius: 22px;

    /* Transparent black background */
    background: rgba(0, 0, 0, 0.25);

    /* Glass effect */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

/* Make title and description readable */
.quote-content .quote-title,
.quote-content .quote-description {
    color: #ffffff;
}

/* Description links */
.quote-content .quote-description a {
    color: #ffd58f;
}

/* Mobile */
@media (max-width: 767px) {
    .quote-content {
        padding: 22px 18px;
        border-radius: 18px;
    }
}



/* =========================================================
   CINEMATIC TITLE + DESCRIPTION REVEAL
   Starts when details.php adds .is-active to the visible slide.
   The effect replays when the user returns to a quote.
   ========================================================= */

/* Keep the whole content panel calm while its text is revealed. */
.quote-short.is-active .quote-content {
    animation: cinematicPanelIn 1.05s cubic-bezier(.2, .75, .25, 1) both;
}

/* Main title: soft-focus movie-style reveal. */
.quote-short.is-active .quote-content .quote-title {
    opacity: 0;
    animation: cinematicTitleIn 1.35s cubic-bezier(.16, 1, .3, 1) .12s both;
    will-change: transform, opacity, filter;
    text-shadow: 0 8px 28px rgba(0, 0, 0, .22);
}

/* Divider draws in after the title begins appearing. */
.quote-short.is-active .quote-content .title-divider {
    transform: scaleX(0);
    transform-origin: center;
    animation: cinematicDividerIn .85s cubic-bezier(.16, 1, .3, 1) .55s both;
}

/* Description follows the title, like the next shot in a film intro. */
.quote-short.is-active .quote-content .quote-description {
    opacity: 0;
    animation: cinematicDescriptionIn 1.15s cubic-bezier(.2, .75, .25, 1) .62s both;
    will-change: transform, opacity, filter;
}

/* Smooth reveal for the glass panel itself. */
@keyframes cinematicPanelIn {
    from {
        opacity: .65;
        transform: scale(.975);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes cinematicTitleIn {
    0% {
        opacity: 0;
        transform: translateY(34px) scale(.96);
        filter: blur(14px);
        letter-spacing: .12em;
    }
    65% {
        opacity: 1;
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
        letter-spacing: normal;
    }
}

@keyframes cinematicDividerIn {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes cinematicDescriptionIn {
    0% {
        opacity: 0;
        transform: translateY(24px);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Pause/resume remains compatible with the existing ShortsPlayer. */
.quote-short.is-paused .quote-content,
.quote-short.is-paused .quote-content .quote-title,
.quote-short.is-paused .quote-content .title-divider,
.quote-short.is-paused .quote-content .quote-description {
    animation-play-state: paused !important;
}

/* Respect visitors who request reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .quote-short.is-active .quote-content,
    .quote-short.is-active .quote-content .quote-title,
    .quote-short.is-active .quote-content .title-divider,
    .quote-short.is-active .quote-content .quote-description {
        animation: none !important;
        opacity: 1;
        filter: none;
        transform: none;
        letter-spacing: normal;
    }
}



/* =========================================================
   ROTATING TYPOGRAPHY + LIGHT TEXT PALETTE
   Eight styles repeat automatically across quote slides.
   No PHP/HTML/JavaScript changes are required.
   ========================================================= */

/* Style 1 — elegant editorial */
.shorts-feed > .quote-short:nth-child(8n + 1) .quote-content .quote-title {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    font-weight: 700;
    letter-spacing: -.025em;
    color: #fff0cf;
}
.shorts-feed > .quote-short:nth-child(8n + 1) .quote-content .quote-description {
    font-family: Georgia, "Times New Roman", serif;
    color: #fff9f1;
}

/* Style 2 — modern clean */
.shorts-feed > .quote-short:nth-child(8n + 2) .quote-content .quote-title {
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -.035em;
    color: #d6eefe;
}
.shorts-feed > .quote-short:nth-child(8n + 2) .quote-content .quote-description {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #f3faff;
}

/* Style 3 — classic cinematic */
.shorts-feed > .quote-short:nth-child(8n + 3) .quote-content .quote-title {
    font-family: "Garamond", "Times New Roman", serif;
    font-weight: 700;
    font-style: italic;
    letter-spacing: .005em;
    color: #f1e4ff;
}
.shorts-feed > .quote-short:nth-child(8n + 3) .quote-content .quote-description {
    font-family: "Palatino Linotype", Palatino, serif;
    color: #faf6ff;
}

/* Style 4 — bold contemporary */
.shorts-feed > .quote-short:nth-child(8n + 4) .quote-content .quote-title {
    font-family: Impact, "Arial Narrow", sans-serif;
    font-weight: 500;
    letter-spacing: .025em;
    color: #ffe1e5;
}
.shorts-feed > .quote-short:nth-child(8n + 4) .quote-content .quote-description {
    font-family: "Trebuchet MS", Arial, sans-serif;
    color: #fffafb;
}

/* Style 5 — soft and refined */
.shorts-feed > .quote-short:nth-child(8n + 5) .quote-content .quote-title {
    font-family: "Bookman Old Style", "Palatino Linotype", Georgia, serif;
    font-weight: 700;
    letter-spacing: .02em;
    color: #bdfcca;
}
.shorts-feed > .quote-short:nth-child(8n + 5) .quote-content .quote-description {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #f8fbff;
}

/* Style 6 — minimal premium */
.shorts-feed > .quote-short:nth-child(8n + 6) .quote-content .quote-title {
    font-family: "Arial", "Helvetica Neue", sans-serif;
    font-weight: 800;
    letter-spacing: .02em;
    color: #fff0df;
}
.shorts-feed > .quote-short:nth-child(8n + 6) .quote-content .quote-description {
    font-family: "Arial", "Helvetica Neue", sans-serif;
    font-weight: 400;
    color: #fffdfa;
}

/* Style 7 — expressive literary */
.shorts-feed > .quote-short:nth-child(8n + 7) .quote-content .quote-title {
    font-family: "Lucida Bright", Georgia, serif;
    font-weight: 700;
    font-style: italic;
    letter-spacing: .025em;
    color: #ced8fe;
}
.shorts-feed > .quote-short:nth-child(8n + 7) .quote-content .quote-description {
    font-family: "Lucida Sans", "Segoe UI", sans-serif;
    color: #fafbff;
}

/* Style 8 — warm contemporary */
.shorts-feed > .quote-short:nth-child(8n + 8) .quote-content .quote-title {
    font-family: "Century Gothic", "Trebuchet MS", sans-serif;
    font-weight: 700;
    letter-spacing: -.025em;
    color: #ffe8d8;
}
.shorts-feed > .quote-short:nth-child(8n + 8) .quote-content .quote-description {
    font-family: "Book Antiqua", Palatino, Georgia, serif;
    color: #fffcfa;
}

/* Keep formatted headings and links inside descriptions coordinated. */
.shorts-feed > .quote-short:nth-child(8n + 1) .quote-description h2,
.shorts-feed > .quote-short:nth-child(8n + 1) .quote-description h3,
.shorts-feed > .quote-short:nth-child(8n + 1) .quote-description h4 { color: #fff0cf; }

.shorts-feed > .quote-short:nth-child(8n + 2) .quote-description h2,
.shorts-feed > .quote-short:nth-child(8n + 2) .quote-description h3,
.shorts-feed > .quote-short:nth-child(8n + 2) .quote-description h4 { color: #e2f4ff; }

.shorts-feed > .quote-short:nth-child(8n + 3) .quote-description h2,
.shorts-feed > .quote-short:nth-child(8n + 3) .quote-description h3,
.shorts-feed > .quote-short:nth-child(8n + 3) .quote-description h4 { color: #f1e4ff; }

.shorts-feed > .quote-short:nth-child(8n + 4) .quote-description h2,
.shorts-feed > .quote-short:nth-child(8n + 4) .quote-description h3,
.shorts-feed > .quote-short:nth-child(8n + 4) .quote-description h4 { color: #ffe5e9; }

.shorts-feed > .quote-short:nth-child(8n + 5) .quote-description h2,
.shorts-feed > .quote-short:nth-child(8n + 5) .quote-description h3,
.shorts-feed > .quote-short:nth-child(8n + 5) .quote-description h4 { color: #47e867; }

.shorts-feed > .quote-short:nth-child(8n + 6) .quote-description h2,
.shorts-feed > .quote-short:nth-child(8n + 6) .quote-description h3,
.shorts-feed > .quote-short:nth-child(8n + 6) .quote-description h4 { color: #fff0df; }

.shorts-feed > .quote-short:nth-child(8n + 7) .quote-description h2,
.shorts-feed > .quote-short:nth-child(8n + 7) .quote-description h3,
.shorts-feed > .quote-short:nth-child(8n + 7) .quote-description h4 { color: #e5eaff; }

.shorts-feed > .quote-short:nth-child(8n + 8) .quote-description h2,
.shorts-feed > .quote-short:nth-child(8n + 8) .quote-description h3,
.shorts-feed > .quote-short:nth-child(8n + 8) .quote-description h4 { color: #ffe8d8; }

/* Soft glow improves readability over every animated background. */
.quote-content .quote-title {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.305), 0 1px 3px rgba(0, 0, 0, .24);
}
.quote-content .quote-description {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.237);
}



/* =========================================================
   CANVA-INSPIRED POSTER GRAPHICS
   Lightweight inline SVG ornamentation; no photos or image API.
   Graphics stay behind the quote and are decorative only.
   ========================================================= */

.quote-short .poster-graphics {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    color: var(--accent-2);
    opacity: .34;
}

.quote-short .poster-graphics svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: scale(1.015);
}

.quote-short.is-active .poster-graphics svg {
    animation: posterArtworkFloat 18s ease-in-out infinite alternate;
}

@keyframes posterArtworkFloat {
    from { transform: scale(1.015) translate3d(0, 0, 0); }
    to   { transform: scale(1.045) translate3d(0, -5px, 0); }
}

/* 1 — Editorial: delicate double frame and fine registration marks. */
.quote-short.poster-style-editorial .poster-graphics {
    opacity: .30;
    color: var(--accent-2);
}

/* 2 — Geometric: circles, diagonal lines and clean constructed forms. */
.quote-short.poster-style-geometric .poster-graphics {
    opacity: .27;
    color: var(--accent);
}

/* 3 — Abstract: oversized rings and flowing line art. */
.quote-short.poster-style-abstract .poster-graphics {
    opacity: .25;
    color: var(--accent-2);
}

/* 4 — Botanical: thin illustrated branches and leaves. */
.quote-short.poster-style-botanical .poster-graphics {
    opacity: .30;
    color: var(--accent-2);
}

/* 5 — Cinematic: concentric rings and horizon-line composition. */
.quote-short.poster-style-cinematic .poster-graphics {
    opacity: .24;
    color: var(--accent-2);
}

/* 6 — Bold: cropped blocks and graphic diagonal accents. */
.quote-short.poster-style-bold .poster-graphics {
    opacity: .22;
    color: var(--accent-2);
}

/* Keep the ornament layer subtle on pale backgrounds as well. */
.quote-short.theme-sky .poster-graphics,
.quote-short.theme-sunset .poster-graphics,
.quote-short.theme-rose .poster-graphics,
.quote-short.theme-candy .poster-graphics,
.quote-short.theme-wine .poster-graphics {
    opacity: .20;
}

/* The loop clone keeps the first quote's artwork; it should not animate
   more aggressively than the original slide. */
.quote-loop-clone .poster-graphics {
    pointer-events: none;
}

/* Pause and reduced-motion settings also apply to poster artwork. */
.quote-short.is-paused .poster-graphics svg {
    animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
    .quote-short.is-active .poster-graphics svg {
        animation: none !important;
        transform: none;
    }
}

/* On small screens, keep decorative details further in the background. */
@media (max-width: 767px) {
    .quote-short .poster-graphics {
        opacity: .18;
    }

    .quote-short.poster-style-editorial .poster-graphics,
    .quote-short.poster-style-botanical .poster-graphics {
        opacity: .22;
    }
}
