/* ==========================================================================
   Client Reviews (homepage) — comm/reviews.inc.php
   ========================================================================== */
.tx-reviews {
    --tx-navy: #021a47;
    --tx-cyan: #04dbec;
    --tx-cyan-deep: #03b5c3;
    --tx-ink: #1b2436;
    --tx-muted: #66738a;
    --tx-line: rgba(2, 26, 71, .08);
    --tx-star: #fbbc04;
    position: relative;
    overflow: hidden;
    padding: 110px 0 100px;
    background:
        radial-gradient(900px 420px at 92% -10%, rgba(4, 219, 236, .12), transparent 60%),
        radial-gradient(700px 380px at -5% 110%, rgba(2, 26, 71, .07), transparent 60%),
        linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

/* ---------- Header ---------- */
.tx-reviews__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.tx-reviews__intro { max-width: 620px; }
.tx-reviews__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--tx-cyan-deep);
    margin-bottom: 14px;
}
.tx-reviews__eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--tx-cyan);
}
.tx-reviews__title {
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--tx-navy);
    margin: 0 0 14px;
}
.tx-reviews__lede {
    font-size: 17px;
    line-height: 1.6;
    color: var(--tx-muted);
    margin: 0;
}

/* Rating summary pill */
.tx-rating {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px 16px 18px;
    background: #fff;
    border: 1px solid var(--tx-line);
    border-radius: 18px;
    box-shadow: 0 10px 30px -12px rgba(2, 26, 71, .18);
    color: var(--tx-ink);
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
}
a.tx-rating:hover,
a.tx-rating:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -14px rgba(2, 26, 71, .28);
    color: var(--tx-ink);
    text-decoration: none;
}
.tx-rating .tx-g { width: 38px; height: 38px; flex: none; }
.tx-rating__body { display: flex; flex-direction: column; gap: 4px; }
.tx-rating__row { display: flex; align-items: center; gap: 10px; }
.tx-rating__score {
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
    color: var(--tx-navy);
    letter-spacing: -.02em;
}
.tx-rating__label { font-size: 15px; font-weight: 700; color: var(--tx-navy); }
.tx-rating__meta { font-size: 13px; color: var(--tx-muted); }

/* Stars */
.tx-stars { display: inline-flex; gap: 2px; line-height: 0; }
.tx-stars svg { width: 18px; height: 18px; fill: #d8dee8; }
.tx-stars .is-on svg { fill: var(--tx-star); }

/* ---------- Carousel ---------- */
.tx-reviews__track { margin: 0 -12px; }
.tx-reviews__track:not(.slick-initialized) {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}
.tx-reviews__track:not(.slick-initialized) .tx-reviews__slide {
    flex: 0 0 min(380px, 88%);
    scroll-snap-align: start;
}
/* Let slides run to the screen edge instead of clipping at the container; the section clips at the viewport. */
.tx-reviews__track .slick-list { padding: 14px 0 28px; overflow: visible; }
.tx-reviews__track .slick-slide .tx-review { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, opacity .5s ease; }
.tx-reviews__track .slick-slide:not(.slick-active) .tx-review { opacity: .45; }
.tx-reviews__track .slick-track { display: flex !important; }
.tx-reviews__track .slick-slide { height: auto; float: none; }
.tx-reviews__track .slick-slide > div { height: 100%; }
.tx-reviews__slide { height: 100%; padding: 0 12px; }

/* ---------- Card ---------- */
.tx-review {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    padding: 30px 30px 26px;
    background: #fff;
    border: 1px solid var(--tx-line);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(2, 26, 71, .04), 0 12px 32px -18px rgba(2, 26, 71, .22);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.tx-review::before {
    content: "\201C";
    position: absolute;
    top: 6px;
    right: 26px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 96px;
    line-height: 1;
    color: var(--tx-cyan);
    opacity: .16;
    pointer-events: none;
}
.tx-review:hover {
    transform: translateY(-4px);
    border-color: rgba(4, 219, 236, .35);
    box-shadow: 0 1px 2px rgba(2, 26, 71, .04), 0 22px 44px -20px rgba(2, 26, 71, .32);
}
.tx-review__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.tx-review__src { margin-left: auto; line-height: 0; opacity: .9; }
.tx-review__src .tx-g { width: 20px; height: 20px; }

.tx-review__quote { margin: 0; padding: 0; border: 0; flex: 1 1 auto; }
.tx-review__quote p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    font-style: normal;
    color: var(--tx-ink);
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tx-review__quote[lang="ko"] p { word-break: keep-all; }
.tx-review__quote br { display: none; }
.tx-review.is-clamped { cursor: pointer; }

.tx-review__more {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--tx-cyan-deep);
    cursor: pointer;
}
.tx-review__more span { transition: transform .2s ease; }
.tx-review.is-clamped:hover .tx-review__more { color: var(--tx-navy); }
.tx-review.is-clamped:hover .tx-review__more span { transform: translateX(3px); }

/* ---------- Full-review dialog ---------- */
html.tx-modal-open { overflow: hidden; }

.tx-modal {
    --tx-navy: #021a47;
    --tx-cyan: #04dbec;
    --tx-cyan-deep: #03b5c3;
    --tx-ink: #1b2436;
    --tx-muted: #66738a;
    --tx-line: rgba(2, 26, 71, .08);
    --tx-star: #fbbc04;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 24px;
    border: 0;
    background: transparent;
    overflow: hidden;
}
.tx-modal[open] { display: flex; align-items: center; justify-content: center; }
.tx-modal::backdrop {
    background: rgba(2, 18, 48, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: tx-fade-in .25s ease both;
}
.tx-modal.is-closing::backdrop { animation: tx-fade-out .2s ease both; }

.tx-modal__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 640px;
    max-height: min(82vh, 760px);
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 40px 80px -24px rgba(2, 18, 48, .45);
    animation: tx-pop-in .32s cubic-bezier(.22, .61, .36, 1) both;
    overflow: hidden;
}
.tx-modal.is-closing .tx-modal__panel { animation: tx-pop-out .2s ease both; }

.tx-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f4f8;
    color: var(--tx-navy);
    font-size: 14px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.tx-modal__close:hover { background: var(--tx-navy); color: #fff; }

.tx-modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.tx-modal .tx-review--full {
    height: auto;
    padding: 44px 44px 28px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    animation: tx-fade-in .25s ease both;
}
.tx-modal .tx-review--full::before { display: none; }
.tx-modal .tx-review--full .tx-review__top { margin-bottom: 22px; }
.tx-modal .tx-review--full .tx-review__quote p {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    font-size: 18px;
    line-height: 1.75;
}
.tx-modal .tx-review--full .tx-review__author { margin-top: 28px; }
.tx-modal .tx-review--full .tx-p { display: block; }
.tx-modal .tx-review--full .tx-p + .tx-p { margin-top: 14px; }
.tx-modal .tx-review--full .tx-review__quote br { display: inline; }

.tx-modal__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 44px 22px;
    border-top: 1px solid var(--tx-line);
    background: #fbfcfe;
}
.tx-modal__nav .tx-reviews__arrow { width: 44px; height: 44px; }
.tx-modal__count {
    font-size: 14px;
    font-weight: 600;
    color: var(--tx-muted);
    font-variant-numeric: tabular-nums;
}

@keyframes tx-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tx-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes tx-pop-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tx-pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes tx-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes tx-sheet-out { from { transform: none; } to { transform: translateY(100%); } }

/* Phones: bottom sheet */
@media (max-width: 575px) {
    .tx-modal { padding: 0; }
    .tx-modal[open] { align-items: flex-end; }
    .tx-modal__panel {
        max-width: none;
        max-height: 88vh;
        border-radius: 22px 22px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        animation-name: tx-sheet-in;
    }
    .tx-modal.is-closing .tx-modal__panel { animation-name: tx-sheet-out; }
    .tx-modal__panel::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 4px;
        background: rgba(2, 26, 71, .15);
    }
    .tx-modal .tx-review--full { padding: 36px 24px 22px; }
    .tx-modal .tx-review--full .tx-review__quote p { font-size: 16.5px; }
    .tx-modal__nav { padding: 14px 24px 18px; }
}

.tx-review__author {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--tx-line);
}
.tx-avatar {
    --tx-h: 190;
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    color: hsl(var(--tx-h), 55%, 28%);
    background: linear-gradient(135deg, hsl(var(--tx-h), 80%, 92%), hsl(var(--tx-h), 70%, 84%));
    box-shadow: inset 0 0 0 1px hsla(var(--tx-h), 50%, 40%, .12);
}
.tx-review__who { display: flex; flex-direction: column; min-width: 0; }
.tx-review__who strong { font-size: 16px; font-weight: 700; color: var(--tx-navy); line-height: 1.3; }
.tx-review__who small { font-size: 13px; color: var(--tx-muted); line-height: 1.4; }

/* ---------- Controls ---------- */
.tx-reviews__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.tx-reviews__nav { display: flex; align-items: center; gap: 18px; }
.tx-reviews__arrow {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(2, 26, 71, .14);
    background: #fff;
    color: var(--tx-navy);
    font-size: 16px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.tx-reviews__arrow:hover,
.tx-reviews__arrow:focus-visible {
    background: var(--tx-navy);
    border-color: var(--tx-navy);
    color: #fff;
}
.tx-reviews__arrow:active { transform: scale(.94); }

.tx-reviews__dots .slick-dots {
    position: static;
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: auto;
}
.tx-reviews__dots .slick-dots li { width: auto; height: auto; margin: 0; }
.tx-reviews__dots .slick-dots button {
    display: block;
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(2, 26, 71, .18);
    font-size: 0;
    color: transparent;
    cursor: pointer;
    transition: width .3s ease, background .3s ease;
}
.tx-reviews__dots .slick-dots button::before { display: none; }
.tx-reviews__dots .slick-dots .slick-active button { width: 26px; background: var(--tx-cyan); }

.tx-reviews__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--tx-navy);
    text-decoration: none;
    border-bottom: 2px solid var(--tx-cyan);
    padding-bottom: 3px;
}
.tx-reviews__cta span { transition: transform .2s ease; }
.tx-reviews__cta:hover { color: var(--tx-navy); text-decoration: none; }
.tx-reviews__cta:hover span { transform: translateX(4px); }

.tx-reviews a:focus-visible,
.tx-reviews button:focus-visible {
    outline: 3px solid rgba(4, 219, 236, .55);
    outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .tx-reviews { padding: 80px 0 72px; }
    .tx-reviews__head { margin-bottom: 36px; align-items: flex-start; }
}
@media (max-width: 575px) {
    .tx-reviews { padding: 64px 0 56px; }
    .tx-reviews__lede { font-size: 16px; }
    .tx-rating { width: 100%; }
    .tx-review { padding: 26px 22px 22px; }
    .tx-reviews__controls { justify-content: center; }
    .tx-reviews__cta { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
    .tx-review,
    .tx-reviews__track .slick-slide .tx-review,
    .tx-rating,
    .tx-reviews__arrow,
    .tx-reviews__cta span { transition: none; }
    .tx-review:hover,
    a.tx-rating:hover { transform: none; }
    .tx-modal::backdrop,
    .tx-modal__panel,
    .tx-modal .tx-review--full { animation: none !important; }
}
