/* Rzym Opinie – frontend */
.rzym-opinie {
        --ro-gold: #c99a3b;
        --ro-gold-light: #e6c47a;
        --ro-terracotta: #b5543a;
        --ro-terracotta-dark: #8f3f2a;
        --ro-cream: #fbf6ec;
        --ro-cream-dark: #f1e6d0;
        --ro-text: #3d2b22;
        --ro-muted: #8a7566;
        --ro-radius: 16px;
        --ro-shadow: 0 6px 24px rgba(91, 52, 30, .10);
        --ro-gap: 24px;
        color: var(--ro-text);
        margin: 2em 0;
        box-sizing: border-box;
}
.rzym-opinie *, .rzym-opinie *::before, .rzym-opinie *::after { box-sizing: border-box; }

/* Układy */
.rzym-opinie__grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--ro-gap);
}
.rzym-opinie__list {
        display: flex;
        flex-direction: column;
        gap: 18px;
        max-width: 820px;
        margin: 0 auto;
}

/* Karta */
.rzym-opinie__card {
        position: relative;
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 26px 24px 20px;
        background: var(--ro-cream);
        border: 1px solid var(--ro-cream-dark);
        border-top: 4px solid var(--ro-gold);
        border-radius: var(--ro-radius);
        box-shadow: var(--ro-shadow);
        transition: transform .3s ease, box-shadow .3s ease;
        overflow: hidden;
}
.rzym-opinie__card::after {
        content: "\201D";
        position: absolute;
        right: 18px;
        bottom: -28px;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 140px;
        line-height: 1;
        color: var(--ro-gold);
        opacity: .12;
        pointer-events: none;
}
.rzym-opinie__card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(91, 52, 30, .16);
}

.rzym-opinie__header {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 14px;
}
.rzym-opinie__avatar {
        flex: 0 0 52px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-weight: 700;
        font-size: 18px;
        letter-spacing: .5px;
        box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ro-gold-light);
}
.rzym-opinie__meta {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
        flex: 1;
}
.rzym-opinie__author {
        font-weight: 700;
        font-size: 16px;
        line-height: 1.3;
        color: var(--ro-text);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
}
.rzym-opinie__stars { display: inline-flex; gap: 1px; font-size: 17px; line-height: 1; }
.rzym-opinie__star { color: #dccfb8; }
.rzym-opinie__star.is-filled { color: var(--ro-gold); text-shadow: 0 1px 0 rgba(143, 100, 20, .25); }

.rzym-opinie__source {
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: flex-start;
        color: #fff;
        font-family: Arial, Helvetica, sans-serif;
        font-weight: 700;
        font-size: 16px;
        line-height: 1;
}
.rzym-opinie__source--google { background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.rzym-opinie__source--facebook { background: #1877f2; font-size: 19px; }

.rzym-opinie__text {
        position: relative;
        flex: 1;
        font-size: 15px;
        line-height: 1.65;
        color: var(--ro-text);
}
.rzym-opinie__text p { margin: 0 0 .7em; }
.rzym-opinie__text p:last-child { margin-bottom: 0; }
.rzym-opinie__text.is-clamped {
        max-height: 10.5em;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
        mask-image: linear-gradient(to bottom, #000 65%, transparent);
}
.rzym-opinie__text.is-expanded { max-height: none; -webkit-mask-image: none; mask-image: none; }

.rzym-opinie__more {
        align-self: flex-start;
        margin-top: 8px;
        padding: 0;
        background: none;
        border: 0;
        color: var(--ro-terracotta);
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        text-decoration: underline;
        text-underline-offset: 3px;
}
.rzym-opinie__more:hover, .rzym-opinie__more:focus { color: var(--ro-terracotta-dark); background: none; }

.rzym-opinie__footer {
        margin-top: 16px;
        padding-top: 12px;
        border-top: 1px dashed var(--ro-cream-dark);
}
.rzym-opinie__date { font-size: 13px; color: var(--ro-muted); font-style: italic; }

/* Animacja fade-in */
/* Ukrywamy tylko gdy JS działa (klasa dodawana przez skrypt) – bez JS treść jest zawsze widoczna. */
.rzym-js .rzym-opinie__animate {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity .7s ease, transform .7s ease;
}
.rzym-js .rzym-opinie__animate.is-visible { opacity: 1; transform: none; }

/* Slider */
.rzym-opinie--slider { --ro-per-view: 3; position: relative; }
.rzym-opinie__viewport { overflow: hidden; padding: 8px 4px 14px; margin: 0 -4px; }
.rzym-opinie__track {
        display: flex;
        transition: transform .6s cubic-bezier(.25, .8, .25, 1);
        will-change: transform;
        touch-action: pan-y;
}
.rzym-opinie__slide {
        flex: 0 0 calc(100% / var(--ro-per-view));
        padding: 0 calc(var(--ro-gap) / 2);
}
.rzym-opinie__controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        margin-top: 10px;
}
.rzym-opinie__arrow {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: 2px solid var(--ro-gold);
        background: #fff;
        color: var(--ro-terracotta);
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 0 3px;
        transition: background .2s, color .2s;
}
.rzym-opinie__arrow:hover, .rzym-opinie__arrow:focus-visible { background: var(--ro-terracotta); border-color: var(--ro-terracotta); color: #fff; }
.rzym-opinie__arrow[disabled] { opacity: .35; cursor: default; }
.rzym-opinie__dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.rzym-opinie__dot {
        width: 10px;
        height: 10px;
        padding: 0;
        border-radius: 50%;
        border: 0;
        background: var(--ro-cream-dark);
        cursor: pointer;
        transition: background .2s, transform .2s;
}
.rzym-opinie__dot.is-active { background: var(--ro-gold); transform: scale(1.3); }

.rzym-opinie--empty p { text-align: center; color: var(--ro-muted); font-style: italic; }

/* Responsywność */
@media (max-width: 1024px) {
        .rzym-opinie__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .rzym-opinie--slider { --ro-per-view: 2; }
}
@media (max-width: 640px) {
        .rzym-opinie { --ro-gap: 16px; }
        .rzym-opinie__grid { grid-template-columns: 1fr; }
        .rzym-opinie--slider { --ro-per-view: 1; }
        .rzym-opinie__card { padding: 22px 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
        .rzym-opinie__animate, .rzym-opinie__track, .rzym-opinie__card { transition: none; }
        .rzym-opinie__animate { opacity: 1; transform: none; }
}
