/* أركان العقار — صفحة "فروعنا"
           تعتمد على متغيرات ملف التنسيقات المشترك (aqar.css):
           --brand-gold / --brand-gray / --brand-gold-light / --aqar-page-bg
           وخط Almarai الموروث من body { font-family: 'Almarai', sans-serif; } */

    .branches-page {
        --branches-line: rgba(96, 99, 100, 0.18);
        --branches-radius: 18px;
        background: var(--aqar-page-bg);
        padding: 1.5rem 0 4rem;
    }

        .branches-page .custom-breadcrumb {
            margin-bottom: 1rem;
        }

    .branches-hero {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
        padding: 2.25rem 2.5rem;
        border: 1px solid var(--branches-line);
        border-radius: 22px;
        background: radial-gradient(circle at 8% 85%, rgba(230, 164, 20, .055), transparent 32%), #fff;
        box-shadow: 0 16px 38px rgba(26, 34, 38, .045);
    }

    .branches-hero-content {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        max-width: 720px;
    }

    .branches-hero-icon {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: var(--brand-gold-light);
        color: var(--brand-gold);
        font-size: 1.65rem;
    }

    .branches-hero h1 {
        margin: 0 0 .7rem;
        color: #202b2f !important;
        font-size: 2rem;
        font-weight: 800;
        line-height: 1.35;
    }

    .branches-hero p {
        margin: 0;
        color: #6f7a80;
        font-size: .98rem;
        line-height: 1.9;
    }

    .branches-hero-tag {
        display: inline-flex;
        align-items: center;
        gap: .6rem;
        flex: 0 0 auto;
        padding: .4rem .95rem;
        border: 1px solid rgba(230, 164, 20, .18);
        border-radius: 999px;
        background: var(--brand-gold-light);
        color: var(--brand-gold);
        font-size: .85rem;
        font-weight: 700;
    }

    html[data-bs-theme="dark"] .branches-page {
        --branches-line: rgba(255, 255, 255, .12);
    }

    html[data-bs-theme="dark"] .branches-hero {
        background: radial-gradient(circle at 8% 85%, rgba(230, 164, 20, .07), transparent 32%), var(--aqar-surface, #171d20);
    }

    html[data-bs-theme="dark"] .branches-hero h1 { color: #f4f6f7 !important; }
    html[data-bs-theme="dark"] .branches-hero p { color: #aeb7bc; }
    html[data-bs-theme="dark"] .branches-hero-tag {
        background: rgba(230, 164, 20, .1);
        border-color: rgba(230, 164, 20, .26);
    }

    /* ---------- directory ---------- */
    .branches-directory {
        padding-top: 1.5rem;
    }

    .branches-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
    }

    .branch-card {
        min-width: 0;
        display: flex;
        flex-direction: column;
        padding: 1.6rem;
        border: 1px solid var(--branches-line);
        border-radius: var(--branches-radius);
        background: #fff;
        box-shadow: 0 8px 24px rgba(26, 34, 38, .035);
        transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
    }

        .branch-card:hover {
            border-color: rgba(230, 164, 20, .4);
            box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .18);
            transform: translateY(-3px);
        }

    .branch-card-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1.1rem;
    }

    .branch-card-top h2 {
        margin: 0;
        font-size: 1.13rem;
        font-weight: 800;
    }

    .branch-number {
        display: inline-grid;
        place-items: center;
        min-width: 42px;
        height: 40px;
        padding-inline: .5rem;
        border-radius: 13px;
        background: var(--brand-gold-light);
        color: var(--brand-gold);
        font-size: .86rem;
        font-weight: 800;
        transition: background-color .25s ease, transform .25s ease;
    }

    .branch-card:hover .branch-number {
        background: rgba(230, 164, 20, .18);
        transform: translateY(-2px);
    }

    .branch-area {
        display: flex;
        align-items: center;
        gap: .45rem;
        color: #6c757d;
        font-size: .92rem;
    }

        .branch-area i {
            color: var(--brand-gold);
        }

    .branch-hours-row {
        min-height: 74px;
        display: flex;
        align-items: center;
        gap: .8rem;
        padding: .85rem 0;
        border-top: 1px solid var(--branches-line);
        border-bottom: 1px solid var(--branches-line);
    }

        .branch-hours-row > i {
            color: var(--brand-gold);
            font-size: 1.25rem;
        }

        .branch-hours-row span,
        .branch-hours-row strong {
            display: block;
        }

        .branch-hours-row span {
            margin-bottom: .15rem;
            color: #6c757d;
            font-size: .82rem;
        }

        .branch-hours-row strong {
            color: #2b2b2b;
            font-size: .95rem;
        }

    .branch-map-button {
        min-height: 44px;
        display: flex;
        align-items: center;
        gap: .55rem;
        margin-top: 1.25rem;
        padding: .6rem .9rem;
        border: 1.5px solid var(--brand-gold);
        border-radius: 11px;
        color: var(--brand-gold);
        font-weight: 700;
        text-decoration: none;
        transition: all .3s ease;
    }

        .branch-map-button i:first-child {
            color: inherit;
        }

        .branch-map-button i:last-child {
            margin-right: auto;
            transition: transform .2s ease;
        }

        .branch-map-button:hover {
            background: var(--brand-gold);
            color: #ffffff;
            box-shadow: 0 5px 15px rgba(230, 164, 20, .25);
        }

            .branch-map-button:hover i:last-child {
                transform: translateX(-3px);
            }

    /* ---------- visit note ---------- */
    .branches-visit-note {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
        margin-top: 2rem;
        padding: 1.5rem 1.75rem;
        border: 1px solid var(--branches-line);
        border-radius: var(--branches-radius);
        background: #fff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .04);
        transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
    }

    .branches-visit-note:hover {
        border-color: rgba(230, 164, 20, .38);
        box-shadow: 0 16px 34px rgba(26, 34, 38, .08);
        transform: translateY(-3px);
    }

    .branches-visit-note:hover .branches-visit-icon {
        background: var(--brand-gold);
        color: #fff;
        transform: rotate(-7deg);
    }

        .branches-visit-note > div {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

    .branches-visit-icon {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--brand-gold-light);
        color: var(--brand-gold);
        font-size: 1.15rem;
        transition: background-color .25s ease, color .25s ease, transform .25s ease;
    }

    @media (prefers-reduced-motion: no-preference) {
        .branches-hero {
            animation: branch-enter .65s ease-out backwards;
        }

        .branch-card {
            animation: branch-enter .65s ease-out backwards;
        }

        .branch-card:nth-child(1) { animation-delay: .12s; }
        .branch-card:nth-child(2) { animation-delay: .22s; }
        .branch-card:nth-child(3) { animation-delay: .32s; }

        .branches-visit-note {
            animation: branch-enter .65s .42s ease-out backwards;
        }
    }

    @keyframes branch-enter {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @media (prefers-reduced-motion: reduce) {
        .branch-card,
        .branches-hero,
        .branches-visit-note,
        .branches-visit-icon,
        .branch-number {
            animation: none !important;
            transition-duration: .01ms !important;
        }
    }

    .branches-visit-note strong {
        display: block;
        margin-bottom: .2rem;
        color: #2b2b2b;
    }

    .branches-visit-note p {
        margin: 0;
        color: #6c757d;
    }

    .branches-visit-link {
        display: inline-flex;
        align-items: center;
        gap: .55rem;
        flex: 0 0 auto;
        color: #2b2b2b;
        font-weight: 800;
        text-decoration: none;
        transition: color .2s ease;
    }

        .branches-visit-link:hover {
            color: var(--brand-gold);
        }

    /* ---------- responsive ---------- */
    @media (max-width: 991.98px) {
        .branches-grid {
            grid-template-columns: 1fr;
        }

    }

    @media (max-width: 767.98px) {
        .branches-page {
            padding: 1rem 0 2.5rem;
        }

        .branches-hero {
            align-items: flex-start;
            flex-direction: column;
            gap: 1.25rem;
            padding: 1.4rem;
        }

        .branches-hero h1 { font-size: 1.45rem; }

        .branches-directory {
            padding-top: 1rem;
        }

        .branches-visit-note {
            align-items: flex-start;
            flex-direction: column;
        }
    }
