/* ═══════════════════════════════════════════════════════
   AFDALAQAR OVERHAUL CSS — Staging v1.0
   Design System + Components + Mobile UX
   ═══════════════════════════════════════════════════════ */

/* ─── Font & Base ─── */
body {
    font-family: var(--af-font, 'IBM Plex Sans Arabic', Tahoma, Arial, sans-serif) !important;
    font-size: var(--af-font-size-base, 16px);
    line-height: var(--af-line-height, 1.7);
    background: var(--af-bg, #f4f9f8);
    color: var(--af-text, #09252a);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--af-font-heading, var(--af-font)) !important;
    line-height: 1.35;
}

/* ─── Header Redesign ─── */
.site-header {
    background: linear-gradient(135deg, var(--af-primary) 0%, var(--af-primary-strong) 100%);
    box-shadow: var(--af-shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow var(--af-t-normal);
}

.site-header.scrolled {
    box-shadow: var(--af-shadow-lg);
}

.site-header__inner {
    min-height: var(--af-header-height, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0;
}

/* Brand/logo */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.brand__mark {
    width: 44px;
    height: 44px;
    border-radius: var(--af-radius-sm);
    background: var(--af-accent);
    color: var(--af-text);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(255,198,56,.3);
}

.brand__text {
    font-size: 1.15rem;
    letter-spacing: -0.3px;
}

/* Navigation */
.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-nav a {
    color: rgba(255,255,255,.9);
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--af-radius-sm);
    transition: all var(--af-t-fast);
    font-size: 0.95rem;
}

.primary-nav a:hover,
.primary-nav a:focus {
    color: #fff;
    background: rgba(255,255,255,.12);
}

/* Header CTA */
.header-cta {
    background: var(--af-accent) !important;
    color: var(--af-text) !important;
    padding: 10px 22px !important;
    border-radius: var(--af-radius-sm) !important;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(255,198,56,.3);
    transition: all var(--af-t-fast);
    white-space: nowrap;
}

.header-cta:hover {
    background: var(--af-accent-strong) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255,198,56,.4);
}

/* Nav toggle (mobile) */
.nav-toggle {
    display: none;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--af-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    min-height: 44px;
}

/* ─── Hero Section ─── */
.home-hero {
    background: linear-gradient(135deg, var(--af-surface-soft) 0%, var(--af-bg) 100%);
    padding: 60px 0 50px;
    border-bottom: 1px solid var(--af-border);
}

.home-hero__grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: center;
}

.home-hero .eyebrow {
    display: inline-block;
    background: var(--af-accent-soft);
    color: var(--af-accent-strong);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.home-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.3;
    margin: 0 0 16px;
    color: var(--af-text);
}

.home-hero p {
    font-size: 1.05rem;
    color: var(--af-text-secondary);
    margin: 0 0 24px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--af-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--af-t-fast);
    text-decoration: none;
    min-height: 48px;
}

.button--primary {
    background: var(--af-primary);
    color: #fff;
}

.button--primary:hover {
    background: var(--af-primary-strong);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--af-shadow-md);
}

.button--ghost {
    background: transparent;
    color: var(--af-primary);
    border: 2px solid var(--af-primary);
}

.button--ghost:hover {
    background: var(--af-primary);
    color: #fff;
}

.button--light {
    background: #fff;
    color: var(--af-primary);
}

.button--accent {
    background: var(--af-accent);
    color: var(--af-text);
}

.button--accent:hover {
    background: var(--af-accent-strong);
}

/* Search Panel */
.search-panel {
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius-lg);
    padding: 24px;
    box-shadow: var(--af-shadow-md);
}

.search-panel h2 {
    font-size: 1.1rem;
    margin: 0 0 16px;
}

/* ─── Trust Indicators ─── */
.af-trust-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 32px 0;
    background: var(--af-surface);
    border-top: 1px solid var(--af-border);
    border-bottom: 1px solid var(--af-border);
}

.af-trust-stat {
    text-align: center;
}

.af-trust-stat__num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--af-primary);
}

.af-trust-stat__label {
    font-size: 0.9rem;
    color: var(--af-text-secondary);
}

/* ─── Sections ─── */
.section {
    padding: 48px 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-head .eyebrow {
    display: block;
    color: var(--af-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

/* ─── Project Cards ─── */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

article.card,
article.project-card {
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius-lg);
    overflow: hidden;
    transition: all var(--af-t-normal);
    display: flex;
    flex-direction: column;
}

article.card:hover,
article.project-card:hover {
    box-shadow: var(--af-shadow-lg);
    transform: translateY(-3px);
    border-color: var(--af-border-strong);
}

/* Card image */
article.card > a:first-child,
article.card img {
    display: block;
    width: 100%;
    aspect-ratio: 800/520;
    object-fit: cover;
    overflow: hidden;
}

article.card .card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Card badge */
.card-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: var(--af-success);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.card-badge--construction {
    background: var(--af-warning);
}

/* Card meta info */
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--af-border);
}

.card-meta-item {
    font-size: 0.85rem;
    color: var(--af-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Card CTA */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.card-actions .button {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9rem;
    min-height: 44px;
}

/* ─── Mobile Bottom Bar ─── */
.af-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    background: var(--af-surface);
    border-top: 1px solid var(--af-border);
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    z-index: 95;
    padding: 8px env(safe-area-inset-bottom, 8px);
}

.af-mobile-bar__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    color: var(--af-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--af-radius-sm);
    transition: color var(--af-t-fast);
}

.af-mobile-bar__btn:active {
    color: var(--af-primary);
}

.af-mobile-bar__wa {
    color: #25d366;
}

/* ═══════ RESPONSIVE ═══════ */

/* Tablet (1024px) */
@media (max-width: 1024px) {
    .home-hero__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .search-panel {
        max-width: 500px;
    }
}

/* Mobile landscape (768px) */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    .primary-nav {
        position: fixed;
        inset-inline: 0;
        top: var(--af-header-height, 80px);
        background: var(--af-primary-strong);
        padding: 20px;
        transform: translateY(-120%);
        transition: transform var(--af-t-normal);
        z-index: 99;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    .primary-nav.open {
        transform: translateY(0);
    }
    .primary-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .primary-nav a {
        display: block;
        padding: 14px;
        border-radius: var(--af-radius-sm);
        font-size: 1rem;
    }

    .home-hero {
        padding: 32px 0 24px;
    }

    .section {
        padding: 32px 0;
    }

    .listing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }


    .af-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-around;
        min-height: var(--af-mobile-bar-height, 64px);
    }


    .af-trust-stats {
        gap: 20px;
        padding: 20px 0;
    }

    .af-trust-stat__num {
        font-size: 1.5rem;
    }
}

/* Mobile portrait (390px, 360px) */
@media (max-width: 480px) {
    .container {
        width: calc(100% - 24px);
    }

    .home-hero h1 {
        font-size: 1.6rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .card-actions {
        flex-direction: column;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .header-cta {
        padding: 8px 14px !important;
        font-size: 0.85rem;
    }

    .brand__text {
        font-size: 1rem;
    }
}

/* ─── Prevent horizontal scroll ─── */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ═══════════════════════════════════════════════════════
   AFDALAQAR HOME + CARD + FOOTER SYSTEM — v1.1
   One coherent conversion layer; no inline layout rules.
   ═══════════════════════════════════════════════════════ */
.af-icon {
    width: 1.15em;
    height: 1.15em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand__mark .af-icon { width: 24px; height: 24px; }
.nav-toggle { align-items: center; gap: 8px; }
.nav-toggle .af-icon { width: 20px; height: 20px; }

.home-hero { padding: clamp(36px, 5vw, 64px) 0; }
.home-hero__content { max-width: 680px; }
.home-hero h1 { max-width: 680px; text-wrap: balance; letter-spacing: -.02em; }
.home-search-fields { display: grid; gap: 10px; }
.home-search-trust {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
    font-size: .82rem;
}
.home-search-trust div { padding: 9px 10px; }
.home-search-trust dt { font-size: .76rem; }
.home-search-trust dd { font-size: .82rem; line-height: 1.45; }

.section { padding: clamp(40px, 5vw, 64px) 0; }
.home-section--alt { background: var(--af-surface-soft); }
.section-head { align-items: flex-end; gap: 24px; }
.section-head h2 { margin-bottom: 0; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.section-link { white-space: nowrap; padding-block: 6px; }

.listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
article.project-card {
    height: 100%;
    border-radius: var(--af-radius-lg);
    box-shadow: var(--af-shadow-sm);
    background: var(--af-surface);
}
.project-card__media-wrap { position: relative; overflow: hidden; background: var(--af-surface-soft); }
.project-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.project-card__media > img,
.project-card__media .af-card__placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform var(--af-t-normal); }
.project-card:hover .project-card__media > img { transform: scale(1.025); }
.project-card .card-body { padding: 18px; min-width: 0; }
.project-card__title {
    min-height: 3.1em;
    margin: 0 0 10px;
    font-size: 1.05rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.project-card__title a { color: var(--af-text); }
.project-card__facts { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.project-card__facts > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--af-surface-soft);
    color: var(--af-text-secondary);
    font-size: .78rem;
    line-height: 1.3;
}
.project-card__facts .af-icon { width: 14px; height: 14px; color: var(--af-primary); }
.project-card__developer {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 2.8em;
    margin: 0 0 8px;
    color: var(--af-text-secondary);
    font-size: .84rem;
    line-height: 1.45;
}
.project-card__developer .af-icon { color: var(--af-primary); }
.project-card__developer span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.project-card__price { margin: 5px 0 12px; color: var(--af-primary-strong); font-size: 1.05rem; font-weight: 700; }
.project-card .card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
.project-card .card-meta-item {
    display: grid;
    gap: 2px;
    padding: 8px 9px;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius-sm);
    background: #fff;
    font-size: .8rem;
    line-height: 1.35;
}
.project-card .card-meta-item b { color: var(--af-text-muted); font-size: .7rem; font-weight: 500; }
.project-card__updated { display: block; margin-top: 9px; color: var(--af-text-muted); font-size: .72rem; }
.project-card .card-actions { margin-top: auto; padding-top: 15px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 8px; }
.project-card .card-actions .button { min-width: 0; min-height: 44px; padding: 9px 12px; font-size: .86rem; }
.button--whatsapp { background: #168a45; color: #fff; }
.button--whatsapp:hover { background: #10753a; color: #fff; transform: translateY(-1px); }
.button--whatsapp .af-icon { width: 18px; height: 18px; }
.project-card__compare { display: flex; align-items: center; gap: 7px; width: fit-content; margin-top: 10px; color: var(--af-text-secondary); font-size: .78rem; cursor: pointer; }
.project-card__compare input { inline-size: 16px; block-size: 16px; accent-color: var(--af-primary); }
.card-favorite {
    position: absolute;
    z-index: 3;
    top: 11px;
    inset-inline-end: 11px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: var(--af-primary-strong);
    box-shadow: var(--af-shadow-sm);
    cursor: pointer;
}
.card-favorite .af-icon { width: 18px; height: 18px; }
.card-favorite.is-active { color: #b72d42; }
.card-favorite.is-active .af-icon { fill: #b72d42; }
.project-card--developer .project-card__title { min-height: 3.1em; }
.project-card--developer .card-actions { display: flex; justify-content: flex-start; }
.project-card--developer .card-actions .button { flex: 0 0 auto; width: auto; min-width: 146px; }
.developer-grid .project-card__media { aspect-ratio: 16 / 9; }
.home-developers .developer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-swipe-hint { display: none; }
.af-project-header-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 16px; color: var(--af-text-muted); font-size: .9rem; }
.af-project-header-meta span { display: inline-flex; align-items: baseline; gap: 5px; }
.af-project-header-meta strong { color: var(--af-text); font-weight: 700; }
.af-project-header-meta a { color: var(--af-primary); font-weight: 600; }

.home-area-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.home-area-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    background: var(--af-surface);
    transition: transform var(--af-t-fast), border-color var(--af-t-fast), box-shadow var(--af-t-fast);
}
.home-area-card:hover { transform: translateY(-2px); border-color: var(--af-primary); box-shadow: var(--af-shadow-sm); }
.home-area-card__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--af-surface-soft); color: var(--af-primary); }
.home-area-card strong,
.home-area-card small { display: block; }
.home-area-card strong { color: var(--af-text); font-size: .95rem; }
.home-area-card small { color: var(--af-text-secondary); font-size: .78rem; }

.home-articles-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.home-article-card { overflow: hidden; border: 1px solid var(--af-border); border-radius: var(--af-radius-lg); background: var(--af-surface); box-shadow: var(--af-shadow-sm); }
.home-article-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--af-surface-soft); }
.home-article-card__media img { width: 100%; height: 100%; object-fit: cover; }
.home-article-card__body { padding: 16px; }
.home-article-card time { color: var(--af-text-muted); font-size: .75rem; }
.home-article-card h3 { min-height: 4.2em; margin: 7px 0 12px; font-size: .98rem; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.home-article-card h3 a { color: var(--af-text); }

.home-final-cta { padding: clamp(48px, 6vw, 72px) 0; text-align: center; background: linear-gradient(135deg, var(--af-primary-strong), var(--af-secondary)); }
.home-final-cta__inner { max-width: 760px; }
.home-final-cta .eyebrow { color: var(--af-accent); }
.home-final-cta h2 { margin-bottom: 12px; color: #fff; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.home-final-cta p:not(.eyebrow) { margin: 0 auto 22px; color: rgba(255,255,255,.82); }
.home-final-cta__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.button--light-outline { border: 1px solid rgba(255,255,255,.55); background: transparent; color: #fff; }
.button--light-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }

/* ─── Authoritative CTA dimensions ─── */
.button {
    min-height: 42px;
    padding: 9px 18px;
    gap: 7px;
    border-radius: 9px;
    font-size: .9rem;
    line-height: 1.25;
}
.button .af-icon,
.button .af-brand-icon { width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; }
.home-hero .button { min-height: 46px; }
.button--whatsapp { border: 1px solid #25D366; background: #fff; color: #117a3c; }
.button--whatsapp:hover { border-color: #1fbd5b; background: #effbf3; color: #0d6733; }
.af-brand-icon { display: inline-block; object-fit: contain; }

/* ─── One authoritative footer layout ─── */
.site-footer {
    min-height: 0;
    padding: 0;
    background: #0B292D;
    color: rgba(255,255,255,.70);
}
.site-footer .container { width: calc(100% - 48px); max-width: 1280px; margin-inline: auto; }
.footer-main { padding-top: 52px; padding-bottom: 28px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    column-gap: 48px;
    row-gap: 32px;
    align-items: start;
    min-width: 0;
}
.footer-grid > * { min-width: 0; }
.site-footer h2 { margin: 0 0 16px; color: #fff; font-size: 1rem; font-weight: 700; line-height: 1.4; }
.footer-logo { display: inline-block; margin-bottom: 16px; }
.footer-logo img { display: block; width: 140px; height: auto; max-width: 100%; object-fit: contain; }
.footer-brand p { max-width: 310px; margin: 0; color: rgba(255,255,255,.70); font-size: .875rem; line-height: 1.75; }
.site-footer .footer-links,
.site-footer .footer-contact-list { display: grid; align-items: start; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer .footer-links li,
.site-footer .footer-contact-list li { margin: 0; padding: 0; }
.site-footer a { color: rgba(255,255,255,.70); transition: color var(--af-t-fast); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-links a { display: inline-block; padding: 0; font-size: .875rem; line-height: 1.6; }
.footer-contact-list a { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 28px; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.footer-contact .contact-icon {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    object-fit: contain;
}
.footer-contact .contact-icon--whatsapp { fill: #25D366; stroke: none; }
.footer-whatsapp { color: #fff !important; }
.footer-bottom-wrap { margin: 0; border-top: 1px solid rgba(255,255,255,.14); background: transparent; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0; padding-top: 18px; padding-bottom: 20px; border: 0; color: rgba(255,255,255,.55); font-size: .8rem; line-height: 1.5; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-legal a { font-size: .8rem; white-space: nowrap; }
.floating-whatsapp {
    position: fixed;
    z-index: 90;
    inset-inline-start: 20px;
    bottom: 22px;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    padding: 12px;
    border: 1px solid rgba(37,211,102,.45);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 24px rgba(8,43,49,.22);
    transition: transform var(--af-t-fast), box-shadow var(--af-t-fast);
}
.floating-whatsapp img { display: block; width: 28px; height: 28px; object-fit: contain; }
.floating-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(8,43,49,.28); }
.floating-whatsapp.is-footer-hidden { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px); }

@media (max-width: 1024px) {
    .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-area-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-developers .developer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}

@media (max-width: 768px) {
    .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
    .project-card .card-body { padding: 15px; }
    .project-card .card-actions { grid-template-columns: 1fr; }
    .home-area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
}

@media (max-width: 560px) {
    .home-search-trust { grid-template-columns: 1fr; }
    .section { padding: 38px 0; }
    .section-head { align-items: flex-start; margin-bottom: 20px; }
    .section-link { font-size: .86rem; }
    .listing-grid { grid-template-columns: 1fr; }
    .home-swipe-hint {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: -6px 0 10px;
        color: var(--af-text-muted);
        font-size: .78rem;
        line-height: 1.5;
    }
    .af-project-header-meta { display: grid; gap: 8px; }
    .home-listing-section .listing-grid,
    .home-developers .developer-grid {
        display: flex;
        grid-template-columns: none;
        gap: 14px;
        margin-inline: -16px;
        padding: 2px 16px 12px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scrollbar-width: thin;
        scrollbar-color: rgba(45,111,111,.35) transparent;
    }
    .home-listing-section .project-card,
    .home-developers .project-card {
        flex: 0 0 min(86vw, 342px);
        scroll-snap-align: start;
    }
    .project-card__title { min-height: 0; }
    .project-card .card-actions { grid-template-columns: 1.15fr .85fr; flex-direction: row; }
    .home-area-card { padding: 13px; }
    .home-area-card__icon { width: 34px; height: 34px; }
    .home-articles-grid { grid-template-columns: 1fr; }
    .home-article-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); }
    .home-article-card__media { aspect-ratio: auto; min-height: 132px; }
    .home-article-card h3 { min-height: 0; margin-bottom: 8px; -webkit-line-clamp: 3; }
    .home-final-cta__actions { flex-direction: column; }
    .home-final-cta__actions .button { width: 100%; }
    .button,
    .card-actions .button,
    .project-card .card-actions .button { min-height: 48px; font-size: .92rem; }
    .site-footer .container { width: calc(100% - 32px); }
    .footer-main { padding-top: 44px; padding-bottom: 26px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-logo img { width: 124px; }
    .footer-bottom { align-items: flex-start; flex-direction: column; gap: 10px; padding-top: 16px; padding-bottom: 18px; }
    .footer-legal { gap: 8px 14px; }
    .floating-whatsapp { display: none; }
}

/* ─── Form improvements ─── */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--af-border);
    border-radius: var(--af-radius-sm);
    font-size: 16px; /* Prevent zoom on iOS */
    font-family: inherit;
    transition: border-color var(--af-t-fast);
    background: var(--af-surface);
    color: var(--af-text);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--af-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45,111,111,.1);
}

button[type="submit"],
input[type="submit"] {
    min-height: 48px;
    font-size: 1rem;
}
