/*
 * fa-projects.css — «پروژه‌های ساختمانی آدونیس» section
 * Luxury dark-navy project cards grid for /fa-new/ homepage.
 */

/* ── Section shell ─────────────────────────────────────────────────────────── */
.fa-projects-section {
    position: relative;
    padding: clamp(64px, 7vw, 96px) 0 clamp(80px, 9vw, 120px);
    background:
        radial-gradient(68% 55% at 5%  15%, rgba(30,  90, 168, 0.14), transparent 58%),
        radial-gradient(56% 56% at 94% 82%, rgba(250, 204,  21, 0.07), transparent 58%),
        linear-gradient(168deg, #02080f 0%, #050e1e 45%, #091730 100%);
    overflow: hidden;
}

.fa-projects-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 100%);
    background-size: 140px 140px;
    opacity: 0.3;
    z-index: 0;
}

/* ── Container ─────────────────────────────────────────────────────────────── */
.fa-projects-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 32px);
}

/* ── Section header ─────────────────────────────────────────────────────────── */
.fa-projects-head {
    text-align: center;
    margin-bottom: clamp(2.2rem, 3.8vw, 3.4rem);
}

.fa-projects-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #facc15;
    margin-bottom: 0.8rem;
}

.fa-projects-title {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.fa-projects-subtitle {
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    color: rgba(220, 232, 255, 0.72);
    max-width: 680px;
    margin-inline: auto;
    line-height: 1.75;
}

/* ── Project cards grid (3-col desktop) ─────────────────────────────────────── */
.fa-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* ── Base project card ─────────────────────────────────────────────────────── */
.fa-project-card {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    text-decoration: none;
    border: 1px solid rgba(183, 206, 242, 0.12);
    box-shadow:
        0 6px 28px rgba(1, 6, 16, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

/* First card spans 2 rows for featured look */
.fa-projects-grid .fa-project-card:first-child {
    grid-row: span 1;
    aspect-ratio: unset;
    min-height: 480px;
}

.fa-project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.38);
    box-shadow:
        0 18px 52px rgba(6, 30, 80, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Card media (image area fills entire card) ──────────────────────────────── */
.fa-project-card-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.fa-project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.42s ease;
}

.fa-project-card:hover .fa-project-card-image {
    transform: scale(1.04);
}

/* Placeholder gradients when no image */
.fa-project-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #091a35 0%, #153055 60%, #0b2040 100%);
}

.fa-project-card-placeholder[data-card-index="1"] {
    background: linear-gradient(145deg, #0a1c38 0%, #183260 55%, #0d2045 100%);
}

.fa-project-card-placeholder[data-card-index="2"] {
    background: linear-gradient(145deg, #070f22 0%, #102848 55%, #091830 100%);
}

.fa-project-card-placeholder[data-card-index="3"] {
    background: linear-gradient(145deg, #060d1e 0%, #0e2040 55%, #081525 100%);
}

.fa-project-card-placeholder[data-card-index="4"] {
    background: linear-gradient(145deg, #04090f 0%, #0b1a2f 55%, #060e1e 100%);
}

/* ── Dark gradient overlay (bottom-up) ─────────────────────────────────────── */
.fa-project-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(2, 8, 20, 0.96) 0%,
        rgba(2, 8, 20, 0.60) 40%,
        rgba(2, 8, 20, 0.18) 70%,
        transparent 100%
    );
    transition: background 0.35s ease;
}

.fa-project-card:hover .fa-project-card-overlay {
    background: linear-gradient(
        to top,
        rgba(2, 8, 20, 0.92) 0%,
        rgba(2, 8, 20, 0.52) 38%,
        rgba(2, 8, 20, 0.20) 68%,
        transparent 100%
    );
}

/* ── Card body / text ────────────────────────────────────────────────────────── */
.fa-project-card-body {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 2;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    direction: rtl;
}

/* ── Badge ──────────────────────────────────────────────────────────────────── */
.fa-project-card-badge {
    align-self: flex-start;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #facc15;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.36);
}

/* ── Location ───────────────────────────────────────────────────────────────── */
.fa-project-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.73rem;
    font-weight: 500;
    color: rgba(180, 204, 240, 0.80);
    letter-spacing: 0.01em;
}

.fa-project-card-location svg {
    flex-shrink: 0;
    opacity: 0.75;
}

/* ── Title ──────────────────────────────────────────────────────────────────── */
.fa-project-card-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* ── Short description ─────────────────────────────────────────────────────── */
.fa-project-card-desc {
    margin: 0;
    color: rgba(210, 226, 250, 0.75);
    font-size: 0.78rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

/* ── Per-card CTA label ─────────────────────────────────────────────────────── */
.fa-project-card-btn {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.80);
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.fa-project-card:hover .fa-project-card-btn {
    color: #facc15;
}

/* ── Section-level "View More" CTA ──────────────────────────────────────────── */
.fa-projects-cta {
    display: flex;
    justify-content: center;
    margin-top: clamp(2rem, 3.5vw, 3rem);
}

.fa-projects-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    color: #0B1F3A;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    background: #D4AF37;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.30);
    transition:
        background 0.28s ease,
        border-color 0.28s ease,
        color 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.28s ease;
}

.fa-projects-cta-btn svg {
    transition: transform 0.28s ease;
    flex-shrink: 0;
}

.fa-projects-cta-btn:hover {
    background: #B8960C;
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(212, 175, 55, 0.40);
    transform: translateY(-2px);
}

/* RTL: arrow should point left on hover */
.fa-projects-cta-btn:hover svg {
    transform: translateX(-4px);
}

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

/* Tablet: 2-col */
@media (max-width: 1024px) {
    .fa-projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .fa-projects-grid .fa-project-card:first-child {
        min-height: 360px;
    }
}

/* Small tablet */
@media (max-width: 768px) {
    .fa-projects-section {
        padding-block: clamp(48px, 6vw, 72px);
    }

    .fa-project-card {
        aspect-ratio: 4 / 3;
    }

    .fa-projects-grid .fa-project-card:first-child {
        min-height: 280px;
    }
}

/* Mobile: single column */
@media (max-width: 540px) {
    .fa-projects-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .fa-project-card,
    .fa-projects-grid .fa-project-card:first-child {
        aspect-ratio: 4 / 3;
        min-height: 0;
    }

    .fa-project-card-title {
        font-size: 1rem;
    }

    .fa-project-card-desc {
        display: none;
    }

    .fa-projects-cta-btn {
        font-size: 0.86rem;
        padding: 12px 28px;
    }
}
