/**
 * هلا قوانجوا — Homepage Styles
 * Silk & Steel Narrative
 * Loaded ONLY on front-page.php (conditional enqueue)
 * Version: 1.0.0
 *
 * Sections:
 *  1. Hero Section
 *  2. Category Quick Access
 *  3. Place Cards Grid (shared)
 *  4. Section Headers
 *  5. Featured Sections (Places, Restaurants, Markets, Exhibitions)
 *  6. Stats Bar (Trust Strip)
 *  7. Map Preview CTA
 *  8. Latest Articles
 *  9. CTA Section
 * 10. Responsive Overrides
 */


/* ============================================================
   1. HERO SECTION
   ============================================================ */

.hp-hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-deep-navy);
}

/* Background layers
   background-image is split from background shorthand so an inline
   style="background-image:url(photo)" on this element overrides only
   the image while background-size/position remain cover/center. */
.hp-hero__bg {
    position: absolute;
    inset: 0;
    background-color: #041926;
    /* Gradient fallback — replaced by photo when image file is present */
    background-image:
        radial-gradient(ellipse 80% 60% at 30% 60%, rgba(197, 160, 89, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(26, 46, 59, 0.95) 0%, transparent 70%),
        linear-gradient(150deg, #041926 0%, #1A2E3B 50%, #0e2030 100%);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Decorative layer: dot matrix + gold orb */
.hp-hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle at bottom left, rgba(197, 160, 89, 0.08) 0%, transparent 50%);
    background-size: 28px 28px, 500px 500px;
    background-position: 0 0, left bottom;
    pointer-events: none;
}

/* Dark overlay — ensures headline + search remain readable over the photo.
   Heavier in the upper-centre where content lives; lighter at edges
   so city lights and Canton Tower remain visible. */
.hp-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(4, 25, 38, 0.58) 0%,
        rgba(4, 25, 38, 0.62) 35%,
        rgba(26, 46, 59, 0.50) 60%,
        rgba(4, 25, 38, 0.78) 100%
    );
    pointer-events: none;
}

/* Mobile: shift focal point upward so Canton Tower stays visible */
@media (max-width: 768px) {
    .hp-hero__bg {
        background-position: 30% center;
    }
}

.hp-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 5rem 0 6rem;
}

.hp-hero__inner {
    max-width: 780px;
}

/* Location badge */
.hp-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.90);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-label-md);
    font-weight: var(--fw-medium);
    margin-bottom: 1.5rem;
}

.hp-hero__badge .material-symbols-outlined {
    font-size: 16px;
    color: var(--color-regal-gold);
}

/* Hero headline */
.hp-hero__title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: var(--fw-bold);
    color: var(--color-surface-white);
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hp-hero__title em {
    font-style: normal;
    color: var(--color-regal-gold);
}

.hp-hero__subtitle {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.70);
    line-height: var(--lh-relaxed);
    margin-bottom: 2.5rem;
    max-width: 580px;
}

/* Hero Search Form */
.hp-hero__search {
    display: flex;
    align-items: center;
    background: var(--color-surface-white);
    border-radius: var(--radius-full);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(197, 160, 89, 0.15);
    overflow: hidden;
    height: 60px;
    max-width: 620px;
    margin-bottom: 2.5rem;
    transition: box-shadow var(--transition-base);
}

.hp-hero__search:focus-within {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.30), 0 0 0 3px rgba(197, 160, 89, 0.30);
}

.hp-hero__search-icon {
    padding: 0 1rem 0 0.75rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

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

.hp-hero__search-input::placeholder {
    color: var(--color-text-light);
}

.hp-hero__search-btn {
    height: 100%;
    padding: 0 1.75rem;
    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-bold);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: background-color var(--transition-fast);
    flex-shrink: 0;
}

.hp-hero__search-btn:hover {
    background: var(--color-regal-gold-lt);
}

/* Hero Trust Row — compact 4-item bar below search */
.hp-hero__trust {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.hp-hero__trust-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 1rem 0.35rem 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.hp-hero__trust-item:not(:last-child) {
    border-left: 1px solid rgba(197, 160, 89, 0.25);
    padding-left: 1rem;
    margin-left: 0;
}

.hp-hero__trust-item:first-child {
    padding-right: 1rem;
    padding-left: 0;
}

.hp-hero__trust-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

@media (max-width: 540px) {
    .hp-hero__trust {
        gap: 0.5rem 0;
    }
    .hp-hero__trust-item {
        font-size: 0.9rem;
        padding: 0.25rem 0.6rem 0.25rem 0;
        border-left: none !important;
    }
    .hp-hero__trust-item:not(:last-child) {
        padding-left: 0;
    }
}

/* Hero Scroll Indicator */
.hp-hero__scroll {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    text-decoration: none;
    z-index: 3;
    animation: hero-scroll-bob 2s ease-in-out infinite;
}

.hp-hero__scroll .material-symbols-outlined {
    font-size: 22px;
    color: var(--color-regal-gold, #C5A059);
    opacity: 0.8;
}

.hp-hero__scroll:hover {
    color: rgba(255, 255, 255, 0.85);
}

.hp-hero__scroll:hover .material-symbols-outlined {
    opacity: 1;
}

@keyframes hero-scroll-bob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(5px); }
}

@media (max-width: 768px) {
    .hp-hero__scroll {
        bottom: 1rem;
    }
}

/* Hero quick links */
.hp-hero__quick-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hp-hero__quick-label {
    font-size: var(--fs-label-md);
    color: rgba(255, 255, 255, 0.50);
    flex-shrink: 0;
}

.hp-hero__quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    font-size: var(--fs-label-sm);
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.hp-hero__quick-link:hover {
    background: rgba(197, 160, 89, 0.15);
    border-color: rgba(197, 160, 89, 0.40);
    color: var(--color-regal-gold);
}

/* Hero stats */
.hp-hero__stats {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: rgba(4, 25, 38, 0.70);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 0;
    z-index: 3;
}

.hp-hero__stats-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.hp-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0 2.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.hp-hero__stat:last-child {
    border-left: none;
}

.hp-hero__stat-num {
    font-size: var(--fs-headline-md);
    font-weight: var(--fw-bold);
    color: var(--color-regal-gold);
    line-height: 1;
}

.hp-hero__stat-label {
    font-size: var(--fs-caption);
    color: rgba(255, 255, 255, 0.55);
    font-weight: var(--fw-medium);
}


/* ============================================================
   2. SECTION HEADER (shared utility)
   ============================================================ */

.hp-section {
    padding: var(--spacing-section) 0;
}

.hp-section--alt {
    background: var(--color-warm-sand-lt);
}

.hp-section--dark {
    background: var(--color-deep-navy);
    color: var(--color-surface-white);
}

.hp-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hp-section-header__left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hp-section-header__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-label-md);
    font-weight: var(--fw-semibold);
    color: var(--color-regal-gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hp-section-header__eyebrow::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 3px;
    background: var(--color-regal-gold);
    border-radius: var(--radius-full);
}

.hp-section-header__title {
    font-size: var(--fs-headline-lg);
    font-weight: var(--fw-semibold);
    color: var(--color-deep-navy);
    line-height: var(--lh-snug);
    margin: 0;
}

.hp-section--dark .hp-section-header__title {
    color: var(--color-surface-white);
}

.hp-section-header__subtitle {
    font-size: var(--fs-body-md);
    color: var(--color-text-muted);
    margin: 0;
}

.hp-section--dark .hp-section-header__subtitle {
    color: rgba(255, 255, 255, 0.60);
}

.hp-section-header__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--fs-label-md);
    font-weight: var(--fw-semibold);
    color: var(--color-regal-gold);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: gap var(--transition-fast), color var(--transition-fast);
}

.hp-section-header__link:hover {
    gap: 0.625rem;
    color: var(--color-gold-muted);
}

.hp-section-header__link .material-symbols-outlined {
    font-size: 18px;
    transition: transform var(--transition-fast);
}

.hp-section--dark .hp-section-header__link {
    color: var(--color-regal-gold);
}


/* ============================================================
   3. CATEGORY QUICK ACCESS GRID
   ============================================================ */

.hp-cats {
    background: var(--color-surface-white);
}

.hp-cats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.hp-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1.5rem 0.75rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: background-color var(--transition-base),
                border-color var(--transition-base),
                transform var(--transition-fast),
                box-shadow var(--transition-base);
    text-align: center;
}

.hp-cat-card:hover {
    background: var(--color-warm-sand);
    border-color: var(--color-regal-gold);
    color: var(--color-deep-navy);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.hp-cat-card.is-active {
    background: var(--color-deep-navy);
    border-color: var(--color-deep-navy);
    color: var(--color-surface-white);
}

.hp-cat-card.is-active .hp-cat-card__icon {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-regal-gold);
}

.hp-cat-card__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: rgba(26, 46, 59, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-deep-navy);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.hp-cat-card:hover .hp-cat-card__icon {
    background: rgba(197, 160, 89, 0.15);
    color: var(--color-regal-gold);
}

.hp-cat-card__icon .material-symbols-outlined {
    font-size: 24px;
}

.hp-cat-card__name {
    font-size: var(--fs-label-md);
    font-weight: var(--fw-semibold);
    line-height: 1.3;
}

.hp-cat-card__count {
    font-size: var(--fs-caption);
    color: var(--color-text-muted);
}

.hp-cat-card:hover .hp-cat-card__count {
    color: var(--color-text-muted);
}


/* ============================================================
   4. PLACE CARDS GRID (homepage variant)
   ============================================================ */

.hp-places-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.hp-places-grid--4col {
    grid-template-columns: repeat(4, 1fr);
}

.hp-places-grid--2col {
    grid-template-columns: repeat(2, 1fr);
}

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

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

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

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

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

.hp-place-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e2dc, #f4ede4);
    color: var(--color-text-light);
}

.hp-place-card__img-placeholder .material-symbols-outlined {
    font-size: 48px;
    opacity: 0.4;
}

.hp-place-card__cat-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(26, 46, 59, 0.80);
    backdrop-filter: blur(6px);
    color: var(--color-surface-white);
    border-radius: var(--radius-full);
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    line-height: 1.4;
}

.hp-place-card__body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.hp-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;
    margin: 0;
}

.hp-place-card__excerpt {
    font-size: var(--fs-label-md);
    color: var(--color-text-muted);
    line-height: var(--lh-relaxed);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.hp-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;
}

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

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

.hp-place-card__cta {
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    color: var(--color-regal-gold);
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.hp-place-card__cta .material-symbols-outlined {
    font-size: 14px;
}

/* Large featured card (first item) */
.hp-place-card--featured {
    grid-column: span 2;
    flex-direction: row;
}

.hp-place-card--featured .hp-place-card__img-wrap {
    width: 45%;
    min-width: 45%;
    aspect-ratio: unset;
    border-radius: 0;
}

.hp-place-card--featured .hp-place-card__body {
    padding: 1.5rem;
    justify-content: center;
}

.hp-place-card--featured .hp-place-card__title {
    font-size: var(--fs-headline-md);
    -webkit-line-clamp: 3;
}

.hp-place-card--featured .hp-place-card__excerpt {
    -webkit-line-clamp: 3;
}


/* ============================================================
   5. STATS BAR (Trust Strip)
   ============================================================ */

.hp-stats {
    background: var(--color-deep-navy);
    padding: 2.5rem 0;
}

.hp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.hp-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.10);
    text-align: center;
}

.hp-stat-item:last-child {
    border-left: none;
}

.hp-stat-item__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(197, 160, 89, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.hp-stat-item__icon .material-symbols-outlined {
    font-size: 22px;
    color: var(--color-regal-gold);
}

.hp-stat-item__num {
    font-size: var(--fs-headline-lg);
    font-weight: var(--fw-bold);
    color: var(--color-regal-gold);
    line-height: 1;
}

.hp-stat-item__label {
    font-size: var(--fs-label-md);
    color: rgba(255, 255, 255, 0.60);
}


/* ============================================================
   6. MAP PREVIEW CTA
   ============================================================ */

.hp-map {
    background: var(--color-navy-dark);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.hp-map__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 60% 50%, rgba(197, 160, 89, 0.06) 0%, transparent 70%),
        linear-gradient(150deg, #041926, #0d2233);
    pointer-events: none;
}

/* Decorative grid lines */
.hp-map__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.hp-map__content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hp-map__text {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hp-map__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-label-md);
    font-weight: var(--fw-semibold);
    color: var(--color-regal-gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hp-map__title {
    font-size: var(--fs-headline-xl);
    font-weight: var(--fw-bold);
    color: var(--color-surface-white);
    line-height: var(--lh-snug);
    margin: 0;
}

.hp-map__desc {
    font-size: var(--fs-body-md);
    color: rgba(255, 255, 255, 0.60);
    line-height: var(--lh-relaxed);
    margin: 0;
}

.hp-map__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hp-map__visual {
    position: relative;
}

.hp-map__preview {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Simulated map grid */
.hp-map__preview-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(197, 160, 89, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197, 160, 89, 0.06) 1px, transparent 1px);
    background-size: 30px 30px;
}

.hp-map__pins {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.hp-map__pin-cluster {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hp-map__pin {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: rgba(197, 160, 89, 0.15);
    border: 1px solid rgba(197, 160, 89, 0.30);
    border-radius: var(--radius-full);
    font-size: var(--fs-caption);
    color: var(--color-regal-gold);
}

.hp-map__pin .material-symbols-outlined {
    font-size: 14px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.hp-map__pin--main {
    background: var(--color-regal-gold);
    color: var(--color-deep-navy);
    border-color: var(--color-regal-gold);
    font-weight: var(--fw-bold);
    font-size: var(--fs-label-sm);
    padding: 0.5rem 1.25rem;
}

.hp-map__pin--main .material-symbols-outlined {
    color: var(--color-deep-navy);
}

.hp-map__cta-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 25, 38, 0.50);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-xl);
    z-index: 3;
    text-decoration: none;
    transition: background-color var(--transition-base);
}

.hp-map__cta-overlay:hover {
    background: rgba(4, 25, 38, 0.40);
}


/* ============================================================
   7. ARTICLES SECTION
   ============================================================ */

.hp-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

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

.hp-article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}

.hp-article-card__img-wrap {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-warm-sand);
}

.hp-article-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    display: block;
}

.hp-article-card:hover .hp-article-card__img {
    transform: scale(1.05);
}

.hp-article-card__img-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-light);
}

.hp-article-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    flex: 1;
}

.hp-article-card__tag {
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    color: var(--color-regal-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hp-article-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;
    margin: 0;
}

.hp-article-card__excerpt {
    font-size: var(--fs-label-md);
    color: var(--color-text-muted);
    line-height: var(--lh-relaxed);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    flex: 1;
}

.hp-article-card__date {
    font-size: var(--fs-caption);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border-top: 1px solid var(--color-border);
    padding-top: 0.75rem;
    margin-top: auto;
}

.hp-article-card__date .material-symbols-outlined {
    font-size: 14px;
}


/* ============================================================
   8. CTA SECTION
   ============================================================ */

.hp-cta {
    background: var(--color-warm-sand);
    padding: 3rem 0;
}

.hp-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: var(--color-deep-navy);
    border-radius: var(--radius-2xl);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.hp-cta__inner::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.08);
    pointer-events: none;
}

.hp-cta__text {
    position: relative;
    z-index: 1;
}

.hp-cta__title {
    font-size: var(--fs-headline-lg);
    font-weight: var(--fw-bold);
    color: var(--color-surface-white);
    margin: 0 0 0.5rem;
}

.hp-cta__subtitle {
    font-size: var(--fs-body-md);
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

.hp-cta__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}


/* ============================================================
   9. SCROLL REVEAL ANIMATION
   ============================================================ */

@keyframes hp-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hp-reveal {
    opacity: 0;
    transform: translateY(24px);
}

.hp-reveal.is-visible {
    animation: hp-fade-in-up 0.6s ease-out forwards;
}

.hp-reveal-delay-1 { animation-delay: 0.1s; }
.hp-reveal-delay-2 { animation-delay: 0.2s; }
.hp-reveal-delay-3 { animation-delay: 0.3s; }


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

@media (max-width: 1024px) {
    .hp-cats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hp-places-grid--4col {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-map__content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hp-map__visual {
        order: -1;
    }

    .hp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-stat-item:nth-child(2) {
        border-left: none;
    }

    .hp-place-card--featured {
        grid-column: span 1;
        flex-direction: column;
    }

    .hp-place-card--featured .hp-place-card__img-wrap {
        width: 100%;
        min-width: unset;
        aspect-ratio: 4/3;
    }
}

@media (max-width: 768px) {
    .hp-hero {
        min-height: 100svh;
    }

    .hp-hero__stats {
        position: relative;
        bottom: auto;
        margin-top: 2rem;
        border-radius: var(--radius-xl);
        border: 1px solid rgba(255,255,255,0.10);
    }

    .hp-hero__stat {
        padding: 0.75rem 1.5rem;
    }

    .hp-hero__stat-num {
        font-size: var(--fs-headline-md);
    }

    .hp-cats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .hp-places-grid,
    .hp-places-grid--4col {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-articles-grid {
        grid-template-columns: 1fr;
    }

    .hp-cta__inner {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .hp-cta__actions {
        justify-content: center;
    }

    .hp-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .hp-stat-item {
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.10);
    }

    .hp-stat-item:nth-child(odd) {
        border-left: none;
    }
}

/* Tablet: reduce excessive hero height at 681–1024px (includes iPad portrait/landscape).
   Placed AFTER the max-768 block so it wins at 768px where 100svh would otherwise apply. */
@media (min-width: 681px) and (max-width: 1024px) {
    .hp-hero {
        min-height: 68vh;
    }
    .hp-hero__content {
        padding: 3.5rem 0 4rem;
    }
}

@media (max-width: 480px) {
    .hp-cats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-places-grid,
    .hp-places-grid--4col,
    .hp-places-grid--2col {
        grid-template-columns: 1fr;
    }

    .hp-hero__search {
        height: 52px;
    }

    .hp-hero__search-icon {
        padding: 0 0.625rem 0 0.5rem; /* narrow icon area on small phones */
    }

    .hp-hero__search-input {
        min-width: 0; /* allow flex shrink — fixes RTL button overflow at 320-414px */
    }

    .hp-hero__search-btn {
        padding: 0 1.25rem;
        font-size: var(--fs-caption);
    }

    .hp-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hp-map__content {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   INTERACTIVE MAP SECTION (.hp-imap) — Phase 2 Fix
   Replaces the static .hp-map preview with a real Leaflet map
   ============================================================ */

.hp-imap {
    padding: var(--spacing-section) 0;
    background: var(--color-background, #f8f9fa);
}

/* Category filter bar */
.hp-imap__filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.hp-imap__filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: var(--fs-label-sm, 0.875rem);
    font-weight: var(--fw-medium, 500);
    font-family: var(--font-primary, 'IBM Plex Sans Arabic', sans-serif);
    border-radius: var(--radius-full, 9999px);
    border: 1.5px solid var(--color-border, #e0e0e0);
    background: var(--color-surface-white, #fff);
    color: var(--color-text-muted, #5C6B73);
    cursor: pointer;
    transition: background var(--transition-fast, 0.15s),
                color var(--transition-fast, 0.15s),
                border-color var(--transition-fast, 0.15s);
    white-space: nowrap;
}

.hp-imap__filter-btn .material-symbols-outlined {
    font-size: 16px;
}

.hp-imap__filter-btn:hover {
    background: var(--color-warm-sand, #F4EDE4);
    border-color: var(--color-regal-gold, #C5A059);
    color: var(--color-deep-navy, #1A2E3B);
}

.hp-imap__filter-btn.is-active {
    background: var(--color-deep-navy, #1A2E3B);
    border-color: var(--color-deep-navy, #1A2E3B);
    color: var(--color-surface-white, #fff);
}

/* Leaflet map container */
.hp-imap__canvas {
    width: 100%;
    height: 480px;
    border-radius: var(--radius-xl, 16px);
    overflow: hidden;
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(26,46,59,0.12));
    border: 1px solid var(--color-border, #e0e0e0);
    background: var(--color-warm-sand, #F4EDE4);
}

/* Legend row */
.hp-imap__legend {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.875rem;
    font-size: var(--fs-caption, 0.8125rem);
    color: var(--color-text-muted, #5C6B73);
}

.hp-imap__legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.hp-imap__legend-item .material-symbols-outlined {
    font-size: 16px;
    color: var(--color-regal-gold, #C5A059);
}

/* ── Leaflet custom marker ── */
.hp-map-marker {
    background: transparent !important;
    border: none !important;
}

.hp-map-marker__inner {
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--color-deep-navy, #1A2E3B);
    border: 2px solid var(--color-regal-gold, #C5A059);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(26,46,59,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hp-map-marker__inner .material-symbols-outlined {
    font-size: 18px;
    color: var(--color-regal-gold, #C5A059);
    transform: rotate(45deg);
}

.hp-map-marker__inner--main {
    background: var(--color-regal-gold, #C5A059);
}

.hp-map-marker__inner--main .material-symbols-outlined {
    color: var(--color-deep-navy, #1A2E3B);
}

/* ── Map popup ── */
.hp-map-popup-wrap .leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(26,46,59,0.15);
    border: 1px solid var(--color-border, #e0e0e0);
}

.hp-map-popup-wrap .leaflet-popup-content {
    margin: 0;
    width: 260px !important;
}

.hp-map-popup-wrap .leaflet-popup-tip-container {
    margin-top: -1px;
}

.hp-map-popup {
    direction: rtl;
    font-family: var(--font-primary, 'IBM Plex Sans Arabic', sans-serif);
}

.hp-map-popup__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.hp-map-popup__img-placeholder {
    width: 100%;
    height: 140px;
    background: var(--color-warm-sand, #F4EDE4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted, #5C6B73);
}

.hp-map-popup__img-placeholder .material-symbols-outlined {
    font-size: 36px;
    opacity: 0.4;
}

.hp-map-popup__body {
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.hp-map-popup__cat {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-regal-gold, #C5A059);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hp-map-popup__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-primary, #0F171C);
    margin: 0;
    line-height: 1.35;
}

.hp-map-popup__link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-deep-navy, #1A2E3B);
    text-decoration: none;
    margin-top: 0.25rem;
    transition: color 0.15s;
}

.hp-map-popup__link:hover {
    color: var(--color-regal-gold, #C5A059);
}

.hp-map-popup__link .material-symbols-outlined {
    font-size: 16px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hp-imap__canvas {
        height: 360px;
    }

    .hp-imap__filter {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hp-imap__filter::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 480px) {
    .hp-imap__canvas {
        height: 300px;
    }
}
