/* ═══════════════════════════════════════
   projects-page.css — Projects listing page
   ═══════════════════════════════════════ */

/* ══════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════ */
:root {
    --p-cream:      #F7F2ED;
    --p-cream-deep: #EDE4D8;
    --p-brown:      #aa794d;
    --p-brown-dark: #8f6340;
    --p-text:       #2C1810;
    --p-text-muted: #6B4C35;
    --p-text-faint: #9B7B60;
    --p-border:     #D3B8A1;
    --p-white:      #FFFCFA;
    --p-shadow:     0 4px 24px rgba(44,24,16,.08);
    --p-shadow-lg:  0 12px 40px rgba(44,24,16,.13);
    --p-radius:     14px;
    --p-radius-sm:  8px;
    --p-font:       'GamilaArabic', sans-serif;
}

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.proj-hero {
    padding-top: 130px;
    padding-bottom: 0;
    background: url('../images/slider/bg4.jpg') center center / cover no-repeat;
    position: relative;
    overflow: hidden;
}
.proj-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 10, 5, 0.55);
}
.proj-hero .container { position: relative; z-index: 1; }
.proj-hero h1,
.proj-hero .proj-hero-sub { color: #fff; }
.proj-hero .proj-hero-eyebrow { color: #e8c99a; border-color: rgba(232,201,154,.35); background: rgba(232,201,154,.1); }
.proj-hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 0;
    flex-wrap: wrap;
}
.proj-hero-text { padding-bottom: 40px; }
.proj-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(170,121,77,.15);
    border: 1px solid rgba(170,121,77,.3);
    color: var(--p-brown);
    font-size: 12px; font-weight: 700; letter-spacing: .5px;
    border-radius: 20px; padding: 4px 14px;
    margin-bottom: 14px;
}
.proj-hero h1 {
    font-family: var(--p-font);
    font-size: clamp(28px,4vw,46px);
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.2;
}
.proj-hero-sub {
    font-size: 15px;
    color: var(--p-text-muted);
    margin: 0;
}

/* Stats pills attached to bottom of hero */
.proj-hero-stats {
    display: none !important;
    gap: 12px;
    padding-bottom: 0;
    flex-wrap: wrap;
    align-self: flex-end;
    padding-bottom: 30px;
}
.proj-stat-pill {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--p-border);
    border-radius: 12px;
    padding: 14px 22px;
    text-align: center;
    min-width: 90px;
}
.proj-stat-num {
    font-size: 26px; font-weight: 700;
    color: var(--p-brown); line-height: 1;
    margin-bottom: 4px;
}
.proj-stat-lbl {
    font-size: 11px; font-weight: 600;
    color: var(--p-text-muted);
    letter-spacing: .3px;
}

/* Wave divider */
.proj-hero-wave {
    display: block;
    width: 100%; height: 48px;
    margin-top: -1px;
}

/* ══════════════════════════════════
   PAGE BODY
══════════════════════════════════ */
.proj-body {
    background: var(--p-cream);
    padding: 40px 0 100px;
    min-height: 60vh;
}

/* ══════════════════════════════════
   FILTER PANEL
══════════════════════════════════ */
.proj-filter-panel {
    display: none !important;
    background: #FFFCFA !important;
    border: 1px solid #D3B8A1 !important;
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow);
    padding: 20px 24px;
    margin-bottom: 32px;
}
.proj-filter-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.proj-filter-title {
    font-size: 13px; font-weight: 700;
    color: var(--p-text-muted);
    display: flex; align-items: center; gap: 6px;
}
.proj-filter-title i { color: var(--p-brown); }
.proj-filter-reset {
    background: none; border: none;
    font-size: 12px; font-weight: 600;
    color: var(--p-text-faint); cursor: pointer;
    display: none; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px;
    transition: all .2s;
    font-family: var(--p-font);
}
.proj-filter-reset.visible { display: flex; }
.proj-filter-reset:hover { background: rgba(170,121,77,.1); color: var(--p-brown); }

/* Search row */
.proj-filter-search {
    display: flex; align-items: center; gap: 10px;
    background: #fff !important;
    border: 1.5px solid var(--p-border);
    border-radius: 50px;
    padding: 6px 6px 6px 10px;
    margin-bottom: 14px;
    transition: border-color .2s, box-shadow .2s;
}
.proj-filter-search:focus-within {
    border-color: var(--p-brown);
    box-shadow: 0 0 0 3px rgba(170,121,77,.12);
}
.proj-filter-search i { color: var(--p-text-faint); font-size: 14px; flex-shrink: 0; padding: 0 4px; }
.proj-filter-search input,
.dark-theme .proj-filter-search input[type="text"] {
    flex: 1; border: none !important; outline: none !important;
    background: transparent !important;
    background-color: transparent !important;
    font-family: var(--p-font); font-size: 14px;
    color: #2C1810 !important; text-align: right;
    height: auto; padding: 6px 4px;
    box-shadow: none !important;
}
.proj-filter-search input::placeholder { color: #bbb; }
.proj-filter-search-clear {
    background: none; border: none; cursor: pointer;
    color: #ccc; font-size: 14px; padding: 4px 8px;
    border-radius: 50px; transition: all .2s; display: none;
    line-height: 1;
}
.proj-filter-search-clear.show { display: block; }
.proj-filter-search-clear:hover { color: var(--p-brown); background: rgba(170,121,77,.08); }

/* Dropdowns row */
.proj-filter-dropdowns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.proj-filter-select-wrap { position: relative; }
.proj-filter-select-wrap i {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--p-brown); font-size: 12px;
    pointer-events: none;
}
.proj-filter-select {
    width: 100%;
    appearance: none; -webkit-appearance: none;
    background-color: #fff;
    border: 1.5px solid var(--p-border);
    border-radius: 50px;
    font-family: var(--p-font);
    font-size: 13px;
    color: #2C1810;
    padding: 9px 32px 9px 30px;
    cursor: pointer; outline: none;
    transition: border-color .2s, box-shadow .2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23aa794d'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark-theme .proj-filter-select {
    background-color: #fff !important;
    color: #2C1810 !important;
    border-color: #D3B8A1 !important;
}
.proj-filter-select:focus {
    border-color: var(--p-brown);
    box-shadow: 0 0 0 3px rgba(170,121,77,.12);
}
.proj-filter-select:disabled { opacity: .45; cursor: default; }
.proj-filter-select.has-value {
    border-color: var(--p-brown);
    background-color: rgba(170,121,77,.06);
    color: var(--p-text);
    font-weight: 600;
}

/* Action row */
.proj-filter-actions {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 14px; gap: 10px;
}
.proj-filter-count-label {
    font-size: 13px; color: var(--p-text-faint);
    display: flex; align-items: center; gap: 6px;
}
.proj-filter-count-label strong { color: var(--p-brown); font-size: 16px; }
.proj-search-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: var(--p-text);
    border: 1.5px solid var(--p-text); border-radius: 50px;
    padding: 10px 28px;
    font-family: var(--p-font);
    font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all .2s;
}
.proj-search-btn:hover { background: var(--p-text); color: #fff; transform: translateY(-1px); }

@media (max-width: 991px) {
    .proj-filter-dropdowns { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .proj-filter-dropdowns { grid-template-columns: 1fr 1fr; }
    .proj-filter-panel { padding: 16px; }
}
@media (max-width: 400px) {
    .proj-filter-dropdowns { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════
   TOOLBAR (count + view toggle)
══════════════════════════════════ */
.proj-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; gap: 12px;
}
.proj-result-info {
    font-size: 14px; color: var(--p-text-muted);
}
.proj-result-info span {
    font-size: 18px; font-weight: 700; color: var(--p-text);
    margin-left: 4px;
}
.proj-view-toggle {
    display: flex; gap: 4px;
    background: var(--p-white);
    border: 1px solid var(--p-border);
    border-radius: 8px;
    padding: 3px;
}
.proj-view-btn {
    background: none; border: none; cursor: pointer;
    width: 30px; height: 30px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--p-text-faint); font-size: 13px;
    transition: all .2s;
}
.proj-view-btn.active { background: var(--p-brown); color: #fff; }
.proj-view-btn:hover:not(.active) { background: var(--p-cream-deep); color: var(--p-text); }

/* ══════════════════════════════════
   GRID & LIST VIEW
══════════════════════════════════ */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.proj-grid.list-view {
    grid-template-columns: 1fr;
}
@media (max-width: 640px) { .proj-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════
   PROJECT CARD — GRID
══════════════════════════════════ */
.proj-card {
    background: var(--p-white);
    border-radius: var(--p-radius);
    border: 1px solid var(--p-border);
    overflow: hidden;
    box-shadow: var(--p-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex; flex-direction: column;
}
.proj-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--p-shadow-lg);
}

/* Image */
.proj-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--p-cream-deep);
    flex-shrink: 0;
}
.proj-card-img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .4s ease;
}
.proj-card:hover .proj-card-img img { transform: scale(1.05); }
.proj-card-no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 52px; color: var(--p-border);
}

/* Badges on image */
.proj-card-badges {
    position: absolute; top: 12px; right: 12px;
    display: flex; flex-direction: column; gap: 6px;
    align-items: flex-start;
}
.proj-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700;
    border-radius: 20px; padding: 3px 10px;
    backdrop-filter: blur(6px);
    letter-spacing: .3px;
    white-space: nowrap;
}
.proj-badge-classification {
    background: rgba(255,252,250,.92);
    color: var(--p-brown);
    border: 1px solid rgba(170,121,77,.3);
}
.proj-badge-type-residential {
    background: rgba(34,197,94,.15);
    color: #166534;
    border: 1px solid rgba(34,197,94,.3);
}
.proj-badge-type-commercial {
    background: rgba(59,130,246,.15);
    color: #1e40af;
    border: 1px solid rgba(59,130,246,.3);
}
.proj-badge-type-other {
    background: rgba(170,121,77,.15);
    color: var(--p-brown-dark);
    border: 1px solid rgba(170,121,77,.3);
}

/* Card body */
.proj-card-body {
    padding: 18px 20px;
    display: flex; flex-direction: column; flex: 1;
}
.proj-card-title {
    font-size: 17px; font-weight: 700;
    color: var(--p-text);
    margin: 0 0 8px; line-height: 1.35;
}
.proj-card-title-en {
    font-size: 12px; color: var(--p-text-faint);
    margin: -4px 0 8px; direction: ltr; text-align: right;
}
.proj-card-location {
    display: flex; align-items: flex-start; gap: 6px;
    font-size: 13px; color: var(--p-text-muted);
    margin-bottom: 10px; line-height: 1.5;
}
.proj-card-location i { color: var(--p-brown); font-size: 13px; flex-shrink: 0; margin-top: 2px; }
.proj-card-location a { color: inherit; text-decoration: none; }
.proj-card-location a:hover { color: var(--p-brown); }
.proj-card-desc {
    font-size: 13px; color: var(--p-text-faint);
    line-height: 1.75; margin-bottom: 16px; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* Divider */
.proj-card-divider {
    height: 1px; background: var(--p-cream-deep);
    margin: 0 -20px 14px;
}

/* Actions */
.proj-card-actions {
    display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto;
}
.proj-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--p-font);
    font-size: 12px; font-weight: 700;
    border-radius: 50px;
    padding: 7px 16px;
    border: none; cursor: pointer;
    transition: all .2s; text-decoration: none;
    white-space: nowrap; line-height: 1;
}
.proj-btn-primary {
    background: var(--p-text); color: #fff;
    flex: 1; justify-content: center;
}
.proj-btn-primary:hover { background: var(--p-brown); color: #fff; text-decoration: none; opacity: 1; }
.proj-btn-outline {
    background: transparent;
    color: var(--p-text-muted);
    border: 1.5px solid var(--p-border);
}
.proj-btn-outline:hover { border-color: var(--p-brown); color: var(--p-brown); background: rgba(170,121,77,.06); text-decoration: none; opacity: 1; }
.proj-btn-share {
    background: transparent;
    color: var(--p-text-faint);
    border: 1.5px solid var(--p-cream-deep);
    width: 34px; height: 34px; padding: 0;
    justify-content: center; flex-shrink: 0;
}
.proj-btn-share:hover { border-color: var(--p-brown); color: var(--p-brown); background: rgba(170,121,77,.06); opacity: 1; }

/* ══════════════════════════════════
   LIST VIEW CARD
══════════════════════════════════ */
.proj-grid.list-view .proj-card {
    flex-direction: row;
}
.proj-grid.list-view .proj-card-img {
    width: 240px; min-width: 240px;
    aspect-ratio: unset; height: auto;
}
.proj-grid.list-view .proj-card-body {
    padding: 20px 24px;
}
.proj-grid.list-view .proj-card-desc {
    -webkit-line-clamp: 2;
}
@media (max-width: 640px) {
    .proj-grid.list-view .proj-card { flex-direction: column; }
    .proj-grid.list-view .proj-card-img { width: 100%; min-width: unset; }
}

/* ══════════════════════════════════
   EMPTY STATE
══════════════════════════════════ */
.proj-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 80px 20px;
}
.proj-empty-icon {
    width: 80px; height: 80px;
    background: var(--p-cream-deep);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px; color: var(--p-border);
}
.proj-empty h3 {
    font-size: 18px; font-weight: 700;
    color: var(--p-text); margin-bottom: 8px;
}
.proj-empty p { font-size: 14px; color: var(--p-text-faint); margin-bottom: 20px; }
.proj-empty-reset {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--p-brown); color: #fff;
    border: none; border-radius: 50px;
    padding: 10px 24px;
    font-family: var(--p-font);
    font-size: 14px; font-weight: 700;
    cursor: pointer; transition: background .2s;
}
.proj-empty-reset:hover { background: var(--p-brown-dark); }

/* ══════════════════════════════════
   BACK LINK
══════════════════════════════════ */
.proj-back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--p-text-muted);
    font-size: 13px; font-weight: 600;
    text-decoration: none; margin-bottom: 28px;
    transition: color .2s;
}
.proj-back:hover { color: var(--p-brown); text-decoration: none; }
.proj-back i { font-size: 11px; }
