/* ============================================
   RT App — Social Feed (Featured)
   Scoped to .rtf-* so it never touches the shared portfolio styles.
   Sizing is cqw against the 375px device (px / 375 * 100), same as the
   Overview Page. Source: P3 RT App Features › In-Situ Social Feed.
   ============================================ */

.rtf-scroll {
    --rtf-bg: #08080a;
    --rtf-dim: rgba(255, 255, 255, 0.55);
    --rtf-hair: rgba(255, 255, 255, 0.1);
    background: var(--rtf-bg);
    display: block;
    padding-bottom: 44cqw;
}

/* ---------- Header: logo, Featured / Following, avatar ---------- */
.rtf-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 26.4cqw;
    margin-bottom: -26.4cqw;
    pointer-events: none;
}

/* Dark ramp + a masked blur so cards dissolve under the status bar rather
   than hard-clipping against it. */
.rtf-header::before,
.rtf-header::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.rtf-header::before {
    background: linear-gradient(180deg,
        rgba(8, 8, 10, 0.97) 0%,
        rgba(8, 8, 10, 0.92) 50%,
        rgba(8, 8, 10, 0.62) 80%,
        rgba(8, 8, 10, 0) 100%);
}

.rtf-header::after {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mask-image: linear-gradient(180deg, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, black 40%, transparent 100%);
}

.rtf-header > * {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.rtf-header-row {
    display: flex;
    align-items: center;
    gap: 2.133cqw;
    padding: 4.4cqw 4.267cqw 0;
}

.rtf-logo {
    width: 8.533cqw;
    height: 8.533cqw;
    flex-shrink: 0;
    display: block;
    margin-right: 0;
}

.rtf-pill {
    height: 7.467cqw;
    padding: 0 2.933cqw;
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: 2.667cqw;
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 3.733cqw;
    letter-spacing: 0.267cqw;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.rtf-pill + .rtf-pill {
    margin-left: 0.8cqw;
}

.rtf-pill--active {
    background: rgba(214, 214, 217, 0.9);
    color: #17171a;
}

.rtf-avatar-btn {
    margin-left: auto;
    width: 8.533cqw;
    height: 8.533cqw;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.rtf-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Feed ---------- */
.rtf-feed {
    padding: 30.7cqw 4.267cqw 0;
    display: flex;
    flex-direction: column;
    gap: 4.267cqw;
}

.rtf-card {
    position: relative;
    border-radius: 7.467cqw;
    overflow: hidden;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0.05) 100%),
        #0d0d10;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    color: #fff;
}

/* Each card keeps a faint colour pulled from its artwork */
.rtf-card--photo {
    background:
        radial-gradient(120% 70% at 10% 55%, rgba(108, 132, 168, 0.2), transparent 70%),
        linear-gradient(170deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 60%),
        #0c0d11;
}

.rtf-card--editorial {
    background:
        radial-gradient(90% 60% at 100% 0%, rgba(168, 120, 138, 0.38), transparent 70%),
        linear-gradient(160deg, rgba(120, 100, 112, 0.42), rgba(54, 42, 50, 0.5) 60%, rgba(30, 24, 30, 0.7)),
        #14101a;
}

.rtf-card--review {
    background:
        radial-gradient(70% 38% at 100% 52%, rgba(206, 168, 58, 0.22), transparent 72%),
        radial-gradient(60% 35% at 0% 6%, rgba(170, 60, 40, 0.16), transparent 70%),
        linear-gradient(170deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 60%),
        #0e0c0c;
}

.rtf-card--list {
    background:
        radial-gradient(90% 60% at 20% 0%, rgba(166, 86, 196, 0.5), transparent 70%),
        linear-gradient(160deg, #4b2a6b 0%, #2a1840 55%, #170f26 100%);
}

.rtf-card-photo {
    display: block;
    width: 100%;
    height: 51.2cqw;
    object-fit: cover;
    border-radius: 7.467cqw;
}

.rtf-card-body {
    padding: 0 4.267cqw;
}

/* Pagination dots + age */
.rtf-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5cqw;
    padding: 0 4.267cqw;
    height: 3.2cqw;
}

.rtf-dots {
    display: flex;
    align-items: center;
    gap: 2.133cqw;
}

.rtf-dots i {
    display: block;
    width: 2.133cqw;
    height: 2.133cqw;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

.rtf-dots i:first-child {
    width: 5.867cqw;
    border-radius: 1.2cqw;
    background: rgba(255, 255, 255, 0.85);
}

.rtf-dots i:last-child {
    width: 1.6cqw;
    height: 1.6cqw;
    background: rgba(255, 255, 255, 0.35);
}

.rtf-age {
    font-family: var(--rt-font-book);
    font-weight: 400;
    font-size: 4.267cqw;
    color: var(--rtf-dim);
}

.rtf-caption {
    margin: 5cqw 4.267cqw 0;
    font-family: var(--rt-font-book);
    font-weight: 400;
    font-size: 4.267cqw;
    line-height: 6.4cqw;
}

/* Title chip under a post */
.rtf-title-chip {
    display: flex;
    align-items: center;
    height: 10.667cqw;
    margin: 4.267cqw 4.267cqw 0;
    padding: 0 5.2cqw;
    border-radius: 6cqw;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.07));
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 4.267cqw;
    letter-spacing: 0.267cqw;
}

/* Reactions + actions footer */
.rtf-foot {
    margin-top: 4.267cqw;
    border-top: 1px solid var(--rtf-hair);
    padding: 3.2cqw 4.267cqw 8.8cqw;
}

.rtf-reactions {
    display: flex;
    align-items: center;
    height: 5.333cqw;
    font-family: var(--rt-font-book);
    font-size: 4.267cqw;
    color: #fff;
}

.rtf-emoji {
    display: flex;
}

.rtf-emoji span {
    width: 5.333cqw;
    height: 5.333cqw;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 4.4cqw;
    line-height: 1;
    background: #2a2a2e;
    margin-left: -0.8cqw;
    box-shadow: 0 0 0 0.4cqw rgba(12, 12, 15, 0.9);
}

.rtf-emoji span:first-child {
    margin-left: 0;
}

.rtf-reactions-count {
    margin-left: 1.6cqw;
}

.rtf-actions {
    display: flex;
    align-items: center;
    margin-top: 2.667cqw;
    height: 6.4cqw;
}

.rtf-actions .rt-icon {
    width: 6.4cqw;
    height: 6.4cqw;
    font-size: 6.4cqw;
    display: block;
}

.rtf-act-like {
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.rtf-act-like.is-on {
    color: #ff4a3d;
    transform: scale(1.1);
}

.rtf-act-share {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.92);
}

.rtf-act-more {
    margin-left: 3.733cqw;
    color: rgba(255, 255, 255, 0.5);
}

.rtf-act-more .rt-icon {
    width: 6.4cqw;
}

/* Foot without its own bottom room (cards that end on the footer row) */
.rtf-foot--tight {
    padding-bottom: 4.267cqw;
}

/* ---------- Editorial card ---------- */
.rtf-editorial {
    padding: 4.267cqw 4.267cqw 5.333cqw;
}

.rtf-editorial h3 {
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 5.333cqw;
    line-height: 6.933cqw;
    letter-spacing: 0;
    margin: 0;
}

.rtf-byline {
    margin: 0.8cqw 0 0;
    font-family: var(--rt-font-book);
    font-size: 4.267cqw;
    line-height: 6.4cqw;
    color: var(--rtf-dim);
}

.rtf-editorial p.rtf-text {
    margin: 3.2cqw 0 0;
    font-family: var(--rt-font-book);
    font-size: 4.267cqw;
    line-height: 6.4cqw;
}

.rtf-editorial-img {
    display: block;
    width: 100%;
    height: 40.5cqw;
    object-fit: cover;
    border-radius: 5.333cqw;
    margin-top: 4.267cqw;
}

/* ---------- Review card ---------- */
.rtf-review-head {
    display: flex;
    gap: 3.2cqw;
    padding: 4.267cqw 4.267cqw 0;
}

.rtf-reviewer {
    position: relative;
    width: 11.733cqw;
    height: 11.733cqw;
    flex-shrink: 0;
}

.rtf-reviewer > img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.rtf-follow-badge {
    position: absolute;
    top: -0.8cqw;
    right: -0.8cqw;
    width: 4.267cqw;
    height: 4.267cqw;
    border-radius: 50%;
    background: #2f6bff;
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 0.5cqw #0e0c0c;
}

.rtf-follow-badge svg {
    width: 2.4cqw;
    height: 2.4cqw;
}

.rtf-reviewer-name {
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 4.267cqw;
    letter-spacing: 0.267cqw;
    line-height: 5.333cqw;
}

.rtf-approved {
    display: flex;
    align-items: center;
    gap: 1.067cqw;
    margin-top: 0.4cqw;
    font-family: var(--rt-font-medium);
    font-size: 3.733cqw;
    line-height: 4.8cqw;
    color: #f0643a;
}

.rtf-approved svg {
    width: 4.267cqw;
    height: 4.267cqw;
    flex-shrink: 0;
}

.rtf-outlet {
    margin-top: 0.4cqw;
    font-family: var(--rt-font-book);
    font-size: 3.733cqw;
    line-height: 4.8cqw;
    color: var(--rtf-dim);
}

.rtf-review-text {
    margin: 4.267cqw 4.267cqw 0;
    font-family: var(--rt-font-book);
    font-size: 4.267cqw;
    line-height: 6.4cqw;
}

.rtf-grade {
    display: flex;
    align-items: center;
    gap: 1.6cqw;
    margin: 3.2cqw 4.267cqw 0;
    font-family: var(--rt-font-medium);
    font-size: 4.267cqw;
    letter-spacing: 0.267cqw;
}

.rtf-grade img {
    width: 4.267cqw;
    height: 4.267cqw;
    display: block;
}

.rtf-title-card {
    display: flex;
    align-items: center;
    gap: 3.2cqw;
    margin: 4.267cqw 4.267cqw 0;
    padding: 2.133cqw;
    border-radius: 4.267cqw;
    background: rgba(255, 255, 255, 0.07);
}

.rtf-title-card > img {
    width: 10.667cqw;
    height: 15.2cqw;
    border-radius: 1.6cqw;
    object-fit: cover;
    display: block;
}

.rtf-title-card strong {
    display: block;
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 4.267cqw;
    letter-spacing: 0.267cqw;
    line-height: 5.6cqw;
}

.rtf-title-scores {
    display: flex;
    align-items: center;
    gap: 3.2cqw;
    margin-top: 1.6cqw;
    font-family: var(--rt-font-medium);
    font-size: 3.733cqw;
    letter-spacing: 0.267cqw;
    color: var(--rtf-dim);
}

.rtf-title-scores span {
    display: inline-flex;
    align-items: center;
    gap: 1.067cqw;
}

.rtf-title-scores img {
    width: 4.267cqw;
    height: 4.267cqw;
    display: block;
}

/* ---------- List card ---------- */
.rtf-list-head {
    padding: 4.267cqw 4.267cqw 0;
}

.rtf-list-head h3 {
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 5.333cqw;
    line-height: 6.933cqw;
    margin: 0;
}

.rtf-list-head p {
    margin: 0.8cqw 0 0;
    font-family: var(--rt-font-book);
    font-size: 4.267cqw;
    line-height: 6.4cqw;
    color: rgba(255, 255, 255, 0.6);
}

/* Stacked poster fan: first poster in front, the rest peek out to the right */
.rtf-stack {
    position: relative;
    height: 56cqw;
    margin: 4.267cqw 4.267cqw 0;
    border-radius: 5.333cqw;
    overflow: hidden;
}

.rtf-stack figure {
    position: absolute;
    top: 0;
    left: calc(var(--i) * 11.467cqw);
    width: 37.333cqw;
    height: 56cqw;
    margin: 0;
    border-radius: 5.333cqw;
    overflow: hidden;
    box-shadow: 1.067cqw 0 4cqw rgba(0, 0, 0, 0.4);
    z-index: calc(10 - var(--i));
}

.rtf-stack figure:nth-child(1) { --i: 0; }
.rtf-stack figure:nth-child(2) { --i: 1; }
.rtf-stack figure:nth-child(3) { --i: 2; }
.rtf-stack figure:nth-child(4) { --i: 3; }
.rtf-stack figure:nth-child(5) { --i: 4; }

.rtf-stack figure > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rtf-stack-scores {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 2.4cqw;
    padding: 8cqw 3.2cqw 2.667cqw;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
    font-family: var(--rt-font-medium);
    font-size: 3.733cqw;
    letter-spacing: 0.267cqw;
}

.rtf-stack-scores span {
    display: inline-flex;
    align-items: center;
    gap: 1.067cqw;
}

.rtf-stack-scores img {
    width: 4.267cqw;
    height: 4.267cqw;
    display: block;
}

/* View Full List / Save */
.rtf-list-actions {
    display: flex;
    gap: 2.133cqw;
    margin: 4.267cqw 4.267cqw 0;
}

.rtf-btn {
    display: inline-flex;
    align-items: center;
    height: 10.667cqw;
    border-radius: 6cqw;
    background: rgba(255, 255, 255, 0.12);
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 4.267cqw;
    letter-spacing: 0.267cqw;
    cursor: pointer;
    transition: background 0.15s ease;
}

.rtf-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.rtf-btn--wide {
    flex: 1;
    padding: 0 5.333cqw;
}

.rtf-btn--save {
    gap: 1.6cqw;
    padding: 0 3.733cqw 0 4.8cqw;
}

.rtf-btn--save .rt-icon {
    width: 5.333cqw;
    height: 5.333cqw;
    font-size: 5.333cqw;
    display: block;
}

.rtf-btn--save.is-on {
    background: rgba(255, 255, 255, 0.9);
    color: #111;
}

/* User-made list card */
.rtf-card--ugc {
    background:
        radial-gradient(90% 55% at 0% 0%, rgba(86, 58, 150, 0.5), transparent 70%),
        radial-gradient(70% 40% at 100% 30%, rgba(40, 60, 130, 0.25), transparent 75%),
        linear-gradient(170deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02) 60%),
        #0c0b12;
}

.rtf-ugc-head {
    align-items: center;
    padding-top: 5cqw;
}

.rtf-ugc-head .rtf-follow-badge {
    box-shadow: 0 0 0 0.5cqw #15112a;
}

.rtf-ugc-head .rtf-reviewer {
    width: 8.533cqw;
    height: 8.533cqw;
}

.rtf-list-head--ugc {
    padding-top: 5cqw;
}

/* ---------- Bottom tab bar (5 items) ---------- */
.rtf-nav {
    --rt-font-medium: 'Franklin Gothic Medium', 'Libre Franklin', Arial, sans-serif;
    padding: 2.4cqw 2.133cqw 6.4cqw;
}

.rtf-nav .rt-navitem {
    gap: 1.067cqw;
    color: rgba(255, 255, 255, 0.6);
}

.rtf-nav .rt-navitem .rt-icon {
    font-size: 6.4cqw;
    width: 6.4cqw;
    height: 6.4cqw;
    box-sizing: content-box;
    padding: 2.133cqw 3.2cqw;
    border-radius: 3.2cqw;
    display: block;
}

.rtf-nav .rt-navitem--active {
    color: #fff;
}

.rtf-nav .rt-navitem--active .rt-icon {
    background: rgba(255, 255, 255, 0.14);
    width: 6.4cqw;
    height: 6.4cqw;
    padding: 2.133cqw 3.2cqw;
    border-radius: 3.2cqw;
}

.rtf-nav .rt-navitem span {
    font-family: var(--rt-font-medium);
    font-size: 3.2cqw;
    font-weight: 500;
    letter-spacing: 0.267cqw;
}

.rtf-home-indicator {
    position: absolute;
    left: 50%;
    bottom: 1.6cqw;
    transform: translateX(-50%);
    width: 35.7cqw;
    height: 1.333cqw;
    border-radius: 1cqw;
    background: rgba(255, 255, 255, 0.92);
    z-index: 2;
}

/* Photo carousel: swipe/scroll horizontally, dots follow */
.rtf-photo-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: 7.467cqw;
}

.rtf-photo-track::-webkit-scrollbar {
    display: none;
}

.rtf-photo-track .rtf-card-photo {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.rtf-dots i {
    transition: width 0.2s ease, background 0.2s ease;
}

.rtf-dots i.is-on {
    width: 5.867cqw;
    border-radius: 1.2cqw;
    background: rgba(255, 255, 255, 0.85);
}

.rtf-dots i:first-child:not(.is-on) {
    width: 2.133cqw;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

/* Tap the stack to fan the posters out into a horizontal scroller */
.rtf-stack {
    cursor: pointer;
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.rtf-stack::-webkit-scrollbar {
    display: none;
}

.rtf-stack-track {
    position: relative;
    height: 100%;
    width: 100%;
}

.rtf-stack figure {
    transition: left 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rtf-stack-scores {
    transition: opacity 0.25s ease;
}

.rtf-stack:not(.is-open) figure:not(:first-child) .rtf-stack-scores {
    opacity: 0;
}

.rtf-stack.is-open {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    cursor: default;
}

.rtf-stack.is-open .rtf-stack-track {
    /* five 140px posters + four 8px gaps */
    width: calc(5 * 37.333cqw + 4 * 2.133cqw);
}

.rtf-stack.is-open figure {
    left: calc(var(--i) * (37.333cqw + 2.133cqw));
    scroll-snap-align: start;
    box-shadow: none;
}

.rtf-stack.is-open figure:nth-child(1) {
    cursor: pointer;
}
