/* ==========================================================================
   Ghafari v2 — inner pages (about, catalogs, details, news, clients, careers, contact).
   ========================================================================== */

/* ---- Content + sidebar layout ---- */
.layout-aside {
    display: grid;
    gap: clamp(2rem, 1rem + 4vw, 4rem);
    align-items: start;
}

@media (min-width: 1000px) {
    .layout-aside { grid-template-columns: minmax(0, 1fr) 340px; }
    .layout-aside--reverse { grid-template-columns: minmax(0, 1fr) 380px; }
    .layout-aside__side { position: sticky; top: calc(var(--header-h) + 24px); }
}

.layout-aside__side { display: grid; gap: var(--s3); }

.figure-lg {
    margin-bottom: var(--s4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.prose--center { margin-inline: auto; text-align: center; }

.panel {
    padding: var(--s3);
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.panel__title {
    margin: 0 0 var(--s2);
    font-size: var(--text-base);
    letter-spacing: 0;
}

.panel p { color: var(--slate); font-size: var(--text-sm); }

.panel--brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.panel--brand .panel__title { color: #fff; }
.panel--brand p { color: #d8e8f7; }

.panel__list { list-style: none; display: grid; gap: 2px; }

.panel__list a {
    display: block;
    padding: 0.55rem 0.75rem;
    margin-inline: -0.75rem;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: var(--text-sm);
    font-weight: 650;
}

.panel__list a:hover { background: var(--pebble); }
.panel__list a[aria-current='page'] { background: var(--brand-soft); color: var(--brand-ink); }

.contact-list { display: grid; gap: 0.85rem; list-style: none; font-size: var(--text-sm); }
.contact-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--slate); }
.contact-list svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--brand); }
.contact-list a { color: var(--ink); font-weight: 650; }

.mini-list { display: grid; gap: var(--s2); list-style: none; }

.mini-list a {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    color: var(--ink);
    font-size: var(--text-sm);
    line-height: 1.35;
}

.mini-list a:hover strong { color: var(--brand); }
.mini-list strong { display: block; font-weight: 700; }
.mini-list small { display: block; margin-top: 2px; color: var(--slate); font-size: var(--text-xs); font-weight: 600; }

.mini-list__thumb {
    flex: none;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--pebble);
}

.mini-list__thumb img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto !important; }

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: var(--s3);
    color: var(--slate);
    font-size: var(--text-sm);
    font-weight: 650;
}

.meta-line span { display: inline-flex; align-items: center; gap: 0.45rem; }
.meta-line svg { width: 16px; height: 16px; color: var(--brand); }

.empty-state {
    padding: var(--s6) var(--s3);
    text-align: center;
    color: var(--slate);
    font-size: var(--text-lg);
}

/* About / careers side image */
.about-visual--side { max-width: 440px; margin-inline: auto; }
.about-visual--side .media { aspect-ratio: 4 / 4.4; }

/* ---- Clients ---- */
.client-grid {
    display: grid;
    gap: var(--s2);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.client-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: var(--s3);
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.client-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.client-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 90px;
    margin-bottom: 0.5rem;
}

.client-card__logo img {
    max-width: 100%;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
    aspect-ratio: auto !important;
}

.client-card__name { margin: 0; font-size: var(--text-base); line-height: 1.35; letter-spacing: 0; }
.client-card__name a { color: var(--ink); }
.client-card__name a:hover { color: var(--brand); }
.client-card p { margin: 0; color: var(--slate); font-size: var(--text-sm); }

.quote-grid {
    display: grid;
    gap: var(--s3);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.stack { display: grid; gap: var(--s4); }

.case {
    display: grid;
    gap: var(--s4);
    align-items: center;
    padding: var(--s4);
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
}

.case h3 { margin-bottom: var(--s2); }
.case .media { border-radius: var(--radius-md); }

@media (min-width: 900px) {
    .case { grid-template-columns: 1.2fr 1fr; }
}

/* ---- Projects ---- */
.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: var(--s2);
    margin-bottom: var(--s4);
    padding: var(--s3);
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
}

.filters .field { flex: 1 1 220px; }
.filters .btn { flex: none; }

.facts { display: grid; gap: var(--s2); margin: 0; }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--slate); font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.facts dd { margin: 0; color: var(--ink); font-weight: 700; }
.facts--stack div { padding-bottom: var(--s2); border-bottom: 1px solid var(--pebble); }
.facts--stack div:last-child { padding-bottom: 0; border: 0; }

.gallery-title { margin-top: var(--s5); font-size: var(--text-xl); }

.gallery {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
}

.gallery a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--pebble);
    aspect-ratio: 4 / 3;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto !important;
    transition: transform 0.4s var(--ease);
}

.gallery a:hover img { transform: scale(1.06); }

/* ---- Lightbox ---- */
.lightbox {
    width: min(96vw, 1200px);
    max-width: none;
    max-height: 94vh;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    overflow: visible;
}

.lightbox::backdrop { background: rgba(7, 33, 56, 0.92); }

.lightbox__img {
    margin-inline: auto;
    max-height: 84vh;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s2);
    margin-top: var(--s2);
    font-size: var(--text-sm);
    font-weight: 700;
}

.lightbox__btns { display: flex; gap: 0.5rem; }

.lightbox .icon-btn { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.lightbox .icon-btn:hover:not(:disabled) { background: #fff; border-color: #fff; color: var(--ink); }

/* ---- Contact ---- */
.contact-layout {
    display: grid;
    gap: var(--s4);
    align-items: start;
}

@media (min-width: 960px) {
    .contact-layout { grid-template-columns: 1.3fr 1fr; }
}

.form-card__title { margin-bottom: var(--s3); font-size: var(--text-xl); }

.info-cards { display: grid; gap: var(--s2); }

.info-card {
    display: flex;
    gap: var(--s2);
    align-items: flex-start;
    padding: var(--s3);
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
}

.info-card h3 { margin: 0 0 0.25rem; font-size: var(--text-base); letter-spacing: 0; }
.info-card p { margin: 0; color: var(--slate); font-size: var(--text-sm); }
.info-card a { color: var(--ink); font-weight: 700; }
.info-card a:hover { color: var(--brand); }

.info-card__icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
}

.info-card__icon svg { width: 22px; height: 22px; }

.info-cards .facts { padding: var(--s3); background: var(--cloud); border: 1px dashed var(--hairline); border-radius: var(--radius-md); }

.map iframe { display: block; width: 100%; height: clamp(320px, 40vw, 460px); border: 0; }

/* ---- Closing call-to-action band ---- */
.cta-band {
    position: relative;
    overflow: hidden;
    background: var(--brand);
    color: #fff;
    padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
    isolation: isolate;
}

.cta-band .diamond { z-index: -1; }

.cta-band__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
}

.cta-band h2 { margin-bottom: 0.4rem; color: #fff; font-size: var(--text-2xl); }
.cta-band p { margin: 0; color: #d8e8f7; max-width: 52ch; }

/* ---- Not found ---- */
.notfound { text-align: center; padding-block: var(--section); }
.notfound__code { font-size: clamp(5rem, 3rem + 12vw, 11rem); font-weight: 800; line-height: 1; color: var(--brand); letter-spacing: -0.04em; }
.notfound p { color: var(--slate); font-size: var(--text-lg); }
.notfound .hero__actions { justify-content: center; margin-top: var(--s4); }

/* ---- Team ---- */
.team-grid {
    display: grid;
    gap: var(--s4) var(--s3);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 760px) { .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.team-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }

.team-card__photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    box-shadow: var(--shadow-sm);
}

.team-card__photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto !important; transition: transform 0.6s var(--ease); }
.team-card:hover .team-card__photo img { transform: scale(1.04); }

.team-card__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--brand-ink);
    font-size: clamp(2.5rem, 2rem + 2vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.team-card__name { margin: var(--s2) 0 0; font-size: var(--text-lg); line-height: 1.25; }
.team-card__role { margin: 0.2rem 0 0; color: var(--brand-ink); font-size: var(--text-sm); font-weight: 700; }
.team-card__bio { margin: 0.6rem 0 0; color: var(--slate); font-size: var(--text-sm); line-height: 1.55; }

.team-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0.4rem 0 0 -0.6rem;
    border-radius: var(--radius-full);
    color: var(--slate);
    transition: color 0.2s, background-color 0.2s;
}

.team-card__link:hover { background: var(--brand-soft); color: var(--brand); }
.team-card__link svg { width: 20px; height: 20px; }

/* ---- In-place lists (listing.js) ---- */
.filters.is-live [data-filter-submit] { display: none; }
.filters__count { margin: 0 0 var(--s3); color: var(--slate); font-size: var(--text-sm); font-weight: 600; }

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

.filter-pop { animation: filter-pop 0.35s var(--ease); }

/* The list dims only while the network makes the visitor wait; nothing jumps. */
[data-swap-root][aria-busy='true'] [data-swap='list'] { opacity: 0.55; pointer-events: none; transition: opacity 0.2s; }
[data-swap='list'] { scroll-margin-top: calc(var(--header-h) + 1rem); outline: none; }
