/**
 * Case Review Display — frontend (aligned with design: 40/60, reviews, bottom-right CTA)
 */

.case-review-display,
.case-review-display *,
.case-review-display *::before,
.case-review-display *::after {
    box-sizing: border-box;
}

.case-review-display {
    --crd-orange: #e67e22;
    --crd-orange-bar: #e67e22;
    --crd-orange-muted: #b35c18;
    --crd-badge: #c0392b;
    --crd-border: #d0d0d0;
    --crd-border-soft: #e5e5e5;
    --crd-block-bg: #f5f5f5;
    --crd-text: #111111;
    --crd-text-body: #333333;
    --crd-radius-card: 14px;
    --crd-radius-block: 10px;
    --crd-radius-img: 12px;
    --crd-pad-card: clamp(1.5rem, 3.5vw, 2.25rem);
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
    line-height: 1.65;
    color: var(--crd-text);
}

.case-review-display--empty {
    text-align: center;
    color: #666;
    padding: 2rem 1.25rem;
    font-size: 0.95rem;
}

:where(.case-review-display) .case-review-display__intro {
    max-width: 980px;
    margin: 0 auto 2.25rem;
    padding: 0.25rem 0;
    text-align: center;
    color: #222;
    line-height: 1.9;
    font-size: 22px;
    letter-spacing: 0.02em;
}

:where(.case-review-display) .case-review-display__intro p {
    margin: 0.35rem 0;
}

:where(.case-review-display) .case-review-display__intro p:first-child {
    margin-top: 0;
}

:where(.case-review-display) .case-review-display__intro p:last-child {
    margin-bottom: 0;
}

/* ----- Card ----- */
:where(.case-review-display) .case-review-card {
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    padding: var(--crd-pad-card);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
    color: inherit;
}

/* Header */
:where(.case-review-display) .case-review-card__header {
    display: block;
    margin: 0 0 1.15rem;
}

:where(.case-review-display) .case-review-card__title-group {
    flex: 1;
    min-width: 0;
}

:where(.case-review-display) .case-review-card__title {
    margin: 0 0 0.4rem;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--crd-text);
    letter-spacing: 0.02em;
}

:where(.case-review-display) .case-review-card__lead {
    margin: 0;
    font-size: 22px;
    line-height: normal;
}

:where(.case-review-display) .case-review-card__quote {
    color: var(--crd-orange);
    font-weight: 600;
}

:where(.case-review-display) .case-review-card__meta {
    color: var(--crd-orange-muted);
    font-weight: 500;
}

:where(.case-review-display) .case-review-card__badge {
    flex-shrink: 0;
    align-self: flex-start;
    background: var(--crd-badge);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.07em;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    line-height: 1;
    text-transform: uppercase;
}

:where(.case-review-display) .case-review-card__badge--overlay {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
}

/* Body: ~40% images | ~60% reviews (CTA footer is below this row) */
:where(.case-review-display) .case-review-card__body {
    display: grid;
    grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
    gap: clamp(1.15rem, 2.8vw, 1.85rem);
    /* start: both columns share the same top edge; avoid stray vertical centering */
    align-items: start;
    justify-items: stretch;
}

/* Left: stretch to row height when reviews column is taller */
:where(.case-review-display) .case-review-card__compare {
    width: 100%;
    min-width: 0;
    border-radius: var(--crd-radius-img);
    overflow: visible;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--crd-border-soft);
    display: flex;
    flex-direction: column;
    align-self: stretch;
    position: relative;
}

:where(.case-review-display) .case-review-card__compare-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: #fff;
    flex: 1;
    min-height: 300px;
    height: 100%;
    align-items: stretch;
}

:where(.case-review-display) .case-review-card__compare-cell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

:where(.case-review-display) .case-review-card__compare .case-review-card__figure {
    position: relative;
    margin: 0;
    flex: 1 1 auto;
    min-height: 160px;
    overflow: hidden;
    background: repeating-conic-gradient(#dedede 0% 25%, #efefef 0% 50%) 50% / 14px 14px;
}

:where(.case-review-display) .case-review-card__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    pointer-events: none;
}

:where(.case-review-display) .case-review-card__label-text {
    font-family: Georgia, "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.02em;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(255, 255, 255, 0.8);
}

:where(.case-review-display) .case-review-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

:where(.case-review-display) .case-review-card__placeholder {
    width: 100%;
    height: 100%;
    min-height: 120px;
}


/* Right column: reviews only — flush top (reset theme margins) */
:where(.case-review-display) .case-review-card__col-right {
    min-width: 0;
    margin: 0;
    padding: 0;
    align-self: start;
}

:where(.case-review-display) .case-review-card__col-right > :where(.case-review-card__header) {
    padding-top: 0.1rem;
}

/* Equal-height review rows: each block matches the tallest sibling */
:where(.case-review-display) .case-review-card__texts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    gap: 1.125rem;
    background: transparent;
    margin: 0;
    padding: 0;
    border-radius: 0;
    align-items: stretch;
}

/* Review cards: light gray; orange accent beside heading only (not full card height) */
:where(.case-review-display) .case-review-card__block {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--crd-block-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

:where(.case-review-display) .case-review-card__block-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 110px;
    padding: 10px 0px;
}

:where(.case-review-display) .case-review-card__block-heading {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 0.65rem;
}

:where(.case-review-display) .case-review-card__block-heading:last-child {
    margin-bottom: 0;
}

:where(.case-review-display) .case-review-card__block-accent {
    width: 4px;
    flex-shrink: 0;
    background: var(--crd-orange-bar);
    border-radius: 999px;
    align-self: stretch;
}

:where(.case-review-display) .case-review-card__block-title {
    display: block;
    flex: 1;
    min-width: 0;
    font-size:20px;
    font-weight: 700;
    margin: 0;
    color: var(--crd-text);
    line-height: 1.5;
}

:where(.case-review-display) .case-review-card__block-body {
    flex: 1;
    font-size: 18px;
    line-height: 1.75;
    color: var(--crd-text-body);
    font-weight: 400;
    padding-left: 10px;
}

:where(.case-review-display) .case-review-card__block-body p {
    margin: 0 0 0.45rem;
}

:where(.case-review-display) .case-review-card__block-body p:first-child {
    margin-top: 0;
}

:where(.case-review-display) .case-review-card__block-body p:last-child {
    margin-bottom: 0;
}

/* Footer CTA: full width below images + reviews, aligned right */
:where(.case-review-display) .case-review-card__footer {
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 0.35rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

:where(.case-review-display) .case-review-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    padding: 0.65rem 1.25rem;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none;
    color: #252525;
    background: #ffffff;
    border: 1px solid #777;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: none;
}

:where(.case-review-display) .case-review-card__btn:hover {
    background: #f5f5f5;
    border-color: #888888;
    color: #252525 !important;
}

:where(.case-review-display) .case-review-card__btn:focus-visible {
    outline: 2px solid var(--crd-orange);
    outline-offset: 2px;
}

:where(.case-review-display) .case-review-card__btn-arrow {
    color: #252525;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
}

:where(.case-review-display) .case-review-card__btn--muted {
    cursor: default;
    pointer-events: none;
}

:where(.case-review-display) .case-review-card__btn--muted:hover {
    background: #ffffff;
    border-color: #b0b0b0;
    color: #252525 !important;
}

/* ----- Responsive ----- */
@media (max-width: 720px) {
    :where(.case-review-display) .case-review-card__body {
        grid-template-columns: 1fr;
    }

    :where(.case-review-display) .case-review-card__compare-track {
        min-height: 240px;
        height: auto;
    }

    :where(.case-review-display) .case-review-card__footer {
        justify-content: center;
    }
    
    :where(.case-review-display) .case-review-card {
        padding: 10px;
    }

    .case-review-card__lead span {
        font-size: 14px;
    }

    .case-review-display__intro p {
        font-size: 18px !important;
    }

    .has-global-padding {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    :where(.case-review-display) .case-review-card__btn {
        transition: none;
    }
}
