/* =========================================================
   REVIEWS PAGE
========================================================= */

.reviews-page {
    padding: 50px 0;
    background: #ffffff;
}

/* =========================================================
   PAGE HEADER
========================================================= */

.reviews-page-header {
    text-align: center;
    margin-bottom: clamp(30px, 4vw, 35px);
}

.reviews-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(7px, 1.2vw, 14px);
    margin-bottom: 15px;
}

.reviews-eyebrow span {
    display: block;
    width: clamp(24px, 4vw, 55px);
    height: 2px;
    background: var(--primary);
}

.reviews-eyebrow strong {
    color: var(--primary);
    font-size: clamp(10px, 1.2vw, 13px);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.reviews-page-header h1 {
    margin: 0;
    color: #171c3a;
    font-size: clamp(26px, 4.5vw, 44px);
    font-weight: 700;
    line-height: 1.2;
}

.reviews-page-header p {
    margin: 15px 0 0;
    color: #667085;
    font-size: clamp(14px, 1.6vw, 17px);
    line-height: 1.6;
}

/* =========================================================
   MAIN TWO COLUMN LAYOUT
========================================================= */

.reviews-layout {
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
    gap: 40px;
    align-items: stretch;
}

/* =========================================================
   LEFT - REVIEW FORM
========================================================= */

.review-form-section {
    min-width: 0;
}

.review-form-box {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 18px;
    padding: clamp(18px, 2.5vw, 30px);
    box-shadow: 0 10px 35px rgba(20, 30, 60, 0.07);
}

/* =========================================================
   FORM HEADER
========================================================= */

.review-form-header {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 1.5vw, 14px);
    margin-bottom: clamp(22px, 3vw, 28px);
}

.review-form-icon {
    width: clamp(43px, 5vw, 48px);
    height: clamp(43px, 5vw, 48px);
    min-width: clamp(43px, 5vw, 48px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 102, 178, 0.09);
    color: var(--primary);
    border-radius: 12px;
    font-size: clamp(18px, 2vw, 20px);
}

.review-form-header > div {
    flex: 1;
    min-width: 0;
}

.review-form-header h3 {
    margin: 0 0 6px;
    color: #171c3a;
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 700;
    line-height: 1.3;
}

.review-form-header p {
    margin: 0;
    color: #667085;
    font-size: clamp(12px, 1.3vw, 13px);
    line-height: 1.55;
}

/* =========================================================
   FORM FIELDS
========================================================= */

.review-field {
    width: 100%;
    margin-bottom: clamp(17px, 2vw, 20px);
}

.review-field label {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* =========================================================
   INPUT / SELECT / TEXTAREA (consolidated)
========================================================= */

.review-field :is(input[type="text"], input[type="email"], input[type="number"], input[type="tel"], select) {
    display: block;
    width: 100%;
    max-width: 100%;
    height: clamp(46px, 4vw, 48px);
    min-height: clamp(46px, 4vw, 48px);
    padding: 0 14px;
    border: 1px solid #d8dee8;
    border-radius: 9px;
    outline: none;
    background: #ffffff;
    color: #344054;
    font: inherit;
    font-size: 14px;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: clamp(125px, 15vw, 145px);
    padding: 12px 14px;
    border: 1px solid #d8dee8;
    border-radius: 9px;
    outline: none;
    background: #ffffff;
    color: #344054;
    font: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-field :is(input, textarea)::placeholder {
    color: #98a2b3;
    opacity: 1;
}

.review-field :is(input[type="text"], input[type="email"], input[type="number"], input[type="tel"], select, textarea):hover {
    border-color: #b8c2d1;
}

.review-field :is(input[type="text"], input[type="email"], input[type="number"], input[type="tel"], select, textarea):focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 102, 178, 0.10);
}

/* =========================================================
   SELECT DROPDOWN
========================================================= */

.review-select-wrapper {
    position: relative;
    width: 100%;
}

.review-select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 45px !important;
    cursor: pointer;
}

.review-select-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #667085;
    border-bottom: 2px solid #667085;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
    transition: border-color 0.2s ease;
}

.review-select-wrapper:focus-within::after {
    border-color: var(--primary);
}

/* =========================================================
   RATING
========================================================= */

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-height: 36px;
}

.star-rating input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.star-rating label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 2px;
    color: #d0d5dd;
    font-size: clamp(23px, 2.5vw, 24px);
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #fdb022;
}

.star-rating label:hover {
    transform: scale(1.08);
}

/* =========================================================
   REVIEW LABEL ROW
========================================================= */

.review-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-bottom: 8px;
}

.review-label-row label {
    width: auto;
    margin: 0;
}

.review-label-row > span {
    color: #98a2b3;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* =========================================================
   SUBMIT BUTTON
========================================================= */

.review-submit-btn {
    width: 100%;
    min-height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 3px;
    padding: 12px 18px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    outline: none;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.review-submit-btn i {
    font-size: 13px;
    transition: transform 0.2s ease;
}

.review-submit-btn:hover {
    opacity: 0.94;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(33, 102, 178, 0.20);
}

.review-submit-btn:hover i {
    transform: translateX(3px);
}

.review-submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* =========================================================
   RIGHT - REVIEWS CONTENT
========================================================= */

.reviews-content {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* height is set inline by JS (syncReviewsHeight) to match the form's height,
       which is what allows .reviews-scroll-area below to actually scroll */
}

/* =========================================================
   RIGHT HEADER
========================================================= */

.reviews-content-header {
    margin-bottom: 18px;
}

.reviews-small-title {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.reviews-content-header h2 {
    margin: 0 0 7px;
    color: #171c3a;
    font-size: clamp(26px, 2.8vw, 30px);
    font-weight: 700;
    line-height: 1.3;
}

.reviews-content-header p {
    margin: 0;
    color: #667085;
    font-size: 15px;
    line-height: 1.6;
}

/* =========================================================
   FILTER TABS
========================================================= */

.review-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(5px, 0.8vw, 8px);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8ecf2;
}

.review-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: clamp(35px, 3.5vw, 38px);
    padding: 7px clamp(9px, 1.2vw, 14px);
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #667085;
    font-size: clamp(12px, 1.3vw, 14px);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.review-filter i {
    font-size: 14px;
}

.review-filter:hover {
    background: rgba(33, 102, 178, 0.06);
    color: var(--primary);
    text-decoration: none;
}

.review-filter.active,
.review-filter.active:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* =========================================================
   SCROLLABLE REVIEWS AREA
========================================================= */

.reviews-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 12px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.reviews-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.reviews-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.reviews-scroll-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.reviews-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================================
   REVIEWS LIST
========================================================= */

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =========================================================
   REVIEW CARD
========================================================= */

.review-card {
    background: #ffffff;
    border: 1px solid #e8ecf2;
    border-radius: 14px;
    padding: clamp(16px, 1.8vw, 22px) clamp(16px, 2vw, 24px);
    box-shadow: 0 4px 18px rgba(20, 30, 60, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.review-card:hover {
    box-shadow: 0 8px 25px rgba(20, 30, 60, 0.08);
    transform: translateY(-1px);
}

/* =========================================================
   REVIEW STARS
========================================================= */

.review-card-top {
    margin-bottom: 12px;
}

.review-stars {
    display: flex;
    align-items: center;
    gap: 4px;
}

.review-stars i {
    font-size: 16px;
    line-height: 1;
}

.review-stars .filled {
    color: #fdb022;
}

.review-stars .empty {
    color: #d0d5dd;
}

/* =========================================================
   REVIEW BODY
========================================================= */

.review-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.review-quote {
    flex: 0 0 auto;
    color: var(--primary);
    font-size: 18px;
    line-height: 1.5;
    opacity: 0.75;
}

.review-text-wrapper {
    flex: 1;
    min-width: 0;
}

.review-text {
    display: -webkit-box;
    overflow: hidden;
    color: #475467;
    font-size: clamp(14px, 1.5vw, 15px);
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.review-text.expanded {
    display: block;
    overflow: visible;
}

/* =========================================================
   SEE MORE
========================================================= */

.see-more-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

.see-more-btn:hover {
    color: #174f8a;
    text-decoration: underline;
}

/* =========================================================
   REVIEW AUTHOR
========================================================= */

.review-author {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.2vw, 12px);
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #eef1f5;
}

.review-author-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(33, 102, 178, 0.10);
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
}

.review-author-info {
    min-width: 0;
}

.review-author-info h4 {
    margin: 0 0 4px;
    color: #172b4d;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.review-author-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(7px, 1vw, 10px);
    color: #667085;
    font-size: 13px;
}

.review-author-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.review-author-meta i {
    color: var(--primary);
    font-size: 12px;
}

.review-author-meta .review-type {
    color: var(--primary);
    font-weight: 600;
}

/* =========================================================
   EMPTY REVIEWS
========================================================= */

.reviews-empty {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
    border: 1px dashed #d8dee8;
    border-radius: 14px;
    background: #fafbfc;
    text-align: center;
}

.reviews-empty-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 50%;
    background: rgba(33, 102, 178, 0.08);
    color: var(--primary);
    font-size: 23px;
}

.reviews-empty h3 {
    margin: 0 0 7px;
    color: #344054;
    font-size: 18px;
    font-weight: 600;
}

.reviews-empty p {
    margin: 0;
    color: #98a2b3;
    font-size: 14px;
}

/* =========================================================
   PAGINATION
========================================================= */

.reviews-pagination {
    padding-top: 20px;
    padding-bottom: 5px;
    background: #ffffff;
}

.reviews-pagination .pagination {
    margin: 0;
    justify-content: center;
    gap: 5px;
}

.reviews-pagination .page-link {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e1e6ed;
    border-radius: 7px !important;
    background: #ffffff;
    color: #475467;
    font-size: 13px;
    box-shadow: none;
}

.reviews-pagination .page-link:hover {
    background: rgba(33, 102, 178, 0.06);
    border-color: var(--primary);
    color: var(--primary);
}

.reviews-pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* =========================================================
   FORM ERRORS
========================================================= */

.review-form-error {
    margin-top: 5px;
    color: #d92d20;
    font-size: 12px;
}

.review-field .is-invalid {
    border-color: #d92d20 !important;
}

.review-success-message {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #abefc6;
    border-radius: 8px;
    background: #ecfdf3;
    color: #067647;
    font-size: 14px;
}

/* =========================================================
   RESPONSIVE LAYOUT BREAKPOINTS
   (clamp() above absorbs most sizing; these handle structural changes)
========================================================= */

@media (max-width: 1199px) {

    .reviews-layout {
        grid-template-columns: 350px minmax(0, 1fr);
        gap: 35px;
    }

}

@media (max-width: 991px) {

    .reviews-layout {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .reviews-content {
        height: auto !important;
        min-height: 0;
    }

    .reviews-scroll-area {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

}

@media (max-width: 767px) {

    .reviews-page {
        padding: 40px 0;
    }

}

@media (max-width: 480px) {

    .reviews-page {
        padding: 30px 0;
    }

    .review-form-box {
        border-radius: 12px;
    }

    .review-card {
        border-radius: 12px;
    }

}