/**
 * هلا قوانجوا — Component Library
 * Silk & Steel Narrative
 * Version: 1.0.0
 *
 * Table of Contents:
 *  1. Buttons
 *  2. Badges / Tags
 *  3. Cards (Place Card)
 *  4. Header / TopNavBar (C-01)
 *  5. Mobile Menu
 *  6. Mobile Bottom Nav (C-03)
 *  7. Footer (C-02)
 *  8. Search Bar
 *  9. Rating Stars
 * 10. Price Level
 */


/* ============================================================
   1. BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;       /* 10px 24px */
    font-family: var(--font-primary);
    font-size: var(--fs-label-md);
    font-weight: var(--fw-semibold);
    line-height: 1;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background var(--transition-base),
                color var(--transition-base),
                border-color var(--transition-base),
                transform var(--transition-fast),
                box-shadow var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    -webkit-user-select: none;
    user-select: none;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus-visible {
    outline: 2px solid var(--color-regal-gold);
    outline-offset: 2px;
}

/* Primary — Deep Navy fill */
.btn-primary {
    background-color: var(--color-deep-navy);
    color: var(--color-surface-white);
    border-color: var(--color-deep-navy);
}
.btn-primary:hover {
    background-color: var(--color-navy-mid);
    border-color: var(--color-navy-mid);
    color: var(--color-surface-white);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Gold — Regal Gold fill */
.btn-gold {
    background-color: var(--color-regal-gold);
    color: var(--color-deep-navy);
    border-color: var(--color-regal-gold);
}
.btn-gold:hover {
    background-color: var(--color-regal-gold-lt);
    border-color: var(--color-regal-gold-lt);
    color: var(--color-deep-navy);
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

/* Outline — Navy border */
.btn-outline {
    background-color: transparent;
    color: var(--color-deep-navy);
    border-color: var(--color-deep-navy);
}
.btn-outline:hover {
    background-color: var(--color-deep-navy);
    color: var(--color-surface-white);
    transform: translateY(-1px);
}

/* Outline Gold */
.btn-outline-gold {
    background-color: transparent;
    color: var(--color-regal-gold);
    border-color: var(--color-regal-gold);
}
.btn-outline-gold:hover {
    background-color: var(--color-regal-gold);
    color: var(--color-deep-navy);
    transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
    background-color: transparent;
    color: var(--color-deep-navy);
    border-color: transparent;
}
.btn-ghost:hover {
    background-color: var(--color-warm-sand);
    color: var(--color-deep-navy);
}

/* Ghost inverse (on dark bg) */
.btn-ghost-inverse {
    background-color: transparent;
    color: rgba(255,255,255,0.80);
    border-color: transparent;
}
.btn-ghost-inverse:hover {
    background-color: rgba(255,255,255,0.10);
    color: var(--color-surface-white);
}

/* WhatsApp */
.btn-whatsapp {
    background-color: var(--color-whatsapp);
    color: var(--color-surface-white);
    border-color: var(--color-whatsapp);
}
.btn-whatsapp:hover {
    background-color: #128C7E;
    border-color: #128C7E;
    color: var(--color-surface-white);
    transform: translateY(-1px);
}

/* Sizes */
.btn-sm {
    padding: 0.375rem 1rem;
    font-size: var(--fs-label-sm);
}
.btn-lg {
    padding: 0.875rem 2rem;
    font-size: var(--fs-label-lg);
}
.btn-xl {
    padding: 1rem 2.5rem;
    font-size: var(--fs-body-md);
}

/* Full width */
.btn-block {
    display: flex;
    width: 100%;
}

/* Icon only */
.btn-icon {
    padding: 0.625rem;
    border-radius: var(--radius-full);
}


/* ============================================================
   2. BADGES / TAGS
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    border-radius: var(--radius-full);
    line-height: 1.4;
}

.badge-navy {
    background: rgba(26,46,59,0.10);
    color: var(--color-deep-navy);
}
.badge-gold {
    background: rgba(197,160,89,0.15);
    color: var(--color-gold-muted);
}
.badge-featured {
    background: linear-gradient(135deg, var(--color-regal-gold), #D4B578);
    color: var(--color-deep-navy);
    font-weight: var(--fw-bold);
}
.badge-new {
    background: var(--color-deep-navy);
    color: var(--color-surface-white);
}
.badge-category {
    background: var(--color-warm-sand);
    color: var(--color-text-primary);
}


/* ============================================================
   3. PLACE CARD (C-10)
   ============================================================ */

.place-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: inherit;
}

.place-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}

/* Card Image */
.place-card__image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-warm-sand);
}

.place-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.place-card:hover .place-card__image {
    transform: scale(1.06);
}

.place-card__badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
}

.place-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-warm-sand), var(--color-warm-sand-lt));
    color: var(--color-text-muted);
    font-size: 3rem;
}

/* Card Body */
.place-card__body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.place-card__category {
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    color: var(--color-regal-gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.place-card__title {
    font-size: var(--fs-title-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-primary);
    line-height: var(--lh-snug);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.place-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.place-card__district {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--fs-label-sm);
    color: var(--color-text-muted);
}

.place-card__district .material-symbols-outlined {
    font-size: 14px;
    color: var(--color-regal-gold);
}

/* Card Footer */
.place-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--color-border);
    gap: 0.5rem;
}

.place-card__rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--fs-label-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-primary);
}

.place-card__rating .material-symbols-outlined {
    font-size: 16px;
    color: var(--color-regal-gold);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.place-card__price {
    display: flex;
    gap: 2px;
    font-size: var(--fs-label-sm);
    color: var(--color-text-muted);
}

.place-card__price-dot {
    color: var(--color-regal-gold);
}

/* Horizontal card variant */
.place-card--horizontal {
    flex-direction: row;
    max-height: 140px;
}

.place-card--horizontal .place-card__image-wrap {
    width: 130px;
    min-width: 130px;
    aspect-ratio: unset;
    border-radius: 0;
}

.place-card--horizontal .place-card__body {
    padding: 0.875rem 1rem;
}

/* Compact card variant */
.place-card--compact .place-card__body {
    padding: 0.75rem 1rem;
}

.place-card--compact .place-card__title {
    font-size: var(--fs-body-md);
}


/* ============================================================
   4. HEADER / TOPNAVBAR (C-01)
   ============================================================ */

.site-header-v2 {
    position: sticky;
    top: 0;
    right: 0;
    left: 0;
    z-index: var(--z-sticky);
    height: var(--header-height);
    background-color: var(--color-surface-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition-base), background-color var(--transition-base);
}

.site-header-v2.is-scrolled {
    box-shadow: var(--shadow-sm);
}

.site-header-v2.is-transparent {
    background-color: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}

.header-inner-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 1.5rem;
}

/* Brand / Logo */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    flex-shrink: 0;
}

.header-brand:hover {
    opacity: 0.88;
}

.header-brand__logo {
    height: 40px;
    width: auto;
}

/*
 * Phase 7-E: WordPress custom-logo sizing system
 * the_custom_logo() outputs: <a class="custom-logo-link"><img class="custom-logo">
 * These rules apply to ALL contexts: header, mobile drawer, footer.
 */

/* ── Header / Drawer context ─────────────────────────── */
.custom-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0; /* removes inline-block gap under the img */
    text-decoration: none;
}

.custom-logo {
    height: 80px;
    width: auto;
    max-width: 280px;
    display: block;
    object-fit: contain;
}

/* Tablet */
@media (max-width: 1024px) {
    .custom-logo {
        height: 70px;
        max-width: 250px;
    }
}

/* Mobile header */
@media (max-width: 768px) {
    .custom-logo {
        height: 52px;
        max-width: 160px;
    }
}

/* Mobile drawer — more vertical space available */
.mobile-menu__header .custom-logo {
    height: 56px;
    max-width: 180px;
}

/* ── Footer context ──────────────────────────────────── */
/* Logo renders on dark navy (#041926) — keep natural colours */
.footer-brand__logo-wrap .custom-logo-link {
    line-height: 0;
}

.footer-brand__logo-wrap .custom-logo {
    height: 90px;
    max-width: 220px;
}

.header-brand__wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.header-brand__name {
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    color: var(--color-deep-navy);
    white-space: nowrap;
}

.header-brand__tagline {
    font-size: 0.6875rem;
    font-weight: var(--fw-regular);
    color: var(--color-regal-gold);
    letter-spacing: 0.02em;
    margin-top: 2px;
}

/* Desktop Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    justify-content: center;
}

.header-nav__menu {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
}

/* Both BEM fallback (.header-nav__item) and the assigned-WP-menu
   structure (.header-nav__menu .menu-item) share the same styling,
   since wp_nav_menu emits default .menu-item markup with no walker. */
.header-nav__item,
.header-nav__menu .menu-item {
    position: relative;
}

.header-nav__link,
.header-nav__menu .menu-item > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.875rem;
    font-size: var(--fs-label-md);
    font-weight: var(--fw-medium);
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    white-space: nowrap;
}

.header-nav__link:hover,
.header-nav__link:focus-visible,
.header-nav__menu .menu-item > a:hover,
.header-nav__menu .menu-item > a:focus-visible {
    color: var(--color-deep-navy);
    background-color: var(--color-warm-sand);
}

.header-nav__link.is-active,
.header-nav__menu .current-menu-item > a,
.header-nav__menu .current-menu-ancestor > a,
.header-nav__menu .current-menu-parent > a,
.header-nav__menu .current_page_item > a,
.header-nav__menu .menu-item > a[aria-current="page"] {
    color: var(--color-deep-navy);
    font-weight: var(--fw-semibold);
}

.header-nav__link.is-active::after,
.header-nav__menu .current-menu-item > a::after,
.header-nav__menu .current-menu-ancestor > a::after,
.header-nav__menu .current-menu-parent > a::after,
.header-nav__menu .current_page_item > a::after,
.header-nav__menu .menu-item > a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0.875rem;
    left: 0.875rem;
    height: 2px;
    background: var(--color-regal-gold);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}

/* Dropdown */
.header-nav__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: var(--color-surface-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition-fast),
                visibility var(--transition-fast),
                transform var(--transition-fast);
    z-index: var(--z-dropdown);
}

.header-nav__item:hover .header-nav__dropdown,
.header-nav__item:focus-within .header-nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-nav__dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: var(--fs-label-md);
    color: var(--color-text-primary);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    text-decoration: none;
}

.header-nav__dropdown-link:hover {
    background-color: var(--color-warm-sand);
    color: var(--color-deep-navy);
}

/* Header Tools (right side — RTL: left side visually) */
.header-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Search toggle button */
.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.header-search-btn:hover {
    color: var(--color-deep-navy);
    background-color: var(--color-warm-sand);
}

/* Search overlay */
.header-search-overlay {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(26, 46, 59, 0.6);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.header-search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.header-search-box {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    background: var(--color-surface-white);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem var(--container-padding);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-modal);
    transform: translateY(calc(-100% - 200px));   /* large buffer: ensures fully hidden above admin bar */
    pointer-events: none;
    transition: transform var(--transition-base);
}

.header-search-overlay.is-open + .header-search-box,
.header-search-box.is-open {
    transform: translateY(0);
    pointer-events: auto;
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 680px;
    margin: 0 auto;
}

.header-search-input {
    flex: 1;
    height: 48px;
    padding: 0 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: var(--fs-body-md);
    color: var(--color-text-primary);
    background: var(--color-background);
    transition: border-color var(--transition-fast);
    direction: rtl;
}

.header-search-input:focus {
    outline: none;
    border-color: var(--color-regal-gold);
}

.header-search-input::placeholder {
    color: var(--color-text-light);
}

/* Mobile menu toggle */
.header-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.header-menu-toggle:hover {
    background-color: var(--color-warm-sand);
}

.header-menu-toggle__line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-deep-navy);
    border-radius: var(--radius-full);
    transition: transform var(--transition-base), opacity var(--transition-base);
    transform-origin: center;
}

/* Animated X state */
.header-menu-toggle.is-active .header-menu-toggle__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.header-menu-toggle.is-active .header-menu-toggle__line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.header-menu-toggle.is-active .header-menu-toggle__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ============================================================
   5. MOBILE MENU (Slide-in drawer)
   ============================================================ */

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: var(--color-surface-white);
    z-index: var(--z-modal);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-2xl);
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 46, 59, 0.55);
    z-index: calc(var(--z-modal) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 0.875rem;
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.mobile-menu__close:hover {
    background-color: var(--color-warm-sand);
    color: var(--color-deep-navy);
}

.mobile-menu__nav {
    flex: 1;
    padding: 0.75rem;
}

.mobile-menu__nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: var(--fs-body-md);
    font-weight: var(--fw-medium);
    color: var(--color-text-primary);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    margin-bottom: 0.25rem;
}

.mobile-menu__nav-link:hover,
.mobile-menu__nav-link.is-active {
    background-color: var(--color-warm-sand);
    color: var(--color-deep-navy);
}

.mobile-menu__nav-link.is-active {
    font-weight: var(--fw-semibold);
}

.mobile-menu__nav-link .material-symbols-outlined {
    font-size: 22px;
    color: var(--color-regal-gold);
}

.mobile-menu__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    /* Height auto-expands to include iOS home bar safe area */
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    background: var(--color-surface-white);
    border-top: 1px solid var(--color-border);
    z-index: var(--z-fixed);
    box-shadow: 0 -4px 16px rgba(26,46,59,0.08);
    /* Safe-area blank space at very bottom, below the tap targets */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-bottom-nav__inner {
    /* Grid enforces exactly equal column widths — flex: 1 can drift
       when the elevated featured item affects sibling flexbox sizing */
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    height: var(--mobile-nav-height);
}

.mobile-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0.25rem;
    text-decoration: none;
    color: var(--color-text-light);
    font-size: 0.625rem;
    font-weight: var(--fw-medium);
    transition: color var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item.is-active {
    color: var(--color-deep-navy);
}

.mobile-bottom-nav__item.is-active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    color: var(--color-regal-gold);
}

.mobile-bottom-nav__item .material-symbols-outlined {
    font-size: 24px;
}

/* Featured center tab */
.mobile-bottom-nav__item--featured {
    position: relative;
    top: -12px;
}

.mobile-bottom-nav__item--featured .mobile-bottom-nav__icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-deep-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.mobile-bottom-nav__item--featured .material-symbols-outlined {
    color: var(--color-surface-white);
}

.mobile-bottom-nav__item--featured.is-active .mobile-bottom-nav__icon-wrap {
    background: var(--color-regal-gold);
}


/* ============================================================
   6. FOOTER (C-02)
   ============================================================ */

.site-footer-v2 {
    background-color: var(--color-navy-dark);
    color: rgba(255, 255, 255, 0.75);
    padding-top: 2.25rem;
}

/* Footer top section */
.footer-top {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

/* Footer brand column */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-brand__logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.footer-brand__logo {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.90;
}

.footer-brand__name {
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    color: var(--color-regal-gold);
    line-height: 1.1;
}

.footer-brand__name span {
    display: block;
    font-size: 0.6875rem;
    font-weight: var(--fw-regular);
    color: rgba(255,255,255,0.50);
    letter-spacing: 0.03em;
    margin-top: 2px;
}

.footer-brand__desc {
    font-size: var(--fs-label-md);
    color: rgba(255, 255, 255, 0.55);
    line-height: var(--lh-relaxed);
    max-width: 280px;
}

/* Social icons */
.footer-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.footer-social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: background-color var(--transition-fast),
                color var(--transition-fast),
                transform var(--transition-fast);
    font-size: 0.9rem;
}

.footer-social__link:hover {
    background: var(--color-regal-gold);
    color: var(--color-deep-navy);
    transform: translateY(-2px);
}

/* Footer columns */
.footer-col__title {
    font-size: var(--fs-label-md);
    font-weight: var(--fw-semibold);
    color: var(--color-regal-gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(197, 160, 89, 0.25);
}

.footer-col__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col__link {
    font-size: var(--fs-label-md);
    color: rgba(255, 255, 255, 0.60);
    text-decoration: none;
    transition: color var(--transition-fast), padding-right var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.footer-col__link:hover {
    color: var(--color-regal-gold);
    padding-right: 0.375rem;
}

.footer-col__link .material-symbols-outlined {
    font-size: 14px;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Footer bottom bar */
.footer-bottom {
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: 1rem;
}

.footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom__copy {
    font-size: var(--fs-caption);
    color: rgba(255, 255, 255, 0.35);
}

.footer-bottom__links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.footer-bottom__link {
    font-size: var(--fs-caption);
    color: rgba(255, 255, 255, 0.40);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-bottom__link:hover {
    color: var(--color-regal-gold);
}

/* Back to top */
.back-to-top-v2 {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;          /* RTL: left side */
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--color-deep-navy);
    color: var(--color-surface-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: var(--z-fixed);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition-base),
                visibility var(--transition-base),
                transform var(--transition-base),
                background-color var(--transition-fast);
}

.back-to-top-v2.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-v2:hover {
    background-color: var(--color-regal-gold);
    color: var(--color-deep-navy);
}


/* ============================================================
   7. SEARCH BAR
   ============================================================ */

/* Hero search (on homepage hero) */
.search-hero {
    display: flex;
    align-items: center;
    background: var(--color-surface-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    height: 60px;
    max-width: 640px;
    width: 100%;
}

.search-hero__input {
    flex: 1;
    height: 100%;
    padding: 0 1.5rem;
    border: none;
    font-family: var(--font-primary);
    font-size: var(--fs-body-md);
    color: var(--color-text-primary);
    background: transparent;
    direction: rtl;
}

.search-hero__input:focus {
    outline: none;
}

.search-hero__input::placeholder {
    color: var(--color-text-light);
}

.search-hero__btn {
    height: 100%;
    padding: 0 1.5rem;
    background: var(--color-regal-gold);
    color: var(--color-deep-navy);
    font-family: var(--font-primary);
    font-size: var(--fs-label-md);
    font-weight: var(--fw-semibold);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    transition: background-color var(--transition-fast);
}

.search-hero__btn:hover {
    background-color: var(--color-regal-gold-lt);
}


/* ============================================================
   8. RATING STARS
   ============================================================ */

.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star-rating__star {
    font-size: 16px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
    color: var(--color-border);
}

.star-rating__star.is-filled {
    color: var(--color-regal-gold);
}

.star-rating__star.is-half {
    /* Half star via gradient clip technique */
    background: linear-gradient(90deg, var(--color-regal-gold) 50%, var(--color-border) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star-rating__score {
    font-size: var(--fs-label-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-primary);
    margin-right: 0.25rem;
}

.star-rating__count {
    font-size: var(--fs-caption);
    color: var(--color-text-muted);
}


/* ============================================================
   9. PRICE LEVEL
   ============================================================ */

.price-level {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.price-level__dot {
    font-size: var(--fs-label-sm);
    color: var(--color-border-strong);
    line-height: 1;
    font-weight: var(--fw-bold);
}

.price-level__dot.is-active {
    color: var(--color-regal-gold);
}


/* ============================================================
   10. RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 1024px) {
    .header-nav {
        display: none;
    }

    .header-menu-toggle {
        display: flex;
    }

    /* Force-hide CTA on mobile/tablet regardless of JS resize state */
    #headerCtaBtn {
        display: none !important;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.5rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand__desc {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .site-header-v2 {
        height: var(--header-height-mob);
    }

    /* Tighten header inner gap on narrow screens — prevents logo+tools overflow */
    .header-inner-v2 {
        gap: 0.5rem;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-bottom__inner {
        flex-direction: column;
        text-align: center;
    }

    .search-hero {
        height: 52px;
    }

    .search-hero__btn {
        padding: 0 1.25rem;
        font-size: var(--fs-caption);
    }

    /* Back to top above mobile bottom nav */
    .back-to-top-v2 {
        bottom: calc(var(--mobile-nav-height) + 1rem);
    }
}

@media (max-width: 480px) {
    .place-card--horizontal {
        flex-direction: column;
        max-height: none;
    }

    .place-card--horizontal .place-card__image-wrap {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .footer-social {
        flex-wrap: wrap;
    }
}

/* ============================================================
   EXHIBITION CARDS  (.exh-card)
   Used on: homepage Section 8, exhibition archive, search results
   ============================================================ */

.exh-card {
    background: var(--color-white, #fff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.exh-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
}

/* Image area */
.exh-card__img-link {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-deep-navy, #1A2744);
}

.exh-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.exh-card:hover .exh-card__img {
    transform: scale(1.04);
}

.exh-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #041926 0%, #1A2E3B 100%);
    border-bottom: 3px solid var(--color-regal-gold, #C5A059);
}

.exh-card__img-placeholder .material-symbols-outlined {
    font-size: 48px;
    color: rgba(197, 160, 89, 0.55);
}

/* Badges */
.exh-badge {
    position: absolute;
    top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
}

/* Status badge — top-right (RTL: visually right) */
.exh-badge:first-of-type {
    inset-inline-start: 10px;
}

/* Industry / category badge — top-end (RTL: visually left) */
.exh-badge.exh-badge--industry,
.exh-badge.exh-badge--cat {
    inset-inline-end: 10px;
    inset-inline-start: auto;
}

/* ── Status badge colors ── */
.exh-badge--upcoming {
    background: rgba(202, 138, 4, 0.92);   /* amber */
    color: #fff;
}

.exh-badge--live {
    background: rgba(5, 150, 105, 0.95);   /* emerald */
    color: #fff;
    font-weight: 800;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.3);
}

.exh-badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    animation: exh-pulse 1.4s ease-in-out infinite;
}

.exh-badge__icon {
    font-style: normal;
    font-size: 0.75em;
    line-height: 1;
}

@keyframes exh-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.75); }
}

.exh-badge--ended {
    background: rgba(55, 65, 81, 0.85);    /* dark gray */
    color: rgba(255, 255, 255, 0.85);
}

.exh-badge--industry,
.exh-badge--cat {
    background: rgba(26, 39, 68, 0.82);
    color: rgba(255, 255, 255, 0.9);
}

/* ── Filter pill count ── */
.arc-filter-pill__count {
    font-size: 0.8em;
    opacity: 0.75;
    font-weight: 500;
}

/* ── Filter pill status dots ── */
.exh-pill-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.exh-pill-dot--live     { background: #059669; }
.exh-pill-dot--upcoming { background: #ca8a04; }
.exh-pill-dot--ended    { background: #6b7280; }

/* Card body */
.exh-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.exh-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-deep-navy, #1A2744);
    line-height: 1.45;
    margin: 0;
}

.exh-card__title a {
    color: inherit;
    text-decoration: none;
}

.exh-card__title a:hover {
    color: var(--color-regal-gold, #C5A059);
}

.exh-card__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.exh-card__date,
.exh-card__venue {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.82rem;
    color: #4b5563;
    line-height: 1.5;
}

.exh-card__date .material-symbols-outlined,
.exh-card__venue .material-symbols-outlined {
    font-size: 16px;
    color: var(--color-regal-gold, #C5A059);
    flex-shrink: 0;
    margin-top: 1px;
}

/* Details button */
.exh-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--color-regal-gold, #C5A059);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    align-self: flex-start;
}

.exh-card__btn:hover {
    background: #b08d45;
    transform: translateX(-2px);
}

.exh-card__btn .material-symbols-outlined {
    font-size: 17px;
}

/* ── Exhibition grid on homepage ── */
.hp-exh-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hp-exh-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .hp-exh-grid {
        grid-template-columns: 1fr;
    }

    .exh-card__body {
        padding: 14px 16px 16px;
    }
}

/* ── Chinese Websites Hub — Guide Cards ── */
.cw-hub-section { padding-block: 2rem 3rem; }
.cw-guide-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.cw-guide-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border: 1px solid var(--color-border, rgba(0,0,0,.08));
    border-radius: 14px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,.06));
}
.cw-guide-card:hover {
    border-color: var(--primary, #1E9BA6);
    box-shadow: 0 4px 18px rgba(30,155,166,.12);
    transform: translateY(-2px);
}
.cw-guide-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--color-warm-sand, #F4EFE6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.cw-guide-card__icon .material-symbols-outlined {
    font-size: 22px;
    color: var(--primary, #1E9BA6);
}
.cw-guide-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.cw-guide-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-deep-navy, #0D3B66);
    margin: 0;
    line-height: 1.4;
}
.cw-guide-card__desc {
    font-size: 0.85rem;
    color: var(--color-text-muted, #555);
    line-height: 1.6;
    margin: 0;
}
.cw-guide-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary, #1E9BA6);
    background: rgba(30,155,166,.08);
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    margin-top: 0.25rem;
    width: fit-content;
}
.cw-guide-card__stat .material-symbols-outlined { font-size: 14px; }
.cw-guide-card__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--color-warm-sand, #F4EFE6);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary, #1E9BA6);
}
.cw-guide-card__cta .material-symbols-outlined { font-size: 18px; }
@media (max-width: 480px) {
    .cw-guide-cards { grid-template-columns: 1fr; }
}
