
/* ==================================================
   KUSH ARCHITECTS - HOMEPAGE REVIEWS
   File: public/assets/css/homepage-reviews.css
   ================================================== */

/* Reviews section and background image */
.home-reviews {
    position: relative;
    isolation: isolate;
    width: 100%;
    padding: 72px 20px;
    box-sizing: border-box;
    color: #17243a;

    background-color: #f7f7f5;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.60),
            rgba(255, 255, 255, 0.60)
        ),
        url("../front/images/reviews-background.webp");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Main content container */
.home-reviews-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Section heading */
.home-reviews-heading {
    max-width: 720px;
    margin: 0 auto 32px;
    text-align: center;
}

.home-reviews-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #9b7b3e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.home-reviews-heading h2 {
    margin: 0 0 12px;
    color: #17243a;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.3;
    font-weight: 700;
}

.home-reviews-heading p {
    margin: 0;
    color: #555;
    font-size: 16px;
    line-height: 1.7;
}

/* Slider viewport */
.home-reviews-viewport {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Reviews track - JavaScript controls movement */
.home-reviews-grid {
    display: flex;
    align-items: stretch;
    gap: 22px;
    width: 100%;
    transition: transform 0.45s ease;
    will-change: transform;
    box-sizing: border-box;
}

/* Individual review card */
.home-review-card {
    display: flex;
    flex: 0 0 calc((100% - 44px) / 3);
    flex-direction: column;
    min-width: 0;
    padding: 26px;
    box-sizing: border-box;

    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(232, 232, 228, 0.95);
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
}

/* Reviewer photo and details */
.home-review-top {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 16px;
}

.home-review-avatar {
    display: flex;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 50%;
    background: #ece9e2;
    color: #39352f;
    font-size: 20px;
    font-weight: 700;
}

.home-review-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.home-review-name {
    margin: 0 0 4px;
    color: #17243a;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.home-review-source {
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

/* Star rating */
.home-review-stars {
    margin-bottom: 12px;
    color: #d99a18;
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: 2px;
}

/* Review text */
.home-review-text {
    margin: 0;
    color: #444;
    font-size: 14px;
    line-height: 1.75;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Empty reviews message */
.home-reviews-empty {
    margin: 0;
    padding: 24px;
    color: #555;
    text-align: center;
    line-height: 1.7;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 8px;
}

/* Previous/next controls */
.home-reviews-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}

.home-reviews-controls[hidden] {
    display: none !important;
}

.home-reviews-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #d8d8d2;
    border-radius: 50%;
    background: #fff;
    color: #17243a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.home-reviews-control:hover,
.home-reviews-control:focus-visible {
    border-color: #17243a;
    background: #17243a;
    color: #fff;
}

.home-reviews-control:focus-visible {
    outline: 3px solid #9b7b3e;
    outline-offset: 3px;
}

.home-reviews-status {
    min-width: 70px;
    color: #555;
    font-size: 13px;
    text-align: center;
}

/* Tablet: show two cards */
@media (max-width: 850px) {
    .home-reviews {
        padding: 56px 20px;
        background-attachment: scroll;
    }

    .home-reviews-grid {
        gap: 22px;
    }

    .home-review-card {
        flex-basis: calc((100% - 22px) / 2);
        padding: 22px;
    }

    .home-reviews-heading h2 {
        font-size: 32px;
    }
}

/* Mobile: show one card */
@media (max-width: 560px) {
    .home-reviews {
        padding: 48px 16px;
        background-position: center center;
    }

    .home-reviews-heading {
        margin-bottom: 26px;
    }

    .home-reviews-heading h2 {
        font-size: 28px;
    }

    .home-reviews-heading p {
        font-size: 14px;
    }

    .home-reviews-grid {
        gap: 16px;
    }

    .home-review-card {
        flex-basis: 100%;
        padding: 22px;
    }

    .home-review-name {
        font-size: 16px;
    }

    .home-review-text {
        font-size: 14px;
    }

    .home-reviews-controls {
        gap: 14px;
        margin-top: 22px;
    }

    .home-reviews-control {
        width: 38px;
        height: 38px;
    }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
    .home-reviews-grid,
    .home-reviews-control {
        transition: none;
    }
}
