.gd-reviews {
    --gd-accent: #f1aa21;
    --gd-accent-hover: #ffc04d;
    --gd-yellow: #ffbf00;
    --gd-text: inherit;

    /* Fallbacks for browsers without color-mix(). Modern browsers override
       these values with the adaptive currentColor-based palette below. */
    --gd-muted: rgba(127, 127, 127, .82);
    --gd-line: rgba(127, 127, 127, .24);
    --gd-card-bg: rgba(127, 127, 127, .06);
    --gd-secondary-hover: rgba(127, 127, 127, .10);
    --gd-card-text: currentColor;
    --gd-focus: #f4bd58;

    --gd-muted: color-mix(in srgb, currentColor 62%, transparent);
    --gd-line: color-mix(in srgb, currentColor 13%, transparent);
    --gd-card-bg: color-mix(in srgb, currentColor 4.5%, transparent);
    --gd-secondary-hover: color-mix(in srgb, currentColor 8%, transparent);
    --gd-card-text: color-mix(in srgb, currentColor 88%, transparent);
    --gd-focus: color-mix(in srgb, var(--gd-accent) 70%, white);

    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    margin: clamp(28px, 5vw, 72px) auto;
    padding: 0 18px;
    color: var(--gd-text);
}

.gd-reviews *,
.gd-reviews *::before,
.gd-reviews *::after {
    box-sizing: border-box;
}

/* Explicit themes are useful when a page builder/template does not inherit
   text colour from the surrounding light/dark section. */
.gd-reviews--dark {
    --gd-text: #f5f2ec;
    --gd-muted: rgba(245, 242, 236, .64);
    --gd-line: rgba(255, 255, 255, .14);
    --gd-card-bg: rgba(255, 255, 255, .05);
    --gd-secondary-hover: rgba(255, 255, 255, .09);
    --gd-card-text: rgba(245, 242, 236, .88);
}

.gd-reviews--light {
    --gd-text: #201d19;
    --gd-muted: #6f6961;
    --gd-line: rgba(32, 29, 25, .13);
    --gd-card-bg: rgba(32, 29, 25, .035);
    --gd-secondary-hover: rgba(32, 29, 25, .07);
    --gd-card-text: #3c3731;
}

.gd-reviews__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

.gd-reviews__heading-copy { min-width: 0; }

.gd-reviews__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--gd-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gd-reviews h2 {
    margin: 0;
    color: var(--gd-text);
    font-size: clamp(27px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.gd-reviews__intro {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--gd-muted);
    font-size: 15px;
    line-height: 1.6;
}

.gd-reviews__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.gd-reviews__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid var(--gd-line);
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.gd-reviews__action:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.gd-reviews__action:focus-visible,
.gd-review-card__original:focus-visible {
    outline: 3px solid var(--gd-focus);
    outline-offset: 3px;
}

.gd-reviews__action--secondary {
    color: var(--gd-text);
    background: transparent;
}

.gd-reviews__action--secondary:hover {
    color: var(--gd-text);
    background: var(--gd-secondary-hover);
}

.gd-reviews__action--primary {
    color: #16120b;
    background: var(--gd-accent);
    border-color: var(--gd-accent);
}

.gd-reviews__action--primary:hover {
    color: #16120b;
    background: var(--gd-accent-hover);
    border-color: var(--gd-accent-hover);
}

.gd-reviews__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.gd-review-card {
    display: flex;
    min-width: 0;
    min-height: 260px;
    flex-direction: column;
    padding: 22px;
    color: var(--gd-text);
    border: 1px solid var(--gd-line);
    border-radius: 18px;
    background: var(--gd-card-bg);
}

.gd-review-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.gd-review-card__author {
    min-width: 0;
    color: var(--gd-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.gd-review-card__rating {
    flex: 0 0 auto;
    white-space: nowrap;
    color: var(--gd-yellow);
    font-size: 14px;
    letter-spacing: 1px;
}

.gd-review-card__text {
    margin-top: 18px;
    color: var(--gd-card-text);
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.gd-review-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    margin-top: auto;
    padding-top: 22px;
    color: var(--gd-muted);
    font-size: 12px;
}

.gd-review-card__original {
    margin-left: auto;
    color: var(--gd-muted);
    text-align: right;
    text-decoration: none;
}

.gd-review-card__original:hover {
    color: var(--gd-text);
    text-decoration: underline;
}

.gd-reviews__empty {
    padding: 24px;
    color: var(--gd-muted);
    border: 1px dashed var(--gd-line);
    border-radius: 16px;
}

@media (max-width: 980px) {
    .gd-reviews__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .gd-reviews { padding: 0 14px; }
    .gd-reviews__head { align-items: stretch; flex-direction: column; gap: 18px; }
    .gd-reviews__actions { width: 100%; justify-content: stretch; }
    .gd-reviews__action { flex: 1 1 0; }
    .gd-reviews__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .gd-review-card { min-height: 0; padding: 18px; }
    .gd-review-card__top { gap: 10px; }
    .gd-review-card__foot { align-items: center; }
    .gd-review-card__original { max-width: 60%; }
}

@media (max-width: 420px) {
    .gd-reviews__actions { flex-direction: column; }
    .gd-reviews__action { width: 100%; flex-basis: auto; }
    .gd-review-card__top { flex-direction: column; }
    .gd-review-card__foot { align-items: flex-start; flex-direction: column; }
    .gd-review-card__original { max-width: none; margin-left: 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .gd-reviews__action { transition: none; }
}
