﻿/* Collection button styles are in style.css - using global styles */

/* ── Hero blur-up: inlined preview (--hero-lqip) until the photo has loaded ── */
.hero-slideshow::before {
    content: "";
    position: absolute;
    inset: -40px; /* blur fades at the edges; bleed past them */
    background: var(--hero-lqip, none) center / cover no-repeat;
    filter: blur(24px);
}

.hero-slide {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-slide.is-loaded {
    opacity: 1;
}

@media (max-width: 1199.98px) {
    .hero-section h1 {
        text-align: center !important;
    }

    .hero-section h1 .hero-line {
        display: block;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 991.98px) {
    /* Home page - mobile shrinking (excluding review container) */
    .hero-section {
        padding: 100px 0 25px !important;
    }
    
    .hero-section h1 {
        font-size: 1.25rem !important;
        line-height: 1.2;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-section .lead {
        font-size: 0.75rem !important;
    }
    
    .welcome-message h2 {
        font-size: 1rem !important;
    }
    
    .welcome-message p {
        font-size: 0.7rem !important;
    }
    
    .search-box {
        padding: 12px 10px !important;
        margin-top: 8px !important;
    }
    
    .search-row .form-select-lg,
    .search-row .form-control-lg {
        font-size: 0.65rem !important;
        padding: 0.35rem 0.5rem !important;
    }
    
    /* Override HTML margin classes */
    .action-buttons-row.mb-3 {
        margin-bottom: 0.1rem !important;
    }
    
    .action-buttons-row {
        margin-bottom: 0.1rem !important;
    }
    
    .action-buttons-row .btn-lg {
        font-size: 0.5rem !important;
        padding: 0.18rem 0.4rem !important;
        line-height: 1.2 !important;
    }
    
    .action-buttons-row .btn i {
        font-size: 0.45rem !important;
        margin-right: 0.25rem !important;
    }
    
    /* Make level buttons closer to action buttons */
    .level-buttons-row {
        margin-top: 0.2rem !important;
    }
    
    /* Override mb-1 on label */
    .level-buttons-row .mb-1 {
        margin-bottom: 0.32rem !important;
    }
    
    .level-buttons-row .text-white.small {
        font-size: clamp(0.58rem, 0.5rem + 0.4vw, 0.68rem) !important;
        margin-bottom: 0 !important;
        letter-spacing: 0.035em;
    }
    
    .level-buttons-row .d-flex {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(0.35rem, 0.9vw, 0.5rem) !important;
        width: 100%;
        max-width: min(100%, 420px);
        margin: 0 auto;
        align-items: stretch !important;
    }

    .level-buttons-row .btn-level-filter {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-width: 0 !important;
        min-height: clamp(32px, 3.9vw, 38px);
        padding: clamp(0.36rem, 0.8vw, 0.46rem) clamp(0.44rem, 0.9vw, 0.62rem) !important;
        font-size: clamp(0.62rem, 0.54rem + 0.25vw, 0.72rem) !important;
        line-height: 1.12 !important;
        text-align: center;
        white-space: nowrap;
        letter-spacing: 0;
    }
    
    /* Reviews section - smaller with proportional content */
    .reviews-section {
        padding: 20px 0 !important;
    }
    
    .reviews-section h2 {
        font-size: 0.85rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .reviews-section h2 i {
        font-size: 0.8rem !important;
    }
    
    /* Discover what parents are saying - smaller */
    .reviews-section p.text-center.text-muted {
        font-size: 0.65rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .reviews-section .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .reviews-section .reviews-masonry {
        --cols: 2 !important;
        --gap: 5px !important;
        margin-top: 0.75rem !important;
    }

    /* Mobile: Smaller "Show Original" button in review container */
    .reviews-section .review-show-original-btn {
        font-size: 0.6rem !important;
        margin-top: 0.15rem !important;
    }

    .reviews-section .review-show-original-btn i {
        font-size: 0.55rem !important;
    }

    .reviews-section .review-school-link {
        font-size: 0.65rem !important;
        margin-bottom: 0.1rem !important;
    }

    .reviews-section .review-school-link i {
        font-size: 0.6rem !important;
    }

    .reviews-section .review-school-address {
        font-size: 0.58rem !important;
    }

    .reviews-section .review-school-address i {
        font-size: 0.55rem !important;
    }

    
    /* View details and view all schools buttons - smaller */
    .btn-primary.btn-sm,
    .btn-warning.btn-sm {
        font-size: 0.6rem !important;
        padding: 0.3rem 0.5rem !important;
    }
    
    .btn-primary.btn-sm i,
    .btn-warning.btn-sm i {
        font-size: 0.55rem !important;
    }
    
    .btn-outline-primary {
        font-size: 0.65rem !important;
        padding: 0.35rem 0.6rem !important;
    }
    
    .btn-outline-primary i {
        font-size: 0.6rem !important;
    }
    
    /* Page headings */
    h1, h2, h3 {
        font-size: 0.9rem !important;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.6rem !important;
    }
    
    .btn i {
        font-size: 0.65rem !important;
    }
}

/* Homepage Level Filter Buttons */
.btn-level-filter {
    transition: all 0.3s ease;
    padding: 0.4rem 1rem;
    font-size: var(--fs-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: none;
    line-height: 1.4;
    text-transform: none;
}

@media (hover: hover) {

.btn-level-filter:hover {
    background-color: var(--primary-orange) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
}

.btn-level-filter:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Ensure proper alignment of level buttons */
.col-12.mt-2 .text-center {
    width: 100%;
}

.col-12.mt-2 .d-flex {
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 auto;
}

.col-12.mt-2 .text-center .mb-1 {
    margin-bottom: 0.25rem !important;
}

/* Compact search box spacing */
.search-box .row.g-2 > * {
    padding-top: calc(var(--bs-gutter-y) * 0.5);
    padding-bottom: calc(var(--bs-gutter-y) * 0.5);
}

/* Welcome Message Animation */
.animate-fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */

@media (max-width: 576px) {
    .level-buttons-row .d-flex {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: min(100%, 252px);
        gap: 0.36rem !important;
    }

    .level-buttons-row .btn-level-filter {
        min-height: 33px;
        padding: 0.34rem 0.28rem !important;
        font-size: 0.54rem !important;
        line-height: 1.05 !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .level-buttons-row .text-white.small {
        font-size: 0.58rem !important;
    }

    .level-buttons-row .d-flex {
        max-width: 330px;
        gap: 0.34rem !important;
    }

    .level-buttons-row .btn-level-filter {
        min-height: 30px;
        padding: 0.32rem 0.36rem !important;
        font-size: 0.58rem !important;
    }
}

/* ===================================================
   NEW SEARCH BOX REDESIGN (sb-* classes)
   =================================================== */

.sb-search-row {
    position: relative;
}

.sb-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
    z-index: 2;
    font-size: var(--fs-sm);
    pointer-events: none;
}

.sb-search-input {
    padding-left: 40px !important;
    height: 50px !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--border-default) !important;
    font-size: var(--fs-sm) !important;
}

.sb-search-input:focus {
    border-color: var(--focus-border) !important;
    box-shadow: 0 0 0 3px rgba(var(--focus-rgb), 0.15) !important;
    transform: none !important;
}

/* Age Group Pills */
.sb-age-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sb-age-pill {
    padding: 4px 13px;
    border-radius: 20px;
    border: 1.5px solid var(--border-default);
    background: #fff;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-subtle);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

@media (hover: hover) {

.sb-age-pill:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(var(--brand-rgb), 0.06);
}
}

.sb-age-pill.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
    font-weight: 600;
}

/* State + Area Row */
.sb-filter-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.sb-filter-state {
    flex: 0 0 155px;
}

.sb-filter-area {
    flex: 1;
    min-width: 0;
}

.sb-filter-state .form-select,
.sb-filter-area .form-control {
    border-radius: 8px !important;
    border-color: var(--border-default) !important;
    font-size: var(--fs-sm) !important;
    padding: 0.35rem 0.65rem !important;
    border-width: 1.5px !important;
    transform: none !important;
}

.sb-filter-state .form-select:focus,
.sb-filter-area .form-control:focus {
    border-color: var(--focus-border) !important;
    box-shadow: 0 0 0 2px rgba(var(--focus-rgb), 0.15) !important;
    transform: none !important;
}

/* Action Buttons */
.sb-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    justify-content: center;
}

.sb-btn-search {
    border-radius: 22px !important;
    padding: 8px 22px !important;
    font-weight: 600 !important;
    font-size: var(--fs-sm) !important;
}

/* Tablet: tighter layout */
@media (min-width: 992px) and (max-width: 1199.98px) {


    .sb-filter-state {
        flex: 0 0 135px;
    }
}

/* Mobile & small tablet: stack vertically */
@media (max-width: 767.98px) {

    .sb-filter-row {
        flex-direction: column;
        gap: 8px;
    }

    .sb-filter-state {
        flex: none;
        width: 100%;
    }

    .sb-age-pills {
        gap: 6px;
    }

    .sb-age-pill {
        font-size: 0.73rem;
        padding: 4px 10px;
    }

    .sb-btn-search {
        flex: 1;
        text-align: center;
        font-size: 0.73rem !important;
        padding: 6px 10px !important;
    }

    .sb-search-input {
        height: 44px !important;
        font-size: 0.85rem !important;
    }
}

/* Very small screens */
@media (max-width: 576px) {
    .sb-action-row {
        gap: 7px;
    }

    .sb-age-pill {
        font-size: 0.68rem;
        padding: 3px 9px;
    }
}

/* ===================================================
   SEARCH BOX POLISH + LAYOUT REFINEMENTS (v3)
   =================================================== */

/* Allow dropdowns to escape the hero section clipping */
.hero-section {
    overflow: visible !important;
}

/* Container: light grey semi-transparent — high z-index so stacking context
   sits above every sibling section (reviews, cards, etc.) */
.search-box {
    --fs-sm: 16px;
    backdrop-filter: blur(14px) saturate(1.3) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.3) !important;
    background: rgba(var(--brand-rgb), 0.10) !important;
    border: 1px solid rgba(var(--brand-rgb), 0.6) !important;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.4) inset,
        0 10px 40px rgba(0, 0, 0, 0.13),
        0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transition: box-shadow 0.25s ease;
    position: relative !important;
    z-index: 200 !important;
}

.search-box:focus-within {
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.6) inset,
        0 14px 48px rgba(0, 0, 0, 0.16),
        0 0 0 1px rgba(var(--focus-rgb), 0.12) !important;
}

/* Search bar */
.sb-search-input {
    background: var(--brand-subtle) !important;
    border-color: var(--border-default) !important;
    color: var(--text-default) !important;
    letter-spacing: 0.01em;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
}
.sb-search-input::placeholder { color: var(--text-subtle) !important; }
.sb-search-input:focus {
    background: #fff !important;
    border-color: var(--focus-border) !important;
}

/* ── Age Group: checkbox pills ── */
.sb-age-checkboxes {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: hidden;
}

.sb-age-check-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.sb-age-check-label input[type="checkbox"] { display: none; }

.sb-age-check-label span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--border-default);
    background: var(--brand-subtle);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-subtle);
    transition: all 0.15s ease;
    white-space: nowrap;
}

@media (hover: hover) {

.sb-age-check-label:hover span {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(var(--brand-rgb), 0.06);
}
}

.sb-age-check-label input[type="checkbox"]:checked + span {
    background: var(--action);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(var(--brand-rgb), 0.35);
}

/* ── State: custom multi-select dropdown ── */
.sb-custom-dropdown {
    position: relative;
    width: 100%;
}

.sb-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 4px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--text-default);
    text-align: left;
    gap: 8px;
}

.sb-dropdown-display {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-default);
}

.sb-dropdown-chevron {
    font-size: var(--fs-xs);
    color: var(--text-subtle);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sb-custom-dropdown.open .sb-dropdown-chevron {
    transform: rotate(180deg);
}

/* ── Dropdown panel (shared base) ── */
.sb-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: -14px;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    min-width: 360px;
    max-height: 280px;
    overflow-y: auto;
}

.sb-dropdown-panel.open { display: block; }

/* ── State panel: 3-column checkbox grid ── */
.sb-state-panel { padding: 10px; }

.sb-states-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.sb-state-check-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border-radius: 6px;
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--text-strong);
    transition: background 0.15s ease;
    user-select: none;
}

@media (hover: hover) {

.sb-state-check-label:hover { background: rgba(var(--brand-rgb), 0.08); color: var(--primary-blue); }
}

.sb-state-check-label input[type="checkbox"] {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.sb-state-check-label input[type="checkbox"]:checked ~ span {
    color: var(--primary-blue);
    font-weight: 600;
}

/* ── Area panel ── */
.sb-area-wrapper {
    position: relative;
    width: 100%;
}

.sb-area-input {
    width: 100%;
    padding: 4px 0;
    border: none;
    background: transparent;
    font-size: var(--fs-sm);
    color: var(--text-default);
    outline: none;
}

.sb-area-input::placeholder { color: var(--text-subtle); }

.sb-area-panel {
    min-width: 280px;
    padding: 6px 0;
    left: -14px;
}

.sb-area-group-header {
    padding: 5px 14px 3px;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 6px;
}

.sb-area-group-header:first-child { margin-top: 0; }

.sb-area-group-header i,
.sb-area-option i { width: 16px; margin-right: 10px; text-align: center; color: var(--text-strong); }

.sb-area-option {
    display: block;
    padding: 6px 14px;
    font-size: var(--fs-sm);
    color: var(--text-default);
    cursor: pointer;
    transition: background 0.12s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (hover: hover) {

.sb-area-option:hover { background: rgba(var(--brand-rgb), 0.08); color: var(--primary-blue); }
}

.sb-area-empty { padding: 10px 14px; font-size: var(--fs-sm); color: var(--text-subtle); }

/* ── Search autocomplete panel ── */
.sb-search-panel { left: 0; right: 0; min-width: unset; width: 100%; padding: 6px 0; top: calc(100% + 4px); border-radius: 0 0 10px 10px; }

/* Flatten input bottom corners when panel is open (Agoda-style connected look) */
.sb-search-input-open { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; border-bottom-color: transparent !important; }


/* ── Default suggestion grid (Agoda-style) ── */
.sb-sugg-label {
    padding: 12px 14px 8px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* 6 defaults: 3 down the left column, 3 down the right */
.sb-sugg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    gap: 2px;
    padding: 0 8px 10px;
}

.sb-sugg-list { padding: 4px 8px; }

.sb-sugg-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

@media (hover: hover) {

.sb-sugg-card:hover { background: rgba(var(--brand-rgb), 0.08); }
}

.sb-sugg-card-icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    color: var(--text-strong);
    font-size: 18px;
}

.sb-sugg-card-body { min-width: 0; }

.sb-sugg-card-name {
    font-size: var(--fs-sm);
    font-weight: 400;
    color: var(--text-default);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-sugg-card-sub {
    font-size: var(--fs-xs);
    color: var(--text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.sb-sugg-card-name strong { font-weight: 700; }

@media (max-width: 600px) {
    .sb-sugg-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
}

/* ── Action row — sits below the filter border box ── */
.sb-action-row {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    padding: 12px 2px 2px !important;
    border-top: none !important;
    margin-top: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    justify-content: center !important;
}

.sb-btn-search {
    background: var(--action) !important;
    border: none !important;
    box-shadow: 0 3px 12px rgba(var(--brand-rgb), 0.38) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease !important;
    letter-spacing: 0.06em !important;
    font-size: var(--fs-sm) !important;
    font-weight: 700 !important;
}
@media (hover: hover) {
.sb-btn-search:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(var(--brand-rgb), 0.48) !important;
    background: var(--action) !important;
}
}
.sb-btn-search:active { transform: translateY(0) !important; box-shadow: 0 2px 6px rgba(var(--brand-rgb), 0.3) !important; }

/* ── Mobile ── */
@media (max-width: 767.98px) {
    .sb-dropdown-panel { min-width: 260px; left: 0; }
    .sb-states-grid { grid-template-columns: repeat(2, 1fr); }
    .sb-btn-search {
        flex: 1;
        text-align: center;
        font-size: 0.73rem !important;
        padding: 6px 10px !important;
    }
    .sb-search-input { height: 44px !important; font-size: 0.85rem !important; }
}

@media (max-width: 576px) {
    .sb-action-row { gap: 7px !important; }
    .sb-states-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Reviews Masonry Layout — Dianping Style */
.reviews-section {
    background-color: var(--background);
}

/* =====================================================
   EXPLORE FEED — Xiaohongshu note cards
   Grid is the pre-JS fallback; initReviewsMasonry (home.js) drops each card into the
   shortest of --cols flex columns (.is-masonry). Cover height comes from the photo's
   own ratio, clamped 4:3 … 3:4 server-side (myclevanReviewCoverRatio).
   ===================================================== */
.reviews-masonry {
    --cols: 5;
    --gap: 32px;
    --xhs-text: #333;
    --xhs-text-2: rgba(51, 51, 51, 0.8);
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    align-items: start;
    column-gap: var(--gap);
    margin-top: 0;
}

.reviews-masonry.is-masonry {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: var(--gap);
}

.reviews-masonry-col {
    flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
    min-width: 0;
}

#reviews-load-sentinel {
    height: 1px;
    margin-top: 10px;
}

.review-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 16px;
}

.review-card-cover {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.03);
    isolation: isolate;
    text-decoration: none;
    color: inherit;
}

/* XHS darkens the cover slightly on hover */
.review-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s ease;
    pointer-events: none;
}

@media (hover: hover) {

.review-card-cover:hover::after { background: rgba(0, 0, 0, 0.06); }
}

.review-card-cover img,
.review-card-cover video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Text covers (5 designs in review-cover.css) */
.review-card-media--placeholder {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.review-card-play-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 8px;
    padding-left: 1px;
    pointer-events: none;
}

/* Review score — top-left, same place as before */
.review-card-cover .review-rating-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 700;
}

.review-card-cover .review-rating-value { color: var(--blush-deep); }
.review-card-cover .review-rating-scale { color: #999; font-weight: 500; }

/* Cover overlay: business name + area (left), business rating (right). A sibling of the
   cover link (no nested <a>); clicks on the gradient fall through to the cover. */
.review-card-media-wrap { position: relative; }

.review-card-header {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 4;
    padding: 6px 10px 9px;
    border-radius: 0 0 16px 16px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3) 30%, rgba(0, 0, 0, 0.4));
    display: flex;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.review-card-header-top { min-width: 0; flex: 1; }

.review-card-biz-name-link {
    display: block;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    pointer-events: auto;
}

@media (hover: hover) {

.review-card-biz-name-link:hover .review-card-biz-name { text-decoration: underline; }
}

.review-card-biz-name {
    font-weight: 700;
    font-size: var(--fs-xs);
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.review-card-biz-area {
    margin-top: 1px;
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-card-biz-area i { font-size: 0.85em; margin-right: 2px; }

.review-card-biz-rating {
    flex-shrink: 0;
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font-size: var(--fs-sm);
    font-weight: 700;
    line-height: 1.2;
    pointer-events: auto;
}

.review-card-footer {
    padding: 12px;
}

.review-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--xhs-text);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.review-card-title { transition: color 0.15s ease; }
@media (hover: hover) {
.review-card-title:hover { color: var(--action-hover); }
}

.review-card-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 20px;
    font-size: 12px;
    color: var(--xhs-text-2);
}

.review-card-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.review-user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 0.8px solid rgba(0, 0, 0, 0.08);
    object-fit: cover;
    flex-shrink: 0;
}

.review-user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-card-like {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 12px;
    cursor: pointer;
}

.review-card-like i { font-size: 14px; transition: transform 0.15s ease; }
/* Hover = colour + a light tint of it behind; padding/negative margin give the tint room without moving layout */
.review-card-like {
    margin: -2px -6px;
    padding: 2px 6px;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}
@media (hover: hover) {
.review-card-like:hover { color: var(--success); background: var(--success-subtle); }
} /* same green hover as the business page helpful button */
.review-card-like:active i { transform: scale(0.85); }

.helpful-btn.helpful,
.helpful-btn.helpful i { color: var(--success); }

@media (hover: hover) {

.helpful-btn.helpful:hover { color: var(--success); }
}
.helpful-btn.helpful i { font-weight: 900; } /* outline (far) -> solid once marked helpful */

/* Columns: 5 → 4 → 3, then 2 on phones (XHS never goes single-column) */
@media (max-width: 1171.98px) {
    .reviews-masonry { --cols: 4; --gap: 24px; }
}

@media (max-width: 992px) {
    .reviews-masonry { --cols: 3; --gap: 20px; }
}

/* Phones + tablets: XHS mobile feed — rounded cards (cover + title + author) on the
   white page, 5px gutters that run almost edge to edge */
@media (max-width: 991.98px) {
    .reviews-masonry { margin-inline: -7px; } /* container's 12px gutter → 5px */
    .review-card {
        margin-bottom: 5px;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
    }
    .review-card-cover,
    .review-card-header { border-radius: 0; }
    @media (hover: hover) {
    .review-card-cover:hover::after { background: none; }
    }
    .review-card-footer { padding: 10px 10px 12px; }
    .review-card-title { margin-bottom: 10px; font-size: 14px; }
}

/* Tablets: same cards, 3 across so covers stay phone-card sized */
@media (min-width: 600px) and (max-width: 991.98px) {
    .reviews-section .reviews-masonry { --cols: 3 !important; }
}

/* Shared report button (report modal trigger) */
.content-report-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #f2c2bd;
    background: #fff8f7;
    color: #c24b41;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.content-report-btn.reported {
    background: #fdeceb;
    border-color: #ebb1ab;
    color: #a5342b;
}

/* =====================================================
   REVIEW NOTE MODAL (xn-*) — Xiaohongshu note detail
   940×668-style box: media (its own ratio) + 440px panel, 32px from the viewport.
   ===================================================== */
html.xn-open { overflow: hidden; }
html.xn-open #chatbot-container { display: none; } /* launcher sits at z-index 9999 */

.xn-mask {
    --xn-text: #333;
    --xn-text-2: rgba(51, 51, 51, 0.6);
    --xn-text-3: rgba(51, 51, 51, 0.3);
    --xn-line: rgba(0, 0, 0, 0.08);
    --xn-tag: #13386c;
    position: fixed;
    inset: 0;
    z-index: 1045; /* under Bootstrap modals (report / auth) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 88px; /* sides keep the box clear of the close button */
    background: rgba(0, 0, 0, 0.25);
    animation: xn-fade 0.2s ease;
}

.xn-mask[hidden] { display: none; }

.xn-close {
    position: fixed;
    top: 32px;
    right: 32px;
    z-index: 3;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 18px;
    transition: background 0.2s ease;
}

@media (hover: hover) {

.xn-close:hover { background: rgba(0, 0, 0, 0.45); }
}

.xn-container {
    --xn-ar: 0.75;    /* media width ÷ height, set from the first photo */
    --xn-panel: 440px;
    display: flex;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    max-width: 100%;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 64px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.02);
    animation: xn-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--xn-text);
}

@keyframes xn-fade { from { opacity: 0; } }
@keyframes xn-in { from { opacity: 0; transform: scale(0.96); } }

.xn-loading {
    width: min(940px, calc(100vw - 176px));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--xn-text-2);
}

/* Left: media */
.xn-media {
    position: relative;
    flex: 0 0 auto;
    height: 100%;
    aspect-ratio: var(--xn-ar);
    max-width: calc(100vw - 176px - var(--xn-panel));
    overflow: hidden;
    background: rgba(0, 0, 0, 0.03);
}

.xn-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.xn-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xn-slide img,
.xn-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.xn-slide video { background: #000; }

/* Text cover: card-size art scaled 2× so the design reads the same as the card */
.xn-cover-art {
    width: 50%;
    height: 50%;
    transform: scale(2);
    transform-origin: top left;
}

.xn-fraction {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 12px;
    background: rgba(64, 64, 64, 0.25);
    color: #fff;
    font-size: 12px;
    line-height: 16px;
}

.xn-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    color: var(--xn-text-2);
    font-size: 12px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.xn-arrow--prev { left: 16px; }
.xn-arrow--next { right: 16px; }
@media (hover: hover) {
.xn-media:hover .xn-arrow { opacity: 1; }
}
@media (hover: hover) {
.xn-arrow:hover { background: #fff; color: var(--action-hover); }
}

.xn-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.xn-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease;
}

@media (hover: hover) {

.xn-dot:hover { background: rgba(255, 255, 255, 0.85); }
}
.xn-dot.active { background: #fff; }

/* Right: panel */
.xn-panel {
    flex: 0 0 var(--xn-panel);
    width: var(--xn-panel);
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-left: 0.8px solid var(--xn-line);
    background: #fff;
}

.xn-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 24px;
    flex-shrink: 0;
}

.xn-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.xn-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0.8px solid var(--xn-line);
    object-fit: cover;
    flex-shrink: 0;
}

.xn-username {
    font-size: 16px;
    color: rgba(51, 51, 51, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Review score (DS badge + word) sits where XHS puts the Follow pill */
.xn-rating-trigger { flex-shrink: 0; }
/* The reviewer's own score: plain text, no badge — big number + word on one baseline */
.xn-score.myclevan-score { align-items: baseline; gap: 4px; }
.xn-score .myclevan-score-value {
    padding: 0;
    background: none;
    color: var(--action) !important; /* brand.css paints the badge text white */
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}
.xn-score .myclevan-score-label { font-size: 14px; font-weight: 700; line-height: 1; }

.xn-scroller {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.xn-note { padding: 0 24px 24px; }

.xn-title {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.xn-desc {
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.xn-translate {
    display: block;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 12px;
    color: var(--xn-text-3);
}

@media (hover: hover) {

.xn-translate:hover { color: var(--action-hover); }
}

/* Business link, styled like XHS's #topic line */
.xn-tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 8px;
}

.xn-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 20px;
    color: var(--xn-tag);
    text-decoration: none;
}

.xn-tag i { font-size: 12px; }
.xn-tag { transition: color 0.15s ease; }
@media (hover: hover) {
.xn-tag:hover { color: var(--action-hover); }
}

.xn-tag-score .myclevan-score-value { font-size: 12px; }
.xn-tag-score .myclevan-score-label { font-size: 13px; }

/* Area under the business name, its icon lined up with the school icon */
.xn-area {
    flex-basis: 100%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 18px;
    color: var(--text-subtle);
}
.xn-area i { font-size: 12px; width: 15px; text-align: center; }
.xn-tag i { width: 15px; text-align: center; }

.xn-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    margin-top: 12px;
}

.xn-date { font-size: 12px; color: var(--xn-text-3); }

.xn-more { display: flex; gap: 4px; }

.xn-icon-btn,
.xn-icon-btn.content-report-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--xn-text-2);
    font-size: 14px;
}

.xn-icon-btn { transition: background 0.15s ease, color 0.15s ease; }
@media (hover: hover) {
.xn-icon-btn:hover { background: var(--action-hover-wash); color: var(--action-hover); }
}
/* Edit is black with a light-black wash (user decision 2026-10-26), same as the profile review card */
.xn-icon-btn[data-xn-edit] { color: #000; }
@media (hover: hover) {
.xn-icon-btn[data-xn-edit]:hover { background: rgba(0, 0, 0, 0.06); color: #000; }
}
/* Report + delete are destructive: red, like every other report button on the site */
@media (hover: hover) {
.xn-icon-btn[data-xn-delete]:hover { background: #fdeceb; color: #c24b41; }
}
@media (hover: hover) {
.xn-icon-btn.content-report-btn:hover { background: #fdeceb; color: #c24b41; }
}
.xn-icon-btn.reported { color: #c24b41; }

.xn-edit .form-control { margin-bottom: 8px; font-size: 14px; }
.xn-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }

.xn-divider {
    margin: 0 24px;
    border-top: 0.8px solid var(--xn-line);
}

/* Replies, styled as XHS comments */
.xn-comments { padding: 16px 16px 8px; }

.xn-total {
    margin: 0 8px 12px;
    font-size: 14px;
    color: var(--xn-text-2);
}

.xn-total:empty { display: none; }

.xn-empty {
    padding: 24px 0;
    text-align: center;
    font-size: 14px;
    color: var(--xn-text-3);
}

.xn-comment {
    display: flex;
    padding: 8px;
}

.xn-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0.8px solid var(--xn-line);
    object-fit: cover;
    flex-shrink: 0;
}

.xn-comment-right {
    flex: 1;
    min-width: 0;
    margin-left: 12px;
}

.xn-comment-name {
    font-size: 12px;
    line-height: 16px;
    color: var(--xn-text-2);
}

.xn-comment-arrow,
.xn-comment-replyto { font-size: 12px; color: var(--xn-text-3); }

.xn-comment-content {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--xn-text);
    overflow-wrap: anywhere;
}

.xn-comment-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--xn-text-2);
}

.xn-comment-action,
.xn-comment-action.content-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font-size: 12px;
}

.xn-comment-action i { font-size: 14px; }
.xn-comment-action,
.xn-comment-action.content-report-btn {
    margin: -2px -6px;
    padding: 2px 6px;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}
@media (hover: hover) {
.xn-comment-action:hover { color: #000; background: rgba(0, 0, 0, 0.06); }
}
@media (hover: hover) {
.xn-comment-action.content-report-btn:hover { color: #c24b41; background: #fdeceb; }
}
.xn-comment-action.reported { color: #c24b41; }

.xn-comment--sub { padding: 8px 0 0; }
.xn-comment--sub .xn-comment-avatar { width: 24px; height: 24px; }
.xn-comment--sub .xn-comment-right { margin-left: 8px; }
/* Deeper replies stack straight down (cancel the 24px avatar + 8px gap indent), like biz-details */
.xn-comment--sub .xn-comment--sub { margin-left: -32px; }

.nested-replies-container:empty { display: none; }

@media (hover: hover) {

.xn-show-more:hover { color: var(--action-hover); }
}
.xn-show-more {
    transition: color 0.15s ease;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--xn-tag);
}

/* Engage bar */
.xn-engage {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-top: 0.8px solid var(--xn-line);
    flex-shrink: 0;
    background: #fff;
}

.xn-input-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    margin: 0;
    padding: 0 6px 0 16px;
    border: 0;
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.03);
    font-size: 14px;
    color: var(--xn-text-3);
    cursor: text;
}

.xn-input-wrap--guest {
    padding-left: 12px;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.xn-input-wrap--guest i { font-size: 20px; }
.xn-input-wrap { transition: background 0.15s ease, color 0.15s ease; }
@media (hover: hover) {
.xn-input-wrap:hover { background: rgba(0, 0, 0, 0.06); }
}
@media (hover: hover) {
.xn-input-wrap--guest:hover { color: var(--xn-text-2); }
}

.xn-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: none;
    font-size: 14px;
    color: var(--xn-text);
}

.xn-input::placeholder { color: var(--xn-text-3); }
.xn-input:focus-visible { outline: 0; } /* beats brand.css :focus-visible ring */

.xn-send {
    display: none;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
}

.xn-input-wrap:has(.xn-input:not(:placeholder-shown)) .xn-send { display: inline-flex; }
.xn-send { transition: background 0.15s ease; }
@media (hover: hover) {
.xn-send:hover { background: var(--action-hover); }
}

/* Typing hides the counters, like XHS */
.xn-engage:has(.xn-input:focus, .xn-input:not(:placeholder-shown)) .xn-engage-actions { display: none; }

.xn-engage-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.xn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14px;
    color: var(--xn-text);
}

.xn-action {
    margin: -4px -8px;
    padding: 4px 8px;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}
@media (hover: hover) {
.xn-action:hover { color: var(--success); background: var(--success-subtle); }
}
@media (hover: hover) {
.xn-action[data-xn-share]:hover { color: #000; background: rgba(0, 0, 0, 0.06); }
}
.xn-action i { font-size: 20px; transition: transform 0.15s ease; }
.xn-action:active i { transform: scale(0.85); }

/* Icons that only one layout uses */
.xn-ico-mobile,
.xn-close-back,
.xn-expand { display: none; }

/* "——— Show all replies", as XHS's 展开 N 条回复 */
.xn-show-more::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    margin-right: 8px;
    vertical-align: middle;
    background: rgba(0, 0, 0, 0.1);
}

/* Phones/tablets: the note is its own page, like XHS mobile web — photo full-bleed
   at the top, author row under it, note (3 lines + Show more), replies, and the
   reply bar pinned to the bottom. It slides in from the right (a page, not a
   sheet); Back = the chevron or the browser's back. */
@keyframes xn-in { from { transform: translateX(100%); } }

@media (max-width: 900px) {
    .xn-mask {
        padding: 0;
        background: #fff;
        align-items: stretch;
    }

    .xn-close {
        top: 12px;
        left: 12px;
        right: auto;
        width: 32px;
        height: 32px;
        background: rgba(0, 0, 0, 0.25);
        font-size: 14px;
    }

    .xn-close-x { display: none; }
    .xn-close-back { display: inline; }

    .xn-container {
        flex-direction: column;
        width: 100%;
        height: 100%;
        border-radius: 0;
        overflow-y: auto;
        box-shadow: none;
        animation: xn-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .xn-loading { width: 100%; height: 100%; }

    .xn-panel { display: contents; }

    .xn-media {
        width: 100%;
        height: auto;
        max-width: none;
        flex-shrink: 0;
    }

    .xn-arrow { display: none; }

    .xn-fraction {
        top: 12px;
        right: 12px;
        background: rgba(0, 0, 0, 0.3);
    }

    .xn-dots { bottom: 12px; gap: 5px; }
    .xn-dot { width: 5px; height: 5px; background: rgba(255, 255, 255, 0.6); }
    .xn-dot.active { background: var(--brand); }

    .xn-author { padding: 14px 16px 12px; }
    .xn-avatar { width: 36px; height: 36px; }
    .xn-username { font-size: 15px; }
    .xn-score .myclevan-score-value { font-size: 18px; }
    .xn-score .myclevan-score-label { font-size: 13px; }

    .xn-scroller { flex: 1 0 auto; overflow: visible; }
    .xn-note { padding: 0 16px 16px; }
    .xn-title { margin-bottom: 4px; font-size: 17px; }
    .xn-desc { font-size: 15px; }

    .xn-desc:not(.is-expanded) .review-comment-text {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .xn-desc.has-more:not(.is-expanded) .xn-expand {
        display: block;
        margin-top: 2px;
        padding: 0;
        border: 0;
        background: none;
        font-size: 15px;
        color: var(--xn-tag);
    }

    .xn-bottom { margin-top: 8px; }
    .xn-date { font-size: 12px; }
    .xn-divider { margin: 0 16px; }

    .xn-comments { padding: 14px 8px 8px; }
    .xn-total { color: var(--xn-text); }
    .xn-comment-avatar { width: 36px; height: 36px; }
    .xn-comment-content { font-size: 15px; }

    .xn-engage {
        position: sticky;
        bottom: 0;
        z-index: 2;
        gap: 20px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    }

    .xn-input-wrap { height: 36px; padding-left: 14px; background: #f5f5f5; }
    .xn-ico-mobile,
    .xn-input-wrap--guest .xn-ico-mobile { display: inline; font-size: 12px; color: var(--xn-text-3); }
    .xn-ico-desktop { display: none; }
    .xn-engage-actions { gap: 20px; }
    .xn-action { font-size: 14px; }
}

.hero-with-image { background-position: center; }
@media (max-width: 991.98px) {
    .hero-with-image { background-attachment: scroll !important; }
}

/* =====================================================
   SORT BY BAR (srt-*)
   ===================================================== */

.srt-bar-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.srt-bar-label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-subtle);
    white-space: nowrap;
    margin-right: 4px;
}

.srt-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--border-default);
    background: #fff;
    color: var(--text-default);
    font-size: var(--fs-sm);
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap;
}

@media (hover: hover) {

.srt-pill:hover {
    border-color: var(--brand);
    background: rgba(var(--brand-rgb), 0.1);
    color: var(--action);
}
}

.srt-pill--active {
    border-color: var(--brand);
    background: rgba(var(--brand-rgb), 0.1);
    color: var(--action);
    font-weight: 600;
}

/* =====================================================
   EXPLORE FILTER BAR (efb-*)
   ===================================================== */

.efb-wrap {
    margin-bottom: var(--space-16);
    position: relative;
    z-index: 10;
    background: var(--background);
    border-radius: 16px;
    padding: 10px 12px;
}

.efb-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 0 6px;
    gap: 0;
    overflow: visible;
    flex-wrap: wrap;
}

/* Vertical separator */
.efb-sep {
    width: 1px;
    height: 32px;
    background: var(--brand-subtle);
    flex-shrink: 0;
}

/* Each filter segment */
.efb-segment {
    position: relative;
    flex: 1;
    min-width: 0;
}

.efb-trigger {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    border-radius: 10px;
    transition: background 0.15s;
    gap: 2px;
}

@media (hover: hover) {

.efb-trigger:hover {
    background: rgba(var(--brand-rgb), 0.06);
}
}

.efb-seg-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    pointer-events: none;
}

.efb-seg-val {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-default);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    pointer-events: none;
}

.efb-chev {
    display: none; /* hide chevron; label+value layout is sufficient */
}

/* Segment open state */
.efb-segment.efb-open .efb-trigger {
    background: rgba(var(--brand-rgb), 0.09);
    border-radius: 10px;
}

/* Dropdown panel */
.efb-drop {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1.5px solid var(--border-default);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    padding: 10px;
    min-width: 200px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 9999;
}

.efb-drop.efb-drop--grid {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    min-width: 320px;
}

.efb-drop.efb-drop--area {
    min-width: 260px;
    padding: 0;
}

/* Show state */
.efb-drop.efb-drop--open {
    display: block;
}

.efb-drop.efb-drop--grid.efb-drop--open {
    display: grid;
}

.efb-drop.efb-drop--area.efb-drop--open {
    display: flex;
    flex-direction: column;
}

/* Checkbox items */
.efb-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--text-default);
    transition: background 0.13s;
    user-select: none;
    white-space: nowrap;
}

@media (hover: hover) {

.efb-check-item:hover {
    background: rgba(var(--brand-rgb), 0.08);
    color: var(--primary-blue);
}
}

.efb-check-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.efb-check-item input[type="checkbox"]:checked ~ span {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Area search input */
.efb-area-search-wrap {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-default);
}

.efb-area-search {
    width: 100%;
    border: 1.5px solid var(--border-default);
    border-radius: 7px;
    padding: 5px 10px;
    font-size: var(--fs-sm);
    outline: none;
    color: var(--text-default);
}

.efb-area-search:focus {
    border-color: var(--primary-blue);
}

.efb-area-list {
    flex: 1;
    overflow-y: auto;
    max-height: 220px;
    padding: 6px;
}

.efb-drop-hint {
    padding: 10px 8px;
    font-size: var(--fs-xs);
    color: var(--text-subtle);
    text-align: center;
}

/* Filter button */
.efb-filter-btn {
    flex-shrink: 0;
    margin: 6px 4px 6px 8px;
    padding: 9px 22px;
    background: var(--action);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: var(--fs-sm);
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.04em;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(var(--brand-rgb), 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    gap: 7px;
}

@media (hover: hover) {

.efb-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(var(--brand-rgb), 0.45);
}
}

.efb-filter-btn:active {
    transform: translateY(0);
}

/* Reset filter button */
.efb-reset-btn {
    flex-shrink: 0;
    margin: 6px 8px 6px 4px;
    padding: 9px 12px;
    background: #fff0f0;
    color: var(--urgency);
    border: 1.5px solid #f5c2c2;
    border-radius: 10px;
    cursor: pointer;
    font-size: var(--fs-sm);
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

@media (hover: hover) {

.efb-reset-btn:hover {
    background: #ffe0e0;
    color: var(--urgency);
    border-color: var(--urgency);
}
}

/* Loading state on masonry */
.reviews-masonry .efb-no-results { grid-column: 1 / -1; }

.reviews-masonry.efb-loading {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Empty state */
.efb-no-results {
    column-span: all;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-subtle);
    font-size: var(--fs-sm);
    width: 100%;
}

/* ── Sticky state ── */
.efb-wrap.efb-sticky {
    position: fixed;
    /* top is set dynamically by JS to match the actual navbar height */
    left: 0;
    right: 0;
    z-index: 1029;      /* just below navbar (1030) */
    margin: 0;
    padding: 6px 12px;
    background: var(--background);
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Bar keeps its original appearance; width is locked by JS */
.efb-wrap.efb-sticky .efb-bar {
    flex-shrink: 0;
}

/* Placeholder to prevent layout jump when bar goes sticky */
.efb-placeholder {
    display: none;
}

.efb-placeholder.efb-placeholder--active {
    display: block;
}

/* Responsive */
@media (max-width: 991.98px) {
    .efb-bar {
        flex-wrap: wrap;
        padding: 6px;
        gap: 2px;
    }
    .efb-sep { display: none; }
    .efb-segment {
        flex: 0 0 calc(50% - 4px);
        min-width: 0;
    }
    /* chips apply from their own sheets, so the Filter button is redundant here */
    .efb-filter-btn { display: none !important; }
    .efb-reset-btn {
        flex-shrink: 0;
        margin: 4px 0 2px;
    }
    /* sticky top is set by JS — no hardcoded override needed */
}

@media (max-width: 575.98px) {
    .efb-segment { flex: 0 0 100%; }
    .efb-trigger { padding: 8px 10px; }
    .efb-seg-label { font-size: 0.62rem; }
    .efb-seg-val { font-size: 0.82rem; }
}

/* ===================================================
   SEARCH BOX PLACEHOLDER — reset to 14px
   =================================================== */
.search-box .sb-search-input,
.search-box .sb-area-input,
.search-box .sb-dropdown-trigger,
.search-box .sb-dropdown-display {
    font-size: 14px !important;
}

/* ===================================================
   HERO SLIDESHOW
   =================================================== */

.hero-section {
    position: relative;
}

.hero-section.hero-with-slideshow {
    animation: none;
    background: var(--graphite);
}

.hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Tablet: shift the image up so only the lower half of the sun shows */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-slide { background-position: center 66%; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* ===================================================
   HERO REDESIGN — Editorial / Booking-inspired
   =================================================== */

/* Taller hero, more breathing room */
.hero-section {
    padding: 180px 0 80px !important;
    min-height: 580px !important;
}

/* Gradient overlay: dark at bottom for search card contrast,
   slightly lighter at top so slideshow images read through */
.hero-overlay {
    background: linear-gradient(
        170deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.52) 55%,
        rgba(0, 0, 0, 0.68) 100%
    ) !important;
}

/* ── Hero typography ── */
.hero-section h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    margin-bottom: 0.6rem !important;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4) !important;
    letter-spacing: -0.01em !important;
}

/* Line 1 — eyebrow descriptor */
.hero-line-primary {
    display: block !important;
    font-size: clamp(1rem, 2.2vw, 1.35rem) !important;
    font-weight: 500 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: rgba(255, 255, 255, 0.78) !important;
    margin-bottom: 0.25rem !important;
}

/* Line 2 — main headline */
.hero-line-secondary {
    display: block !important;
    font-size: clamp(2.2rem, 5vw, 3.6rem) !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em !important;
    line-height: 1.08 !important;
}


/* ── Responsive adjustments ── */
@media (max-width: 992px) {
    .hero-section {
        padding: 150px 0 60px !important;
        min-height: 520px !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 120px 0 40px !important;
        min-height: auto !important;
    }

    .hero-line-primary {
        font-size: 0.78rem !important;
        letter-spacing: 0.08em !important;
    }

    .hero-line-secondary {
        font-size: clamp(1.7rem, 7vw, 2.4rem) !important;
    }

    .search-box {
        border-radius: 12px !important;
    }
}

/* ===================================================
   BUTTON OVERRIDES
   =================================================== */

.sb-btn-search {
    background: var(--action) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.03em !important;
    box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.28) !important;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
    flex: 2 !important;
}

@media (hover: hover) {

.sb-btn-search:hover {
    background: var(--action) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(var(--brand-rgb), 0.38) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}
}

.sb-btn-search:active { transform: translateY(0) !important; }


/* ===================================================
   MYCLEVAN DESIGN SYSTEM — HOME HERO + SEARCH PANEL
   =================================================== */
.hero-section.hero-with-slideshow {
    background: transparent !important;
    padding: calc(var(--header-desktop) + 40px) 0 var(--space-48) !important;
    min-height: 0 !important;
}

/* Drop the legacy grid overlay (public-core .hero-section::before): invisible on the white page,
   but iOS Safari sometimes paints its SVG pattern solid black → grey band at opacity 0.3 */
.hero-section.hero-with-slideshow::before { content: none; }

.hero-section.hero-with-slideshow .hero-slideshow,
.hero-section.hero-with-slideshow .hero-overlay {
    bottom: auto;
    height: calc(var(--header-desktop) + 360px);
}

.hero-section.hero-with-slideshow .hero-overlay {
    background: rgba(4, 7, 10, 0.2) !important;
}

.hero-section h1 {
    font: 700 24px/31px var(--font-sans) !important;
    text-shadow: none !important;
    letter-spacing: 0 !important;
    /* room for the category tab strip that rides 29px above the panel */
    margin-bottom: calc(var(--sb-tab-rise) + var(--space-16)) !important;
    color: var(--text-inverted);
}

.hero-section { --sb-tab-rise: 29px; }

.hero-section .hero-line-primary {
    font: 700 32px/40px var(--font-sans) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--text-inverted) !important;
    margin-bottom: var(--space-4) !important;
}

.hero-section .hero-line-secondary {
    font: 500 20px/26px var(--font-sans) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--text-inverted) !important;
}

/* Rotating word: all words share one grid cell; JS sets the width to the
   active word so the sentence re-centres smoothly as it changes */
.hero-rotator {
    display: inline-grid;
    justify-content: center;
    vertical-align: top;
    overflow: hidden;
    transition: width 0.5s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.hero-rotator-hl { color: var(--accent); }

.hero-rotator-word {
    grid-area: 1 / 1;
    justify-self: center;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.hero-rotator-word.is-active { opacity: 1; transform: none; }
.hero-rotator-word.is-past { transform: translateY(-100%); }

/* Narrow screens: the word gets its own full-width line (wrapping if long) so
   the title height never changes between words and the panel stays put */
@media (max-width: 575.98px) {
    .hero-rotator { display: grid; width: auto !important; }
    .hero-rotator-word { white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-rotator,
    .hero-rotator-word { transition: none; }
}

.hero-section .welcome-message h2 { font: 600 24px/29px var(--font-sans); color: var(--text-inverted); }
/* Same room as the h1 for the raised category tab (beats Bootstrap's mb-4) */
.hero-section .welcome-message { margin-bottom: calc(var(--sb-tab-rise) + var(--space-16)) !important; }

/* Header sits on the hero image at the top; normal white bar once scrolled (.scrolled from shared-layout.js) */
#mainNavbar.navbar {
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

#mainNavbar.navbar:not(.scrolled) {
    background: transparent !important;
    box-shadow: none;
}

/* Language pill over the hero: a solid fill glares on the teal, so hover is a faint white wash */
@media (hover: hover) {
    #mainNavbar.navbar:not(.scrolled) .mc-lang-toggle:not(.show):hover,
    #mainNavbar.navbar:not(.scrolled) .right-actions-inline .navbar-icon-button:not(.show):hover { background: rgba(255, 255, 255, 0.18); }
}

/* Desktop: bold header links so they hold up over the hero (kept when scrolled to avoid a width jump) */
@media (min-width: 992px) {
    #mainNavbar.navbar .navbar-sign-in-link { font-weight: 700 !important; }

    /* same near-black as the other links; deep-blue disappeared on the teal */
    #mainNavbar.navbar .navbar-sign-in-link:not(:hover) { color: var(--text-strong); }
}

/* Home only: logo left on tablet/mobile so it clears the sun in the hero image (brand.css centres it site-wide) */
@media (max-width: 991.98px) {
    /* .navbar adds specificity: brand.css loads after home.css */
    #mainNavbar.navbar .navbar-brand.mc-brand {
        position: static !important;
        transform: none !important;
        margin-right: auto !important;
    }
}

/* Mobile + tablet: header sits transparent on the hero until it scrolls away (nav pill: brand.css) */
@media (max-width: 991.98px) {
    #mainNavbar.navbar:not(.nav-pill) {
        background: transparent !important;
        box-shadow: none;
    }
}

/* Panel: Agoda TabContent — #f8f7f9 fill, white fields, 16px tab overlap */
.hero-section .search-box {
    --fs-sm: 14px;
    position: relative;
    max-width: var(--container-xl);
    margin: 0 auto calc(var(--control-l) / 2);
    padding: var(--space-32) var(--space-48) var(--space-48) !important;
    background: var(--surface) !important;
    border: 0 !important;
    border-radius: var(--radius-16) !important;
    box-shadow: 0 2px 8px 3px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-align: left;
}

.hero-section .search-box:focus-within { box-shadow: 0 2px 8px 3px rgba(0, 0, 0, 0.2) !important; }

/* Category tab: white frame riding over the panel's top edge, light-blue pill inside */
.hero-section .sb-tabs {
    position: absolute;
    top: calc(-1 * var(--sb-tab-rise));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    padding: var(--space-4);
    background: var(--surface);
    border-radius: var(--radius-16);
    box-shadow: 0 1px 3px rgba(4, 7, 10, 0.16);
}

.hero-section .sb-tab {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    height: 44px;
    padding: 0 var(--space-24);
    background: transparent;
    border-radius: var(--radius-12, 12px);
    color: var(--action);
    font: 600 15px/20px var(--font-sans);
    white-space: nowrap;
}

.hero-section .sb-tab i { font-size: 16px; }

/* Subcategory chips: original position and design */
.hero-section .sb-subcats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.hero-section .sb-subcat-item {
    height: 36px;
    padding: 4px 16px;
    border: 1px solid var(--border-field);
    border-radius: var(--radius-max);
    background: var(--surface);
    color: var(--text-default);
    font: 400 14px/18px var(--font-sans);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {

.hero-section .sb-subcat-item:hover { border-color: var(--action); }
}

.hero-section .sb-subcat-item.active {
    padding: 4px 15px;
    border: 2px solid var(--action);
    background: var(--brand-subtle);
    color: var(--brand-strong);
}

/* Fields: bordered white boxes with icon + small label over the value */
.hero-section .sb-field-label {
    display: block;
    margin: 0;
    font: 600 11px/14px var(--font-sans);
    color: var(--text-default);
    pointer-events: none;
}

.hero-section .sb-field-icon {
    flex-shrink: 0;
    width: 18px;
    font-size: 16px;
    text-align: center;
    color: var(--text-subtle);
}

.hero-section .sb-search-row { margin-bottom: var(--space-12) !important; }

.hero-section .sb-search-row > .sb-field-label,
.hero-section .sb-area-wrapper > .sb-field-label {
    position: absolute;
    top: 9px;
    left: 44px;
    z-index: 2;
}

.hero-section .sb-search-input {
    height: 54px !important;
    padding: 20px 112px 6px 44px !important;
    background: var(--surface) !important;
    border: 1px solid var(--border-field) !important;
    border-radius: var(--radius-8) !important;
    font: 400 15px/20px var(--font-sans) !important;
    color: var(--text-strong) !important;
    box-shadow: none !important;
}

.hero-section .sb-search-input:focus,
.hero-section .sb-area-input:focus {
    border-color: var(--focus-border) !important;
    box-shadow: 0 0 0 3px rgba(var(--focus-rgb), 0.15) !important;
}

.hero-section .sb-search-icon { color: var(--action) !important; font-size: 16px; left: 16px; }

.hero-section .sb-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-16);
}

.hero-section .sb-dropdown-trigger {
    height: 54px;
    padding: 0 var(--space-16);
    gap: var(--space-12);
    background: var(--surface);
    border: 1px solid var(--border-field);
    border-radius: var(--radius-8);
    transition: border-color 0.15s ease;
}

.hero-section .sb-custom-dropdown.open .sb-dropdown-trigger { border-color: var(--brand); }

@media (hover: hover) {

.hero-section .sb-dropdown-trigger:hover { border-color: var(--brand); }
}

.hero-section .sb-field-stack {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.hero-section .sb-dropdown-display,
.hero-section .sb-area-input {
    font: 400 15px/20px var(--font-sans) !important;
    color: var(--text-strong);
}

.hero-section .sb-dropdown-chevron { font-size: 14px; color: var(--text-default); }

.hero-section .sb-area-wrapper > .sb-field-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    pointer-events: none;
}

.hero-section .sb-area-input {
    height: 54px;
    padding: 20px 16px 6px 44px;
    background: var(--surface);
    border: 1px solid var(--border-field);
    border-radius: var(--radius-8);
    transition: border-color 0.15s ease;
}

@media (hover: hover) {

.hero-section .sb-area-input:hover { border-color: var(--brand); }
}

/* Near me (inside the main search bar, desktop only; tablet/mobile get it in the search sheet) */
.hero-section .sb-near-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    height: 36px;
    padding: 0 var(--space-16);
    background: var(--surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-max);
    color: var(--action);
    font: 600 14px/18px var(--font-sans);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {

.hero-section .sb-near-btn:hover { background: var(--brand-subtle); border-color: var(--brand); }
}

.hero-section .sb-near-btn--inline {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
}

/* Age group: label left, chips right */
.hero-section .sb-age-row {
    display: flex;
    align-items: center;
    gap: var(--space-24);
}

.hero-section .sb-age-title {
    flex-shrink: 0;
    font: 600 14px/18px var(--font-sans);
    color: var(--text-strong);
}

.hero-section .sb-age-checkboxes { flex-wrap: wrap; gap: var(--space-8); overflow: visible; }

/* Age chips follow the DS Chip */
.hero-section .sb-age-check-label span {
    display: inline-flex;
    align-items: center;
    height: var(--control-s);
    padding: 4px 16px;
    border-radius: var(--radius-max);
    border: 1px solid var(--border-default);
    background: var(--surface);
    color: var(--text-default);
    font: 400 14px/18px var(--font-sans);
}

@media (hover: hover) {

.hero-section .sb-age-check-label:hover span { border-color: var(--brand); color: var(--action); background: var(--surface); }
}

.hero-section .sb-age-check-label input[type="checkbox"]:checked + span {
    background: var(--brand-subtle);
    border: 2px solid var(--brand);
    padding: 4px 15px;
    color: var(--brand-strong);
    font-weight: 600;
    box-shadow: none;
}

.hero-section .sb-dropdown-panel {
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-8) !important;
    box-shadow: var(--shadow-m) !important;
}

/* SEARCH: 490×44 action pill, centred, half over the panel's bottom edge */
.hero-section .sb-action-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    padding: 0 !important;
    margin: var(--space-24) 0 calc(-1 * (var(--space-48) + var(--control-l) / 2)) !important;
    background: transparent !important;
}

.hero-section .sb-btn-search {
    justify-content: center;
    align-items: center;
    flex: 0 0 auto !important;
    width: 490px;
    max-width: 100%;
    height: var(--control-l);
    padding: 12px 24px !important;
    border-radius: var(--radius-max) !important;
    /* Same MyClevan brand treatment as the header Create Account button */
    background: var(--deep-blue) !important;
    border: 1px solid var(--deep-blue) !important;
    color: var(--fur-white) !important;
    font: 700 16px/20px var(--font-sans) !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(64, 89, 104, 0.24) !important;
    transform: none !important;
}

@media (hover: hover) {

.hero-section .sb-btn-search:hover {
    background: color-mix(in srgb, var(--deep-blue) 88%, white) !important;
    border-color: color-mix(in srgb, var(--deep-blue) 88%, white) !important;
}
}

.hero-section .sb-btn-search:focus-visible {
    outline: 2px solid var(--deep-blue);
    outline-offset: 2px;
}

.srt-bar-wrap { justify-content: flex-start; }

/* Phones: one scrollable row (Agoda chip rows) instead of wrapping a pill onto line two */
@media (max-width: 767.98px) {
    .srt-bar-wrap {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .srt-bar-wrap::-webkit-scrollbar { display: none; }
    .srt-bar-wrap > * { flex-shrink: 0; }
}

/* ── Tablet/mobile search: full-screen page from the right (search/area; .sb-sheet lives in brand.css) + bottom sheet (state) ── */
.sb-state-sheet-head,
.sb-state-sheet-foot { display: none; }

@media (max-width: 991.98px) {
    /* Near me lives in the sheet; fields are tap targets (readonly, set by home.js) */
    .hero-section .sb-near-btn--inline { display: none; }
    .hero-section .sb-search-input { padding-right: var(--space-16) !important; }
    .hero-section .sb-search-input,
    .hero-section .sb-area-input { cursor: pointer; }

    body:has(#sbStatePanel.open) { overflow: hidden; }

    .sb-state-sheet-close {
        position: absolute;
        top: 50%;
        right: var(--space-8);
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 50%;
        background: none;
        color: var(--action);
        font-size: 20px;
    }

    .sb-state-sheet-close:active { background: var(--background); }

    .sb-state-sheet-title {
        margin: 0;
        font: 600 17px/22px var(--font-mobile);
        color: var(--text-strong);
    }

    /* State: bottom sheet rising from the bottom; !important beats positionPanelFixed's inline styles */
    body:has(#sbStatePanel.open)::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 99998;
        background: rgba(4, 7, 10, 0.45);
        animation: sb-fade-in 0.2s ease-out;
    }

    #sbStatePanel {
        top: auto !important;
        bottom: 0;
        left: 0 !important;
        right: 0;
        width: 100% !important;
        min-width: 0;
        max-height: 85vh;
        max-height: 85dvh;
        padding: 0 0 env(safe-area-inset-bottom);
        border: 0;
        border-radius: var(--radius-16) var(--radius-16) 0 0;
        box-shadow: 0 -4px 16px rgba(4, 7, 10, 0.16);
        overflow: hidden;
        font-family: var(--font-mobile);
    }

    #sbStatePanel.open {
        display: flex;
        flex-direction: column;
        animation: sb-sheet-up 0.36s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .sb-state-sheet-head {
        position: relative;
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        height: 56px;
        border-bottom: 1px solid var(--border-default);
    }

    #sbStatePanel .sb-states-grid {
        display: block;
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0 var(--space-16);
    }

    #sbStatePanel .sb-state-check-label {
        justify-content: space-between;
        gap: var(--space-12);
        padding: var(--space-16) var(--space-4);
        border-bottom: 1px solid var(--border-default);
        border-radius: 0;
        font: 400 16px/20px var(--font-mobile);
        color: var(--text-strong);
    }

    #sbStatePanel .sb-state-check-label:last-child { border-bottom: 0; }
    @media (hover: hover) {
    #sbStatePanel .sb-state-check-label:hover { background: none; }
    }

    #sbStatePanel .sb-state-check-label input[type="checkbox"] {
        order: 2;
        width: 20px;
        height: 20px;
        accent-color: var(--action);
    }

    #sbStatePanel .sb-state-check-label input[type="checkbox"]:checked ~ span { color: var(--action); }

    .sb-state-sheet-foot {
        display: block;
        flex-shrink: 0;
        padding: var(--space-12) var(--space-16);
        border-top: 1px solid var(--border-default);
    }

    .sb-state-sheet-done {
        width: 100%;
        height: var(--control-m);
        border: 0;
        border-radius: var(--radius-max);
        background: var(--deep-blue);
        color: var(--fur-white);
        font: 700 14px/20px var(--font-mobile);
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
}

@keyframes sb-sheet-up { from { transform: translateY(100%); } }
@keyframes sb-fade-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    #sbStatePanel.open,
    body:has(#sbStatePanel.open)::before { animation: none; }
}

@media (max-width: 767.98px) {
    .hero-section.hero-with-slideshow { padding: calc(var(--header-mobile) + 24px) 0 var(--space-24) !important; }

    .hero-section.hero-with-slideshow .hero-slideshow,
    .hero-section.hero-with-slideshow .hero-overlay { height: calc(var(--header-mobile) + 200px); }

    .hero-section h1,
    .hero-section .hero-line-primary { font-size: 24px !important; line-height: 30px !important; }
    .hero-section .hero-line-secondary { font-size: 16px !important; line-height: 20px !important; }

    .hero-section .search-box {
        /* top padding clears the raised tab, same as desktop */
        padding: var(--space-32) var(--space-12) var(--space-12) !important;
        border-radius: var(--radius-8) !important;
        margin-bottom: 0;
        font-family: var(--font-mobile);
    }

    .hero-section .sb-tab {
        padding: 0 var(--space-16);
        font-size: 14px;
    }

    /* Fields: no labels/icons, compact boxes */
    .hero-section .sb-fields-row .sb-field-icon,
    .hero-section .sb-field-label,
    .hero-section .sb-near-btn--inline { display: none; }

    .hero-section .sb-search-input {
        height: var(--field-mobile) !important;
        padding: 0 12px 0 40px !important;
        border-radius: var(--radius-8) !important;
        font-size: 16px !important;
    }

    .hero-section .sb-search-icon { left: 14px; color: var(--text-subtle) !important; }

    .hero-section .sb-fields-row { gap: var(--space-8); margin-bottom: var(--space-8); }

    .hero-section .sb-dropdown-trigger,
    .hero-section .sb-area-input {
        height: var(--field-mobile);
        padding: 0 var(--space-12);
        border-radius: var(--radius-8);
    }

    .hero-section .sb-area-input { font-size: 16px !important; }

    /* typed text stays 16px so iOS doesn't zoom on focus; only the hint shrinks */
    .hero-section .sb-search-input::placeholder,
    .hero-section .sb-area-input::placeholder { font-size: 14px; }
    .hero-section .sb-dropdown-display { font-size: 14px !important; }

    /* Age group: label on top, chips scroll sideways */
    .hero-section .sb-age-row { flex-direction: column; align-items: stretch; gap: var(--space-8); }

    .hero-section .sb-age-checkboxes {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .hero-section .sb-age-checkboxes::-webkit-scrollbar { display: none; }
    .hero-section .sb-age-check-label { flex-shrink: 0; }

    /* Button straddles the panel's bottom edge, like desktop */
    .hero-section .search-box { margin-bottom: calc(var(--control-m) / 2); }
    .hero-section .sb-action-row { margin: var(--space-16) 0 calc(-1 * (var(--space-12) + var(--control-m) / 2)) !important; }

    .hero-section .sb-btn-search {
        width: 75%;
        height: var(--control-m);
        padding: 0 var(--space-16) !important;
        font-size: 14px !important;
    }
}

/* Section heads: left-aligned heading-xl, tight to content (more results per screen) */
.reviews-section { padding: 0 0 var(--space-16) !important; background: var(--background); }

.reviews-section > .container > h2 {
    text-align: left !important;
    font: 600 24px/29px var(--font-sans) !important;
    margin-bottom: var(--space-8) !important;
}

.reviews-section > .container > h2 i { display: none; }

.reviews-section > .container > h2 + p.text-muted {
    text-align: left !important;
    font: 400 14px/18px var(--font-sans) !important;
    margin-bottom: var(--space-12) !important;
}

/* Sort pills and explore filter bar follow the DS Chip */
.srt-bar-label { font: 600 14px/18px var(--font-sans); color: var(--text-subtle); }

.srt-pill {
    height: var(--control-m);
    padding: 4px 16px !important;
    border-radius: var(--radius-max) !important;
    border: 1px solid var(--border-default) !important;
    background: var(--surface) !important;
    color: var(--text-default) !important;
    font: 400 14px/18px var(--font-sans) !important;
    box-shadow: none !important;
}

.srt-pill--active {
    background: var(--brand-subtle) !important;
    border: 2px solid var(--brand) !important;
    padding: 4px 15px !important;
    color: var(--brand-strong) !important;
}

.efb-bar {
    background: var(--surface) !important;
    border: 1px solid var(--border-field) !important;
    border-radius: var(--radius-8) !important;
    box-shadow: none !important;
}

.efb-seg-label { font: 400 12px/15px var(--font-sans) !important; color: var(--text-subtle) !important; text-transform: none !important; letter-spacing: 0 !important; }
.efb-seg-val { font: 600 14px/18px var(--font-sans) !important; color: var(--text-strong) !important; }
.efb-sep { background: var(--border-field) !important; }

.efb-filter-btn {
    height: var(--control-m);
    border-radius: var(--radius-max) !important;
    background: var(--action) !important;
    color: var(--text-inverted) !important;
    font: 600 14px/18px var(--font-sans) !important;
    box-shadow: none !important;
}

.efb-drop {
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-8) !important;
    box-shadow: var(--shadow-m) !important;
}



@media (max-width: 599.98px) {
    .reviews-section > .container > h2 { font-size: 20px !important; line-height: 24px !important; }
}

/* Homepage review cards keep their original (pre-design-system) look:
   restore the legacy palette and Bootstrap values inside each card. */
.reviews-section .review-card {
    --primary-yellow: #FFD700;
    --primary-yellow-light: #FFF8DC;
    --primary-yellow-dark: #FFA500;
    --primary-orange: #FF8C00;
    --primary-orange-light: #FFE4B5;
    --primary-orange-dark: #FF6347;
    --primary-blue: #4FA3F7;
    --primary-blue-dark: #2d7dd2;
    --yellow-light: #FFFACD;
    --yellow-medium: #FFD700;
    --yellow-dark: #FFA500;
    --orange-light: #FFE4B5;
    --orange-medium: #FF8C00;
    --orange-dark: #FF6347;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-heading: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --letter-spacing-heading: -0.02em;
    --bs-primary: #0d6efd;
    --bs-primary-rgb: 13, 110, 253;
    --bs-body-color: #212529;
    --bs-body-color-rgb: 33, 37, 41;
    --bs-link-color: #0d6efd;
    --bs-link-color-rgb: 13, 110, 253;
    --bs-link-hover-color: #0a58ca;
    --bs-border-color: #dee2e6;
    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    color: #2c3e50;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
