/* ==========================================================================
   Google Reviews Widget — Modern 2026
   ========================================================================== */

/* ── Variables ──────────────────────────────────────────────────────────── */
.dc-rv {
    --rv-bg:         #f6f9f8;
    --rv-accent:     #3e9c95;
    --rv-accent-dark:#2e7f78;
    --rv-card-bg:    #ffffff;
    --rv-title:      #001830;
    --rv-text:       #546070;
    --rv-border:     rgba(62, 156, 149, 0.18);
    --rv-star:       #f0b350;
}

/* ── Section ────────────────────────────────────────────────────────────── */
.dc-rv {
    background: var(--rv-bg);
    padding: 64px 0;
    width: 100%;
    overflow: hidden;
}

/* ==========================================================================
   Google Rating Bar
   ========================================================================== */
.dc-rv__bar {
    max-width: 1200px;
    margin: 0 auto 36px;
    padding: 0 24px;
}

.dc-rv__bar-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Tag — uses shared hero-eyebrow from lc-cta.css */
.dc-rv__bar .hero-eyebrow {
    justify-content: center;
    margin-bottom: 18px;
}

/* ── Heading ────────────────────────────────────────────────────────────── */
.dc-rv__heading {
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 800;
    color: var(--rv-title);
    text-align: center;
    margin: 0 0 4px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

/* ── Bar Row (inline rating strip) ─────────────────────────────────────── */
.dc-rv__bar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--rv-card-bg);
    border: 1px solid var(--rv-border);
    border-radius: 60px;
    padding: 10px 28px;
}

/* ── Brand ──────────────────────────────────────────────────────────────── */
.dc-rv__bar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--rv-title);
    letter-spacing: -0.01em;
}

.dc-rv__bar-brand .dc-rv__g-icon {
    flex-shrink: 0;
}

/* Divider dot */
.dc-rv__bar-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--rv-border);
    flex-shrink: 0;
}

/* ── Rating ─────────────────────────────────────────────────────────────── */
.dc-rv__bar-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dc-rv__bar-score {
    font-size: 20px;
    font-weight: 800;
    color: var(--rv-title);
    letter-spacing: -0.02em;
}

.dc-rv__bar-rating .dc-rv__stars {
    display: flex;
    gap: 1px;
}

/* ── Count ──────────────────────────────────────────────────────────────── */
.dc-rv__bar-count {
    font-size: 14px;
    color: var(--rv-text);
    font-weight: 500;
}

/* ── Link ───────────────────────────────────────────────────────────────── */
.dc-rv__bar-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rv-accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.dc-rv__bar-link:hover {
    opacity: 0.75;
}

.dc-rv__bar-link svg {
    transition: transform 0.2s ease;
}

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

/* ==========================================================================
   Stage — Phone mockup + floating review cards
   ========================================================================== */
.dc-rv__stage {
    position: relative;
    max-width: 1200px;
    margin: 56px auto 0;
    padding: 80px 24px 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 560px;
}

/* Decorative Google G letters in the background */
.dc-rv__g {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dc-rv__g .dc-rv__g-icon,
.dc-rv__g svg,
.dc-rv__g img { width: 100%; height: 100%; }
.dc-rv__g--tl { top: 8%;  left: 4%;  width: 120px; height: 120px; opacity: 0.28; }
.dc-rv__g--bl { bottom: 14%; left: 16%; width: 80px;  height: 80px;  opacity: 0.18; }
.dc-rv__g--tr { top: 18%; right: 10%; width: 90px;  height: 90px;  opacity: 0.22; }
.dc-rv__g--br { bottom: 6%; right: 3%; width: 140px; height: 140px; opacity: 0.32; }

/* ── Phone mockup ── */
.dc-rv__phone {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
}
.dc-rv__phone-frame {
    position: relative;
    width: 260px;
    aspect-ratio: 9 / 19;
    background: #ffffff;
    border-radius: 42px;
    padding: 7px;
    box-shadow:
        0 24px 60px -16px rgba(0, 24, 48, 0.28),
        0 0 0 1px rgba(15, 26, 43, 0.08),
        inset 0 0 0 6px rgba(15, 26, 43, 0.04);
}
.dc-rv__phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 22px;
    background: #101828;
    border-radius: 999px;
    z-index: 2;
}
.dc-rv__phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(160deg, #e0f2f0 0%, #c8e6e3 50%, #f6cfd6 100%);
}
.dc-rv__phone-screen img,
.dc-rv__phone-screen video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dc-rv__phone-placeholder {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 25%, rgba(62, 156, 149, 0.5) 0%, transparent 55%),
        radial-gradient(circle at 70% 75%, rgba(246, 207, 214, 0.7) 0%, transparent 50%),
        linear-gradient(160deg, #cfe7e4 0%, #a0cec8 45%, #e9b8c2 100%);
}

/* ── Floating review cards ── */
.dc-rv__floater {
    position: absolute;
    z-index: 1;
    width: clamp(220px, 24vw, 280px);
    transition: transform 0.35s ease;
}
.dc-rv__floater--left-far {
    top: 20%;
    left: 2%;
    opacity: 0.55;
    transform: rotate(-2deg);
}
.dc-rv__floater--left-near {
    top: 48%;
    left: 8%;
    z-index: 3;
    transform: rotate(-1deg);
}
.dc-rv__floater--right-near {
    top: 46%;
    right: 8%;
    z-index: 3;
    transform: rotate(1.5deg);
}
.dc-rv__floater--right-far {
    top: 16%;
    right: 3%;
    opacity: 0.55;
    transform: rotate(2deg);
}
.dc-rv__floater:hover { transform: translateY(-3px) rotate(0); opacity: 1; }

/* ==========================================================================
   Review Card — Google style
   ========================================================================== */
.dc-rv__card {
    background: var(--rv-card-bg);
    border: 1px solid var(--rv-border);
    border-radius: 16px;
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 18px 40px -18px rgba(0, 24, 48, 0.22);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.dc-rv__card:hover {
    border-color: color-mix(in srgb, var(--rv-accent) 28%, transparent);
    box-shadow:
        0 26px 50px -18px rgba(0, 24, 48, 0.3),
        0 0 0 1px color-mix(in srgb, var(--rv-accent) 8%, transparent);
}

/* A small date chip next to the stars row */
.dc-rv__card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dc-rv__card-head .dc-rv__stars { flex: 0 0 auto; }
.dc-rv__card-head .dc-rv__card-date-inline {
    font-size: 11.5px;
    color: var(--rv-text);
    font-weight: 500;
}

/* ── Stars ──────────────────────────────────────────────────────────────── */
.dc-rv__stars {
    display: flex;
    gap: 1px;
    line-height: 0;
}

/* ── Card Text ─────────────────────────────────────────────────────────── */
.dc-rv__card-text {
    color: var(--rv-title);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Card Footer ───────────────────────────────────────────────────────── */
.dc-rv__card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--rv-border) 50%, transparent);
}

/* ── Avatar ─────────────────────────────────────────────────────────────── */
.dc-rv__card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Letter initial placeholder */
.dc-rv__card-avatar--initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--rv-accent) 10%, transparent);
    color: var(--rv-accent);
    font-size: 13px;
    font-weight: 700;
}

/* ── Meta ───────────────────────────────────────────────────────────────── */
.dc-rv__card-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.dc-rv__card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--rv-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dc-rv__card-date {
    font-size: 11px;
    color: var(--rv-text);
    font-weight: 500;
}

/* ── Google G on card ──────────────────────────────────────────────────── */
.dc-rv__card-footer .dc-rv__g-icon {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.dc-rv__card:hover .dc-rv__card-footer .dc-rv__g-icon {
    opacity: 0.8;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .dc-rv__stage { min-height: 480px; padding: 60px 20px 70px; }
    .dc-rv__phone-frame { width: 230px; }
    .dc-rv__floater { width: clamp(200px, 28vw, 260px); }
    .dc-rv__floater--left-far,
    .dc-rv__floater--right-far { display: none; }
}

@media (max-width: 768px) {
    .dc-rv { padding: 48px 0; }
    .dc-rv__bar { margin-bottom: 28px; }
    .dc-rv__bar-row { gap: 10px; padding: 8px 20px; }
    .dc-rv__bar-brand span { font-size: 14px; }
    .dc-rv__bar-score { font-size: 18px; }
    .dc-rv__bar-link { display: none; }

    .dc-rv__stage { flex-direction: column; min-height: 0; padding: 40px 18px 56px; gap: 24px; }
    .dc-rv__phone-frame { width: 220px; }
    .dc-rv__floater {
        position: relative;
        top: auto; left: auto; right: auto;
        width: 100%;
        max-width: 360px;
        transform: none;
        opacity: 1;
    }
    .dc-rv__g--tl, .dc-rv__g--bl, .dc-rv__g--tr, .dc-rv__g--br { opacity: 0.12; }
    .dc-rv__card { padding: 16px; }
    .dc-rv__card-text { font-size: 13px; }
    .dc-rv__card-avatar { width: 28px; height: 28px; }
}

@media (max-width: 480px) {
    .dc-rv { padding: 40px 0; }
    .dc-rv__heading { font-size: 22px; }
    .dc-rv__bar-row { padding: 8px 16px; gap: 8px; }
    .dc-rv__bar-divider { display: none; }
    .dc-rv__bar-count { display: none; }
    .dc-rv__phone-frame { width: 200px; border-radius: 36px; }
    .dc-rv__phone-notch { width: 90px; height: 18px; }
    .dc-rv__card { padding: 14px; gap: 10px; }
    .dc-rv__card-text { font-size: 13px; -webkit-line-clamp: 3; }
    .dc-rv__card-name { font-size: 12px; }
    .dc-rv__card-date { font-size: 10px; }
    .dc-rv__card-avatar { width: 26px; height: 26px; }
    .dc-rv__card-footer .dc-rv__g-icon { width: 14px; height: 14px; }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .dc-rv__card,
    .dc-rv__floater,
    .dc-rv__bar-link svg,
    .dc-rv__card-footer .dc-rv__g-icon { transition: none !important; }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
    .dc-rv {
        display: none;
    }
}
