/* =========================================================
   Review Carousel — Premium Minimalist Light
   v6.0.0
   Namespaced .rc-* to avoid theme conflicts.
   ========================================================= */

.rc-carousel,
.rc-carousel *,
.rc-carousel *::before,
.rc-carousel *::after {
    box-sizing: border-box;
}

.rc-carousel {
    --rc-bg: #ffffff;
    --rc-surface: #ffffff;
    --rc-surface-alt: #f6f6f4;
    --rc-border: #eceae4;
    --rc-text: #1b1b1a;
    --rc-text-soft: #55534e;
    --rc-muted: #8b8880;
    --rc-accent: #c25d3b;              /* тёплый терракотовый акцент */
    --rc-accent-ink: #ffffff;
    --rc-shadow-sm: 0 1px 2px rgba(24, 24, 20, .04), 0 2px 8px rgba(24, 24, 20, .04);
    --rc-shadow-md: 0 8px 24px rgba(24, 24, 20, .07), 0 2px 6px rgba(24, 24, 20, .04);
    --rc-shadow-lg: 0 22px 60px rgba(24, 24, 20, .18);
    --rc-radius: 18px;
    --rc-radius-sm: 12px;
    --rc-gap: 20px;
    --rc-ease: cubic-bezier(.22, .61, .36, 1);

    position: relative;
    width: 100%;
    margin: 40px 0;
    padding: 0 52px;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Manrope", "Inter", sans-serif;
    color: var(--rc-text);
    contain: layout paint;
}

.rc-viewport {
    overflow: hidden;
    border-radius: var(--rc-radius);
    /* небольшие боковые тени, чтобы соседняя карточка «выглядывала» приятно */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

.rc-track {
    display: flex;
    gap: var(--rc-gap);
    will-change: transform;
    transition: transform .55s var(--rc-ease);
    touch-action: pan-y;
}

.rc-track.is-dragging {
    transition: none;
}

.rc-item {
    flex: 0 0 auto;
    min-width: 0;
    padding: 6px 2px 12px;
}

/* --------- Card ---------- */
.rc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--rc-surface);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    overflow: hidden;
    cursor: pointer;
    outline: none;
    transition: transform .35s var(--rc-ease), box-shadow .35s var(--rc-ease), border-color .35s var(--rc-ease);
    box-shadow: var(--rc-shadow-sm);
}

.rc-card:hover,
.rc-card:focus-visible {
    transform: translateY(-4px);
    border-color: #e3e0d8;
    box-shadow: var(--rc-shadow-md);
}

.rc-card:focus-visible {
    outline: 2px solid var(--rc-accent);
    outline-offset: 3px;
}

.rc-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--rc-surface-alt);
    overflow: hidden;
}

.rc-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .8s var(--rc-ease);
}

.rc-card:hover .rc-media {
    transform: scale(1.04);
}

.rc-media--video iframe,
.rc-media--video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    pointer-events: none;
}

.rc-media--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cfccc3;
}

/* --------- Audio-only card (waveform placeholder) ---------- */
.rc-media--audio {
    position: relative;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.14) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 90%, rgba(0,0,0,.3) 0%, transparent 60%),
        linear-gradient(135deg, var(--rc-accent, #c25d3b) 0%, #22201d 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.rc-media--audio::before {
    /* мягкий шум/зернистость */
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 3px 3px;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}
.rc-audio-viz {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 22px;
    z-index: 2;
}
.rc-audio-bar {
    display: inline-block;
    width: 5px;
    background: rgba(255,255,255,.85);
    border-radius: 3px;
    height: 22%;
    transform-origin: center;
    animation: rc-audio-pulse 1.4s ease-in-out infinite;
    animation-delay: calc(var(--i) * 60ms);
}
.rc-audio-bar:nth-child(3n)  { animation-duration: 1.7s; }
.rc-audio-bar:nth-child(4n)  { animation-duration: 1.1s; }
.rc-audio-bar:nth-child(5n)  { animation-duration: 1.9s; }
@keyframes rc-audio-pulse {
    0%, 100% { height: 22%; opacity: .75; }
    35%      { height: 78%; opacity: 1;   }
    65%      { height: 45%; opacity: .9;  }
}
.rc-audio-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 8px;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: .72rem;
    letter-spacing: .04em;
    font-weight: 600;
    border-radius: 999px;
    z-index: 3;
}
.rc-media__play--audio {
    background: #fff;
    color: var(--rc-accent, #c25d3b);
    z-index: 3;
}

.rc-media__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(24,24,20,0) 40%, rgba(24,24,20,.35) 100%);
    z-index: 1;
    pointer-events: none;
}

.rc-media__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--rc-text);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .25);
    padding-left: 3px;
    pointer-events: none;
    transition: transform .3s var(--rc-ease), background .3s var(--rc-ease);
}

.rc-card:hover .rc-media__play {
    transform: translate(-50%, -50%) scale(1.08);
    background: #fff;
}

/* --------- Body ---------- */
.rc-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 20px 22px;
    flex: 1 1 auto;
}

.rc-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
}

.rc-stars {
    display: flex;
    gap: 2px;
    color: #d9d6cd;
    margin-top: -2px;
}
.rc-stars .rc-star { transition: color .2s ease; }
.rc-stars .rc-star.is-on { color: #f5a623; }

.rc-source-logo {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--rc-surface-alt);
    border: 1px solid var(--rc-border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-source-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.rc-name {
    font-size: .95rem;
    font-weight: 600;
    color: var(--rc-text);
    letter-spacing: -0.005em;
    line-height: 1.2;
    /* если очень длинное имя */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.rc-text {
    margin: 0;
    font-size: .95rem;
    line-height: 1.55;
    color: var(--rc-text-soft);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.005em;
    position: relative;
    padding-left: 12px;
}

.rc-text::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--rc-accent);
    border-radius: 2px;
    opacity: .5;
}

.rc-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--rc-text);
    background: transparent;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--rc-border);
    text-decoration: none !important;
    letter-spacing: 0.01em;
    transition: background .25s var(--rc-ease), color .25s var(--rc-ease), border-color .25s var(--rc-ease);
    margin-top: auto;
}

.rc-link:hover {
    background: var(--rc-text);
    border-color: var(--rc-text);
    color: #fff;
}

.rc-link svg {
    transition: transform .25s var(--rc-ease);
}

.rc-link:hover svg {
    transform: translate(2px, -2px);
}

/* ---- «Оставить отзыв» footer button внутри модалки отзыва ---- */
.rc-modal__footer {
    padding: 14px 30px 22px;
    border-top: 1px solid #f0efea;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(246,246,244,.65));
    text-align: center;
    position: sticky;
    bottom: 0;
    z-index: 2;
}
.rc-modal__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--rc-cta-btn, var(--rc-accent, #c25d3b));
    color: var(--rc-cta-btn-ink, var(--rc-accent-ink, #fff));
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .01em;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 6px 20px rgba(24,24,20,.14);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    min-width: 200px;
}
.rc-modal__cta-btn:hover,
.rc-modal__cta-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(24,24,20,.22);
    outline: none;
}
.rc-modal__cta-btn svg { transition: transform .2s ease; }
.rc-modal__cta-btn:hover svg { transform: translateX(3px); }

/* Скрываем футер, когда открыта именно CTA-модалка (внутри уже платформы) */
.rc-modal.is-cta-modal .rc-modal__footer { display: none; }

/* --------- Nav Buttons ---------- */
.rc-btn {
    position: absolute;
    top: calc(50% - 20px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: var(--rc-btn-radius, 50%);
    background: var(--rc-btn-bg, var(--rc-surface));
    border: 1px solid var(--rc-border);
    color: var(--rc-btn-ink, var(--rc-text));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 5;
    box-shadow: var(--rc-shadow-sm);
    transition: background .25s var(--rc-ease), transform .25s var(--rc-ease), box-shadow .25s var(--rc-ease), opacity .25s var(--rc-ease);
}

.rc-btn:hover:not(:disabled) {
    background: var(--rc-accent);
    color: var(--rc-accent-ink, #fff);
    border-color: var(--rc-accent);
    box-shadow: var(--rc-shadow-md);
}

.rc-btn:active {
    transform: translateY(-50%) scale(.94);
}

.rc-btn:focus-visible {
    outline: 2px solid var(--rc-accent);
    outline-offset: 3px;
}

.rc-btn:disabled {
    opacity: 0;
    pointer-events: none;
    cursor: default;
}

.rc-btn--prev { left: 0; }
.rc-btn--next { right: 0; }
.rc-btn[hidden] { display: none; }

/* --------- Dots ---------- */
.rc-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    min-height: 8px;
}

.rc-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #d9d6cd;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width .3s var(--rc-ease), background .3s var(--rc-ease);
}

.rc-dot:hover { background: #bfbdb3; }
.rc-dot.is-active {
    width: 22px;
    background: var(--rc-dot-active, var(--rc-text));
}

.rc-dot:focus-visible {
    outline: 2px solid var(--rc-accent);
    outline-offset: 3px;
}

/* --------- Empty ---------- */
.rc-empty {
    padding: 40px;
    text-align: center;
    color: var(--rc-muted);
    background: var(--rc-surface-alt);
    border-radius: var(--rc-radius);
    border: 1px dashed var(--rc-border);
    font-family: ui-sans-serif, system-ui, sans-serif;
}

/* =========================================================
   Modal
   ========================================================= */
.rc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Manrope", "Inter", sans-serif;
}

.rc-modal.is-open {
    display: flex;
}

.rc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(24, 24, 20, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: rc-fade .25s var(--rc-ease, cubic-bezier(.22,.61,.36,1));
}

@keyframes rc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rc-pop {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.rc-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 22px;
    max-width: 720px;
    width: 100%;
    max-height: min(90vh, 900px);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    animation: rc-pop .35s cubic-bezier(.22,.61,.36,1);
    display: flex;
    flex-direction: column;
    color: #1b1b1a;
}

.rc-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    border: 1px solid #ececec;
    color: #1b1b1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    transition: transform .2s ease, background .2s ease;
}

.rc-modal__close:hover { background: #fff; transform: rotate(90deg); }
.rc-modal__close:focus-visible { outline: 2px solid #c25d3b; outline-offset: 2px; }

/* Prev / Next inside modal — расположены ВЫШЕ окна (на overlay), всегда видны */
.rc-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    border: 1px solid #ececec;
    color: #1b1b1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.rc-modal__nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.rc-modal__nav:active { transform: translateY(-50%) scale(.94); }
.rc-modal__nav:focus-visible { outline: 2px solid #c25d3b; outline-offset: 3px; }
/* Прикрепляем к .rc-modal (не к dialog), чтобы всегда быть видимыми даже на маленьких окнах */
.rc-modal .rc-modal__nav--prev { left: max(20px, calc(50% - 440px)); }
.rc-modal .rc-modal__nav--next { right: max(20px, calc(50% - 440px)); }

.rc-modal-err {
    padding: 22px;
    background: #fdecea;
    color: #8f1e14;
    border-radius: 12px;
    font-size: .95rem;
    text-align: center;
}

.rc-modal__body {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #d0cdc4 transparent;
}

.rc-modal__body::-webkit-scrollbar { width: 8px; }
.rc-modal__body::-webkit-scrollbar-thumb { background: #d0cdc4; border-radius: 8px; }

.rc-modal__loader {
    padding: 90px 20px;
    text-align: center;
}

.rc-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid #eceae4;
    border-top-color: #1b1b1a;
    border-radius: 50%;
    animation: rc-spin .8s linear infinite;
}

@keyframes rc-spin { to { transform: rotate(360deg); } }

.rc-modal-media {
    width: 100%;
    background: linear-gradient(180deg, #f6f6f4 0%, #efede8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    /* Соотношение сторон + жёсткий потолок высоты */
    max-height: 420px;
    min-height: 240px;
}

.rc-modal-media--image {
    aspect-ratio: 4 / 3;
}

.rc-modal-media--video {
    aspect-ratio: 16 / 9;
    background: #0f0f0e;
}

.rc-modal-media img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: contain;
    display: block;
}

.rc-modal-media iframe,
.rc-modal-media video {
    width: 100%;
    height: 100%;
    max-height: 420px;
    border: 0;
    display: block;
    object-fit: contain;
    background: #000;
}

.rc-modal-content {
    padding: 26px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Двух-колоночный layout, когда в модалке есть скриншот отзыва */
.rc-modal-content.rc-modal-content--two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
    gap: 22px;
    align-items: start;
}
.rc-modal-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rc-modal-shot {
    position: sticky;
    top: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f6f6f4;
    border: 1px solid #eceae4;
}
.rc-modal-shot__link { display: block; line-height: 0; }
.rc-modal-shot img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: cover;
    transition: transform .35s var(--rc-ease);
}
.rc-modal-shot:hover img { transform: scale(1.02); }
.rc-modal-audio-inline { margin: 6px 0 4px; }
.rc-modal-audio-inline .rc-audio-wrap { gap: 10px; }
.rc-modal-audio-inline .rc-audio-canvas {
    height: 80px;
    background: linear-gradient(135deg, var(--rc-accent, #c25d3b) 0%, #22201d 100%);
    border-radius: 10px;
    padding: 6px;
}
.rc-modal-audio-inline audio.rc-audio-player { border-radius: 999px; }

@media (max-width: 768px) {
    .rc-modal-content.rc-modal-content--two {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .rc-modal-shot { order: 2; }
    .rc-modal-shot img { max-height: 220px; }
}

.rc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0efea;
}

.rc-modal-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1b1b1a;
}

.rc-modal-stars {
    display: flex;
    gap: 2px;
    color: #d9d6cd;
    margin: 4px 0 4px;
}
.rc-modal-stars svg { color: inherit; }
.rc-modal-stars svg.is-on { color: #f5a623; }

.rc-modal-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f6f6f4;
    border: 1px solid #eceae4;
    padding: 6px;
    object-fit: contain;
    flex-shrink: 0;
}

.rc-modal-text {
    font-size: 1.02rem;
    line-height: 1.65;
    color: #333330;
    margin: 0;
    padding-left: 14px;
    border-left: 3px solid #c25d3b;
    font-style: normal;
}

.rc-modal-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #f0efea;
    flex-wrap: wrap;
}

.rc-modal-source__meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rc-modal-source__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f6f6f4;
    border: 1px solid #eceae4;
    padding: 4px;
    flex-shrink: 0;
}

.rc-modal-source__logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.rc-modal-source__name {
    font-size: .95rem;
    color: #55534e;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------- Audio player in modal ---------- */
.rc-modal-media--audio {
    background:
        radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.14) 0%, transparent 60%),
        linear-gradient(135deg, var(--rc-accent, #c25d3b) 0%, #22201d 100%);
    padding: 24px 22px 18px;
    display: block;
    max-height: none;
}
.rc-audio-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}
.rc-audio-canvas {
    width: 100%;
    height: 120px;
    display: block;
    border-radius: 12px;
    background: rgba(0,0,0,.14);
}
audio.rc-audio-player {
    width: 100%;
    display: block;
    filter: drop-shadow(0 4px 14px rgba(0,0,0,.22));
    accent-color: #fff;
}

.rc-btn-primary,
.rc-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none !important;
    letter-spacing: .01em;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.rc-btn-primary {
    background: #1b1b1a;
    color: #fff;
}

.rc-btn-primary:hover { background: #c25d3b; }

.rc-btn-outline {
    background: transparent;
    color: #1b1b1a;
    border-color: #d9d6cd;
}

.rc-btn-outline:hover { border-color: #1b1b1a; }

.rc-modal-actions {
    display: flex;
    justify-content: center;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1200px) {
    .rc-carousel { padding: 0 44px; }
}

@media (max-width: 900px) {
    .rc-carousel {
        padding: 0 8px;
        margin: 28px 0;
    }
    .rc-btn {
        width: 38px;
        height: 38px;
    }
    .rc-btn--prev { left: -4px; }
    .rc-btn--next { right: -4px; }
    .rc-card__body { padding: 16px 16px 18px; gap: 10px; }
    .rc-source-logo { width: 36px; height: 36px; }
    .rc-modal-content { padding: 22px 22px 26px; }
    .rc-modal-name { font-size: 1.08rem; }
    .rc-modal-text { font-size: .98rem; }
}

@media (max-width: 600px) {
    .rc-modal__nav {
        width: 44px;
        height: 44px;
        background: rgba(255,255,255,.95);
        top: var(--rc-btn-mobile-top, 50%);
        bottom: auto;
        transform: translateY(-50%);
    }
    .rc-modal__nav:hover { transform: translateY(-50%); }
    .rc-modal__nav:active { transform: translateY(-50%) scale(.94); }
    .rc-modal .rc-modal__nav--prev { left: 16px; }
    .rc-modal .rc-modal__nav--next { right: 16px; }
    .rc-carousel {
        padding: 0 4px;
        margin: 24px 0;
        --rc-gap: 12px;
    }
    .rc-viewport {
        -webkit-mask-image: none;
                mask-image: none;
    }
    .rc-btn {
        top: var(--rc-btn-mobile-top, 50%);
        bottom: auto;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: var(--rc-btn-bg, #fff);
    }
    .rc-btn:active { transform: translateY(-50%) scale(.94); }
    .rc-btn--prev { left: 10px; }
    .rc-btn--next { right: 10px; }
    .rc-dots { margin-top: 16px; }
    .rc-card__body { padding: 14px 14px 16px; gap: 10px; }
    .rc-text { -webkit-line-clamp: 5; }
    .rc-modal { padding: 0; }
    .rc-modal__dialog {
        border-radius: 20px 20px 0 0;
        max-height: 94vh;
        align-self: flex-end;
        margin-top: auto;
    }
    .rc-modal { align-items: flex-end; }
    .rc-modal-content { padding: 20px 18px 22px; }
    .rc-modal-media {
        max-height: 300px;
        min-height: 200px;
    }
    .rc-modal-media img,
    .rc-modal-media iframe,
    .rc-modal-media video { max-height: 300px; }
    .rc-modal-header { padding-bottom: 10px; }
    .rc-modal-name { font-size: 1rem; }
    .rc-modal-source { flex-direction: column; align-items: stretch; text-align: center; }
    .rc-modal-source > * { justify-content: center; }
}

/* уважаем reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .rc-track,
    .rc-card,
    .rc-media,
    .rc-btn,
    .rc-modal__overlay,
    .rc-modal__dialog,
    .rc-modal__close,
    .rc-dot,
    .rc-link {
        transition: none !important;
        animation: none !important;
    }
}

/* =========================================================
   CTA BLOCK — «Оставить отзыв»
   ========================================================= */
.rc-carousel.has-cta-desktop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: stretch;
    padding-left: 0;
    padding-right: 0;
}
.rc-carousel.has-cta-desktop.has-cta-left {
    grid-template-columns: 300px minmax(0, 1fr);
    padding-left: 0;
    padding-right: 0;
}
.rc-carousel.has-cta-desktop.has-cta-left .rc-main { order: 2; }
.rc-carousel.has-cta-desktop.has-cta-left .rc-cta--sticky { order: 1; }

.rc-carousel.has-cta-desktop .rc-main {
    position: relative;
    min-width: 0;
    overflow: hidden;
}
.rc-carousel:not(.has-cta-desktop) .rc-main { position: relative; }

.rc-cta {
    display: flex;
    flex-direction: column;
    background: var(--rc-cta-bg, #1b1b1a);
    color: var(--rc-cta-ink, #fff);
    border-radius: var(--rc-cta-radius, var(--rc-radius));
    padding: 26px 24px;
    text-align: left;
    cursor: pointer;
    border: none;
    outline: none;
    box-shadow: 0 14px 40px rgba(24,24,20,.18);
    position: relative;
    overflow: hidden;
    transition: transform .35s var(--rc-ease), box-shadow .35s var(--rc-ease), border-radius .25s ease;
    align-self: stretch;
    min-height: 100%;
}
.rc-cta::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(closest-side, var(--rc-cta-btn, #c25d3b), transparent 70%);
    opacity: .35;
    pointer-events: none;
}
.rc-cta:hover,
.rc-cta:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(24,24,20,.28);
}
.rc-cta:focus-visible { outline: 2px solid var(--rc-accent); outline-offset: 3px; }

.rc-cta__inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    position: relative;
    z-index: 1;
}
.rc-cta__body { flex: 1 1 auto; }
.rc-cta__title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--rc-cta-ink, #fff);
}
.rc-cta__subtitle {
    margin: 0;
    font-size: .95rem;
    line-height: 1.5;
    color: var(--rc-cta-ink, #fff);
    opacity: .78;
}

.rc-cta__btn {
    background: var(--rc-cta-btn, #fff);
    color: var(--rc-cta-btn-ink, #1b1b1a);
}
.rc-cta:hover .rc-cta__btn {
    background: var(--rc-cta-btn-ink, #fff);
    color: var(--rc-cta-btn, #1b1b1a);
}

/* Наплывающие миниатюры */
.rc-cta__avatars {
    display: flex;
    padding-left: 8px;
}
.rc-cta__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--rc-cta-bg, #4a3626);
    border: 3px solid rgba(255,255,255,.12);
    margin-left: -12px;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
    display: inline-block;
    flex-shrink: 0;
}
.rc-cta__avatar:first-child { margin-left: 0; }
.rc-cta__avatar--plus {
    background-color: var(--rc-cta-btn, #c25d3b);
    color: var(--rc-cta-btn-ink, #fff);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background-image: none;
}

.rc-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: stretch;
    padding: 12px 20px;
    background: var(--rc-cta-btn, #fff);
    color: var(--rc-cta-btn-ink, #1b1b1a);
    border: none;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: .005em;
    transition: background .2s ease, transform .2s ease, color .2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.rc-cta__btn svg { transition: transform .2s ease; }
.rc-cta:hover .rc-cta__btn svg { transform: translateX(4px); }

/* Мобильный in-flow CTA — вставляется как карточка в трек */
.rc-cta.rc-cta--slide {
    height: 100%;
    min-height: 340px;
    align-self: stretch;
    border-radius: var(--rc-cta-radius, var(--rc-radius));
}

/* На мобильных sticky-версия скрыта, если mobile_every > 0 (карточки вставлены в трек) */
@media (max-width: 900px) {
    .rc-carousel.has-cta-desktop {
        display: block;
        grid-template-columns: 1fr;
        gap: 0;
        padding-right: 8px;
        padding-left: 0;
    }
    .rc-carousel.has-cta-desktop .rc-cta--sticky,
    .rc-carousel.has-cta .rc-cta--sticky {
        display: none;
    }
}
@media (min-width: 901px) {
    /* На десктопе in-flow CTA карточки не показываем */
    .rc-cta--slide-item { display: none !important; }
}

/* =========================================================
   CTA MODAL — платформы для оставления отзыва
   ========================================================= */
.rc-cta-modal-content {
    padding: 28px 30px 30px;
    color: #1b1b1a;
}
.rc-cta-modal-header {
    text-align: center;
    margin-bottom: 20px;
}
.rc-cta-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
    color: #1b1b1a;
}
.rc-cta-modal-subtitle {
    color: #55534e;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}
.rc-cta-modal-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
}
.rc-cta-modal-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fafaf7;
    border: 1px solid #eceae4;
    border-radius: 14px;
    color: #1b1b1a;
    text-decoration: none !important;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
    font-weight: 600;
    font-size: .98rem;
}
.rc-cta-modal-link:hover {
    background: #fff;
    border-color: #c25d3b;
    transform: translateX(4px);
}
.rc-cta-modal-link__logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    padding: 6px;
    background: #fff;
    border: 1px solid #ecebe4;
    flex-shrink: 0;
}
.rc-cta-modal-link__logo--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f4ee;
    color: #8b8880;
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
}
.rc-cta-modal-link__name { flex: 1 1 auto; }
.rc-cta-modal-link__arrow {
    color: #c25d3b;
    transition: transform .2s ease;
}
.rc-cta-modal-link:hover .rc-cta-modal-link__arrow { transform: translateX(4px); }

.rc-cta-modal-empty {
    text-align: center;
    color: #8b8880;
    padding: 20px 0;
    font-style: italic;
}
