:root {
    color-scheme: dark;
    --red: #d51e32;
    --text: #f7f7f8;
    --muted: #aaaab1;
    --border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    background: #070708;
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 90% 0%, rgba(120, 8, 24, 0.3), transparent 36rem),
        radial-gradient(circle at 5% 90%, rgba(85, 7, 18, 0.18), transparent 32rem),
        #070708;
    font-family: Vazirmatn, Tahoma, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.branch-selector {
    width: min(1440px, calc(100% - 40px));
    min-height: 100vh;
    margin-inline: auto;
    padding-block: 24px;
}

.selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(12, 12, 14, 0.82);
    backdrop-filter: blur(18px);
}

.selector-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selector-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 15px;
}

.selector-brand span {
    display: grid;
    gap: 3px;
}

.selector-brand small,
.selector-language {
    color: var(--muted);
    font-size: 0.76rem;
}

.selector-language {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.selector-intro {
    max-width: 850px;
    margin: 80px auto 48px;
    text-align: center;
}

.selector-kicker {
    display: inline-flex;
    padding: 8px 14px;
    color: #ff9da7;
    border: 1px solid rgba(213, 30, 50, 0.38);
    border-radius: 999px;
    background: rgba(213, 30, 50, 0.14);
    font-size: 0.8rem;
}

.selector-intro h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.22;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.selector-intro p {
    max-width: 680px;
    margin: auto;
    color: var(--muted);
    line-height: 2;
}

.branch-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.branch-card {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 500px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: #101012;
    isolation: isolate;
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}

.branch-card:hover {
    transform: translateY(-7px);
    border-color: rgba(213, 30, 50, 0.58);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.branch-card__image {
    position: absolute;
    z-index: -2;
    inset: 0;
    background-image: var(--branch-image);
    background-position: center;
    background-size: cover;
    filter: saturate(0.75) contrast(1.08);
    transition: transform 450ms ease;
}

.branch-card:hover .branch-card__image {
    transform: scale(1.035);
}

.branch-card::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background:
        linear-gradient(
            180deg,
            rgba(4, 4, 5, 0.03),
            rgba(4, 4, 5, 0.22) 42%,
            rgba(4, 4, 5, 0.98) 92%
        ),
        linear-gradient(
            90deg,
            rgba(95, 6, 20, 0.22),
            transparent 62%
        );
}

.branch-card__content {
    align-self: end;
    display: grid;
    gap: 11px;
    padding: 30px;
}

.branch-card__content small {
    color: #ff9da7;
}

.branch-card__content strong {
    font-size: clamp(1.4rem, 2.15vw, 2rem);
    line-height: 1.4;
}

.branch-card__content span {
    min-height: 56px;
    color: #b6b6bd;
    line-height: 1.8;
}

.branch-card__content b {
    width: fit-content;
    margin-top: 8px;
    padding: 11px 17px;
    border-radius: 999px;
    background: var(--red);
    box-shadow: 0 10px 28px rgba(213, 30, 50, 0.2);
    font-size: 0.84rem;
    transition:
        transform 220ms ease,
        background-color 220ms ease,
        box-shadow 220ms ease;
}

.branch-card:hover .branch-card__content b,
.branch-card:focus-visible .branch-card__content b {
    transform: translateY(-2px);
    background: #ea2339;
    box-shadow: 0 14px 34px rgba(213, 30, 50, 0.34);
}

.branch-card:focus-visible {
    outline: 3px solid rgba(255, 109, 123, 0.8);
    outline-offset: 4px;
    border-color: rgba(255, 109, 123, 0.85);
}

.branch-card--dubai {
    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(213, 30, 50, 0.34),
            rgba(114, 9, 24, 0.12) 11rem,
            transparent 18rem
        ),
        linear-gradient(145deg, #181216, #09090a 64%, #050506);
}

.branch-card--dubai::after {
    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(4, 4, 5, 0.98) 92%
        );
}

.branch-card__logo {
    display: grid;
    place-items: center;
    background: none;
    filter: none;
}

.branch-card__logo img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 40px;
    opacity: 0.92;
    filter:
        drop-shadow(0 18px 36px rgba(0, 0, 0, 0.48))
        drop-shadow(0 0 30px rgba(213, 30, 50, 0.2));
    transform: translateY(-26px);
    transition:
        transform 320ms ease,
        opacity 220ms ease,
        filter 320ms ease;
}

.branch-card--dubai:hover .branch-card__logo img,
.branch-card--dubai:focus-visible .branch-card__logo img {
    opacity: 1;
    transform: translateY(-30px) scale(1.035);
    filter:
        drop-shadow(0 20px 42px rgba(0, 0, 0, 0.54))
        drop-shadow(0 0 38px rgba(213, 30, 50, 0.3));
}

.selector-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 70px;
    padding: 24px 4px 10px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.selector-footer strong {
    color: var(--text);
}

@media (max-width: 980px) {
    .branch-grid {
        grid-template-columns: 1fr 1fr;
    }

    .branch-card--dubai {
        grid-column: 1 / -1;
        min-height: 380px;
    }
}

@media (max-width: 650px) {
    .branch-selector {
        width: calc(100% - 24px);
        padding-top: 12px;
    }

    .selector-header {
        border-radius: 19px;
    }

    .selector-brand img {
        width: 46px;
        height: 46px;
    }

    .selector-intro {
        margin: 58px auto 38px;
        text-align: right;
    }

    .selector-intro h1 {
        font-size: clamp(2rem, 10vw, 3.1rem);
        line-height: 1.28;
    }

    .branch-grid {
        grid-template-columns: 1fr;
    }

    .branch-card,
    .branch-card--dubai {
        grid-column: auto;
        min-height: 430px;
        border-radius: 24px;
    }

    .branch-card__logo img {
        width: 160px;
        height: 160px;
        transform: translateY(-48px);
    }

    .branch-card--dubai:hover .branch-card__logo img,
    .branch-card--dubai:focus-visible .branch-card__logo img {
        transform: translateY(-52px) scale(1.025);
    }

    .branch-card__content {
        padding: 24px;
    }

    .selector-footer {
        display: grid;
        margin-top: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .branch-card,
    .branch-card__image {
        transition: none;
    }
}