/* City Edge Developments — Compact Architectural Luxury */
:root {
    --gold: #987123;
    --gold-bright: #b88c34;
    --gold-soft: rgba(152, 113, 35, 0.09);
    --gold-border: rgba(152, 113, 35, 0.25);
    --dark: #161616;
    --bg: #ffffff;
    --pearl: #faf8f4;
    --pearl-2: #f2eee6;
    --border: #e9e4da;
    --text: #161616;
    --muted: #66615a;
    --wa: #1fa855;
    --header: 52px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 6px 18px rgba(22, 22, 22, 0.05);
    --shadow-lg: 0 12px 28px rgba(22, 22, 22, 0.09);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --font: "Tajawal", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    overflow-x: hidden;
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container {
    width: min(1040px, 100%);
    margin-inline: auto;
    padding-inline: max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-left));
}

/* ── Header ── */
.header {
    position: sticky;
    top: 0;
    z-index: 60;
    height: var(--header);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.25s var(--ease);
}

.header.scrolled {
    background: #fff;
    box-shadow: 0 4px 16px rgba(22, 22, 22, 0.06);
}

.header-inner {
    height: var(--header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }

.brand img {
    height: 24px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.call-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--pearl);
    border: 1px solid var(--border);
    color: var(--dark);
    font-size: 0.82rem;
    font-weight: 700;
}

.call-pill i { color: var(--gold); font-size: 0.78rem; }
.call-pill span { display: none; }

.menu-btn {
    width: 34px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.menu-btn span {
    width: 15px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--dark);
    transition: transform 0.25s var(--ease), opacity 0.2s;
}

.menu-btn.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav {
    position: fixed;
    top: var(--header);
    inset-inline: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 8px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
    z-index: 59;
    max-height: calc(100svh - var(--header));
    overflow-y: auto;
}

.nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nav a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.94rem;
    color: var(--text);
}

.nav a.active {
    background: var(--gold-soft);
    color: var(--gold);
    font-weight: 700;
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    top: var(--header);
    background: rgba(22, 22, 22, 0.3);
    z-index: 58;
}

.nav-backdrop[hidden] { display: none !important; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.86rem;
    transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
    white-space: nowrap;
}

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

.btn-gold {
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(152, 113, 35, 0.28);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-dark-sm {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 0.8rem;
    background: var(--dark);
    color: #fff;
}

.btn-gold-soft {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 0.8rem;
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--gold-border);
}

.btn-dark-outline {
    background: #fff;
    color: var(--dark);
    border: 1px solid var(--border);
}

.btn-wa-pill {
    background: var(--wa);
    color: #fff;
}

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    overflow: hidden;
    background: var(--dark);
}

.hero-bg { position: absolute; inset: 0; }

.hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center 62%;
    transform: scale(1.07);
    animation: heroZoom 18s ease-out forwards;
    will-change: transform;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(22, 22, 22, 0.15) 0%, rgba(22, 22, 22, 0.4) 45%, rgba(22, 22, 22, 0.86) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-block: 22px 18px;
}

.hero-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e4c678;
    margin-bottom: 4px;
}

.hero h1 {
    font-size: clamp(1.4rem, 5.2vw, 2.15rem);
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 6px;
}

.hero p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.86);
    max-width: 44ch;
    margin-bottom: 12px;
}

.hero-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.hero-btns .btn { width: 100%; padding-inline: 10px; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-stats div { display: flex; align-items: baseline; gap: 5px; }
.hero-stats strong { font-size: 1rem; font-weight: 800; color: #e4c678; }
.hero-stats span { font-size: 0.72rem; color: rgba(255, 255, 255, 0.8); }

/* ── Projects Section ── */
.projects-sec {
    padding: 20px 0 26px;
    background: var(--pearl);
}

.sec-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 2px;
}

.sec-top h2 {
    font-size: clamp(1.18rem, 4vw, 1.5rem);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.25;
}

.filter-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--border);
    transition: all 0.2s var(--ease);
}

.tab-btn.active {
    background: var(--dark);
    color: #fff;
    border-color: var(--dark);
}

/* ── Cards ── */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.p-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.p-card.is-hidden { display: none; }

.p-card-img {
    position: relative;
    display: block;
    height: 158px;
    overflow: hidden;
    background: var(--pearl-2);
}

.p-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.p-card-img img[src*="lush-valley"],
.gallery-stage img[src*="lush-valley"] {
    transform: scale(1.12);
}

.badge-gold {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

.badge-loc {
    position: absolute;
    bottom: 8px;
    inset-inline-start: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--dark);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

.p-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.p-card-body h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 3px;
}

.p-card-body p {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 10px;
    line-height: 1.45;
    flex: 1;
}

.p-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--pearl);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    margin-bottom: 10px;
}

.p-meta small { display: block; font-size: 0.68rem; color: var(--muted); }
.p-meta b { font-size: 0.78rem; font-weight: 700; color: var(--dark); }

.p-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.p-actions .btn { width: 100%; }

/* ── Why Section ── */
.why-sec {
    padding: 20px 0;
    background: #fff;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.why-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: var(--radius);
    background: var(--pearl);
    border: 1px solid var(--border);
}

.why-ico {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--gold);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.88rem;
}

.why-item h3 { font-size: 0.9rem; font-weight: 700; color: var(--dark); }
.why-item p { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

/* ── Brochure ── */
.brochure-sec {
    padding: 4px 0 22px;
    background: #fff;
}

.brochure-box {
    background: var(--dark);
    color: #fff;
    border-radius: var(--radius);
    padding: 16px;
    display: grid;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.eyebrow-gold {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #e4c678;
    margin-bottom: 2px;
}

.brochure-box h2 { font-size: 1.12rem; font-weight: 800; margin-bottom: 4px; }
.brochure-box p { font-size: 0.82rem; color: rgba(255, 255, 255, 0.76); }
.brochure-action .btn { width: 100%; }

#downloadError {
    display: none;
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
}

#downloadError.show { display: block; animation: fadeUp 0.3s var(--ease); }
#downloadError p { margin-bottom: 8px; color: #f6caca; font-size: 0.8rem; }

/* ── Project Detail Page ── */
.page-hero {
    padding: 12px 0 16px;
    background: var(--pearl);
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.breadcrumb a { color: var(--gold); font-weight: 700; }
.breadcrumb i { font-size: 0.6rem; }

.detail-top { display: grid; gap: 12px; }
.gallery-wrap { display: grid; gap: 6px; min-width: 0; }

.gallery-stage {
    position: relative;
    height: 220px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark);
    border: 1px solid var(--border);
}

.gallery-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.zoom-hint {
    position: absolute;
    bottom: 8px;
    inset-inline-end: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(22, 22, 22, 0.65);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    pointer-events: none;
}

.gallery-thumbs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumbs button {
    flex: 0 0 58px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.6;
}

.gallery-thumbs button.active { opacity: 1; border-color: var(--gold); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.summary-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 14px;
    box-shadow: var(--shadow);
}

.tag-inline {
    display: inline-block;
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--gold-border);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.summary-card h1 { font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; color: var(--dark); }
.summary-lead { font-size: 0.86rem; color: var(--muted); margin-bottom: 10px; }

.pay-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.pay-pill {
    background: var(--pearl);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}

.pay-pill small { display: block; font-size: 0.68rem; color: var(--muted); }
.pay-pill strong { font-size: 0.84rem; color: var(--dark); font-weight: 800; }

.summary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.summary-actions .btn { width: 100%; padding-inline: 8px; font-size: 0.8rem; }

.detail-body { padding: 14px 0 24px; background: #fff; }
.detail-grid, .detail-main, .detail-side { display: grid; gap: 10px; align-content: start; }

.card-box {
    background: var(--pearl);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.card-box h2 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.card-box h2 i { color: var(--gold); font-size: 0.84rem; }
.card-box p { font-size: 0.84rem; color: var(--muted); margin-bottom: 4px; }

.feature-chips { display: flex; flex-wrap: wrap; gap: 5px; }

.feature-chips span {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--dark);
}

.plan-img {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: zoom-in;
}

.price-list { display: grid; }

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.84rem;
}

.price-row:last-child { border-bottom: 0; padding-bottom: 0; }
.price-row span { color: var(--muted); }
.price-row strong { color: var(--dark); font-weight: 800; }

/* ── Footer ── */
.footer {
    background: var(--pearl);
    border-top: 1px solid var(--border);
    padding: 18px 0 14px;
    color: var(--muted);
}

.footer-grid { display: grid; gap: 12px; margin-bottom: 12px; }
.footer-logo { height: 24px; width: auto; margin-bottom: 6px; }
.footer-about p { font-size: 0.78rem; line-height: 1.6; max-width: 56ch; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; }

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--dark);
    min-height: 30px;
}

.footer-link i { color: var(--gold); }
.footer-wa i { color: var(--wa); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    font-size: 0.72rem;
    text-align: center;
}

/* ── Mobile Floating Bar ── */
.mobile-bar {
    position: fixed;
    inset-inline: 14px;
    bottom: max(8px, env(safe-area-inset-bottom, 8px));
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(22, 22, 22, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.mobile-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.84rem;
}

.mb-wa { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #fff; }
.mb-call { background: rgba(255, 255, 255, 0.12); color: #fff; }
.float-wa { display: none; }

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(16, 16, 16, 0.94);
    display: grid;
    place-items: center;
    padding: 48px 14px 14px;
}

.lightbox[hidden] { display: none !important; }
.lightbox img { max-width: 100%; max-height: 86svh; border-radius: 8px; object-fit: contain; }

.lightbox-close {
    position: absolute;
    top: 10px;
    inset-inline-end: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.5rem;
}

/* ── Animations ── */
.anim {
    transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.anim.is-ready:not(.visible) {
    opacity: 0.01;
    transform: translateY(10px);
}

.anim.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes heroZoom {
    from { transform: scale(1.07); }
    to { transform: scale(1.13); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg img { animation: none; }
    .anim { opacity: 1; transform: none; transition: none; }
}

/* ── Tablet (640px+) ── */
@media (min-width: 640px) {
    .call-pill span { display: inline; }
    .hero { min-height: 380px; }
    .hero-btns { max-width: 320px; }
    .hero-stats { max-width: 380px; }
    .cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .why-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .brochure-box { grid-template-columns: 1.4fr 0.6fr; align-items: center; padding: 20px 22px; }
    .detail-top { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
    .gallery-stage { height: 270px; }
    .detail-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
    .footer-grid { grid-template-columns: 1.5fr 0.5fr; align-items: center; }
}

/* ── Desktop (1024px+) ── */
@media (min-width: 1024px) {
    html { font-size: 14.5px; }
    body { padding-bottom: 0; }
    .mobile-bar { display: none; }
    .menu-btn { display: none; }

    .float-wa {
        display: grid;
        place-items: center;
        position: fixed;
        inset-inline-end: 18px;
        bottom: 18px;
        z-index: 50;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: var(--wa);
        color: #fff;
        font-size: 1.35rem;
        box-shadow: 0 6px 18px rgba(31, 168, 85, 0.32);
        transition: transform 0.2s var(--ease);
    }

    .float-wa:hover { transform: translateY(-2px) scale(1.04); }

    .brand img { height: 26px; max-width: 145px; }

    .nav {
        position: static;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        flex-direction: row;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
        max-height: none;
        overflow: visible;
        gap: 2px;
    }

    .nav a {
        min-height: 0;
        padding: 5px 9px;
        font-size: 0.82rem;
        border-radius: 999px;
    }

    .nav a:hover { background: var(--pearl); color: var(--gold); }

    .hero { min-height: 420px; }
    .hero-content { padding-block: 28px; }

    .sec-top {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .p-card-img { height: 168px; }
    .p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
    .p-card:hover .p-card-img img { transform: scale(1.04); }
    .p-card:hover .p-card-img img[src*="lush-valley"] { transform: scale(1.16); }
    .why-grid { grid-template-columns: repeat(4, 1fr); }
    .projects-sec { padding: 26px 0 32px; }
    .why-sec { padding: 26px 0; }
    .brochure-sec { padding: 4px 0 30px; }
    .gallery-stage { height: 310px; }
}
