.branches-page {
    min-height: 48vh;
}

.branches-hero {
    position: relative;
    overflow: hidden;
    background: #e7aac7;
    padding: 0 0 2rem;
}

.branches-hero__inner {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    min-height: 570px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 3rem;
    align-items: center;
    padding: 4.75rem 0 3rem;
}

.branches-hero__content {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.branches-hero__eyebrow {
    margin: 0 0 16px;
    color: var(--color-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.branches-hero__title {
    margin: 0;
    font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
    font-size: clamp(40px, 4.8vw, 58px);
    font-weight: 600;
    line-height: 0.96;
    letter-spacing: -0.035em;
}

.branches-hero__title-line {
    display: block;
}

.branches-hero__title-line--blue {
    color: var(--color-primary);
}

.branches-hero__title-line--red {
    color: var(--color-red);
}

.branches-hero__description {
    max-width: 430px;
    margin: 22px 0 0;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
}

.branches-hero__actions {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 190px;
}

.branches-hero__button {
    width: 100%;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.branches-hero__button:hover,
.branches-hero__button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 58, 47, 0.16);
}

.branches-hero__cities {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, 190px);
    gap: 12px;
}

.branches-hero__city {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.branches-hero__city-pin {
    position: relative;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    border-radius: 50% 50% 50% 0;
    background: currentColor;
    transform: rotate(-45deg);
}

.branches-hero__city-pin::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-white);
}

.branches-hero__city--tripoli {
    color: var(--color-primary);
}

.branches-hero__city--misrata {
    color: var(--color-red);
}

.branches-hero__city--benghazi {
    color: var(--color-yellow);
}

.branches-hero__visual-frame {
    display: contents;
}

.branches-hero__visual {
    position: relative;
    z-index: 1;
    width: 430px;
    height: 430px;
    justify-self: end;
}

.branches-hero__circle {
    position: absolute;
    border-radius: 50%;
}

.branches-hero__circle--white {
    width: 360px;
    height: 360px;
    top: -74px;
    right: -50px;
    background: #f6f3f1;
}

.branches-hero__circle--yellow {
    width: 295px;
    height: 295px;
    top: -41.5px;
    right: -17.5px;
    background: #f2c24f;
}

.branches-hero__graphic-card {
    position: absolute;
    right: 156px;
    bottom: 6px;
    width: 250px;
    height: 340px;
    border-radius: 36px;
    background: #2ea7df;
    box-shadow: 0 24px 40px rgba(46, 167, 223, 0.2);
}

.branches-hero__graphic-dot {
    position: absolute;
    border-radius: 50%;
}

.branches-hero__graphic-dot--yellow {
    width: 26px;
    height: 26px;
    top: 26px;
    left: 30px;
    background: #f2c24f;
}

.branches-hero__graphic-dot--white {
    width: 15px;
    height: 15px;
    top: 68px;
    right: 28px;
    background: #ffffff;
}

.branches-hero__graphic-dot--orange {
    z-index: 1;
    width: 36px;
    height: 36px;
    left: 6px;
    bottom: 56px;
    background: #f2c24f;
}

.branches-hero__graphic-star {
    position: absolute;
    top: -12px;
    right: -16px;
    width: 42px;
    height: 42px;
    background: #f53a2f;
    clip-path: polygon(50% 0%, 61% 34%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 34%);
}

.branches-hero__location-mark {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: 196px;
    height: 250px;
    transform: translate(-50%, -50%);
}

.branches-hero__marker {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50% 50% 50% 0;
    background: var(--color-red);
    transform: translateX(-50%) rotate(-45deg);
}

.branches-hero__marker::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 18px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-white);
}

.branches-hero__logo-badge {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 190px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    background: transparent;
    transform: translateX(-50%);
}

.branches-hero__logo-badge img {
    width: 296px;
    height: 296px;
    object-fit: contain;
    max-width: none;
    flex-shrink: 0;
}

/* Branches statistics */
.branches-stats {
    position: relative;
    padding: 36px 0;
    overflow: hidden;
    background: var(--color-white);
}

.branches-stats::before,
.branches-stats::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 6px;
    height: 88px;
    border-radius: 999px;
    transform: translateY(-50%);
}

.branches-stats::before {
    left: 8px;
    background: var(--color-pink);
}

.branches-stats::after {
    right: 8px;
    background: var(--color-yellow);
}

.branches-stats__inner {
    width: min(100% - 72px, var(--page-width));
    margin: 0 auto;
}

.branches-stats__bar {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border-radius: 22px;
    background: var(--color-primary);
}

.branches-stat {
    min-height: 76px;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.branches-stat + .branches-stat {
    border-left: 1px solid rgba(255, 255, 255, 0.55);
}

.branches-stat strong {
    color: var(--color-white);
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
}

.branches-stat span {
    margin-top: 8px;
    color: var(--color-yellow);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Branch locations */
.branches-locations {
    position: relative;
    padding: 64px 0 72px;
    overflow: hidden;
    background: var(--color-white);
    scroll-margin-top: 0;
}

.branches-locations::before,
.branches-locations::after {
    content: "";
    position: absolute;
    top: 0;
    width: 6px;
    height: 230px;
    border-radius: 999px;
}

.branches-locations::before {
    left: 8px;
    background: var(--color-pink);
}

.branches-locations::after {
    right: 8px;
    background: var(--color-yellow);
}

.branches-locations__inner {
    width: min(100% - 72px, var(--page-width));
    margin: 0 auto;
}

.branches-locations__heading {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.branches-locations__heading > p {
    margin: 0 0 10px;
    color: var(--color-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.branches-locations__heading h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: clamp(34px, 3.8vw, 48px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.branches-locations__heading > span {
    display: block;
    margin-top: 14px;
    color: var(--color-primary);
    font-size: 13px;
    line-height: 1.6;
}

.branches-locations__filters {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.branches-location-filter {
    --filter-color: var(--color-red);

    box-sizing: border-box;
    min-width: 132px;
    min-height: 40px;
    padding: 0 20px;
    border: 1.5px solid var(--filter-color);
    border-radius: 999px;
    color: var(--filter-color);
    background: var(--color-white);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
}

.branches-location-filter--tripoli {
    --filter-color: var(--color-primary);
}

.branches-location-filter--misrata {
    --filter-color: var(--color-red);
}

.branches-location-filter--benghazi {
    --filter-color: var(--color-yellow);
}

.branches-location-filter.is-active {
    color: var(--color-white);
    background: var(--filter-color);
}

.branches-location-filter--benghazi.is-active {
    color: var(--color-white);
}

.branches-locations__status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.branches-locations__grid {
    margin-top: 56px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.branch-location-card {
    --location-color: var(--color-primary);

    flex: 0 1 calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);
    min-width: 0;
    overflow: hidden;
    border: 2px solid var(--location-color);
    border-radius: 22px;
    background: var(--color-white);
}

.branch-location-card[hidden] {
    display: none;
}

.branch-location-card--tripoli {
    --location-color: var(--color-primary);
}

.branch-location-card--misrata {
    --location-color: var(--color-red);
}

.branch-location-card--benghazi {
    --location-color: var(--color-yellow);
}

.branch-location-card__visual {
    height: 190px;
    overflow: hidden;
    background: #eef2f5;
}

.branch-location-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.branch-location-card__content {
    padding: 18px;
}

.branch-location-card__city {
    min-width: 72px;
    min-height: 22px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--color-white);
    background: var(--location-color);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.branch-location-card--benghazi .branch-location-card__city {
    color: var(--color-white);
}

.branch-location-card h3 {
    margin: 16px 0 0;
    color: var(--color-primary);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.branch-location-card__content > p {
    min-height: 46px;
    margin: 10px 0 0;
    color: var(--color-primary);
    font-size: 14px;
    line-height: 1.55;
}

.branch-location-card__footer {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.branch-location-card__phone {
    color: var(--location-color);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.branch-location-card__map {
    min-height: 34px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    border: 1.5px solid var(--location-color);
    border-radius: 999px;
    color: var(--location-color);
    background: var(--color-white);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.branch-location-card__map-pin {
    position: relative;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    border-radius: 50% 50% 50% 0;
    background: currentColor;
    transform: rotate(-45deg);
}

.branch-location-card__map-pin::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-white);
}

.branch-location-card__map--disabled {
    opacity: 0.55;
}

@media (max-width: 900px) {
    .branches-locations__inner {
        width: min(100% - 40px, var(--page-width));
    }

    .branch-location-card {
        flex-basis: calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
    }
}

@media (max-width: 600px) {
    .branches-locations {
        padding: 52px 0 60px;
    }

    .branches-locations__filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .branches-location-filter {
        min-width: 0;
        width: 100%;
    }

    .branches-locations__grid {
        margin-top: 40px;
    }

    .branch-location-card {
        flex-basis: 100%;
        max-width: 100%;
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    .branches-hero__inner {
        min-height: 520px;
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 24px;
        padding: 4rem 0 2.5rem;
    }

    .branches-hero__content {
        max-width: none;
    }

    .branches-hero__cities {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .branches-hero__visual-frame {
        position: relative;
        width: 340px;
        height: 420px;
        display: block;
        justify-self: end;
    }

    .branches-hero__visual {
        position: absolute;
        top: 42px;
        right: -8px;
        width: 430px;
        height: 430px;
        margin: 0;
        transform: scale(0.76);
        transform-origin: top right;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .branches-hero {
        padding-bottom: 0;
    }

    .branches-hero__inner {
        position: relative;
        display: block;
        min-height: 370px;
        padding: 3.25rem 0 1.25rem;
    }

    .branches-hero__content {
        position: relative;
        z-index: 2;
        max-width: 430px;
    }

    .branches-hero__visual {
        position: absolute;
        top: 58px;
        right: 18px;
        width: 430px;
        height: 430px;
        margin: 0;
        transform: scale(0.56);
        transform-origin: top right;
    }

    .branches-hero__circle--white {
        width: 360px;
        height: 360px;
        top: -74px;
        right: -50px;
    }

    .branches-hero__circle--yellow {
        width: 295px;
        height: 295px;
        top: -41.5px;
        right: -17.5px;
    }

    .branches-hero__graphic-card {
        right: 156px;
        bottom: 6px;
        width: 250px;
        height: 340px;
        border-radius: 36px;
    }
}

@media (max-width: 640px) {
    .branches-hero {
        padding-bottom: 0;
    }

    .branches-hero__inner {
        display: block;
        width: min(100% - 1.5rem, 1180px);
        min-height: auto;
        padding: 2.75rem 0 1.5rem;
    }

    .branches-hero__content {
        max-width: none;
    }

    .branches-hero__title {
        font-size: clamp(38px, 11.5vw, 44px);
        line-height: 0.98;
    }

    .branches-hero__description {
        max-width: none;
    }

    .branches-hero__actions,
    .branches-hero__cities {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .branches-hero__button,
    .branches-hero__city {
        width: 100%;
    }

    .branches-hero__visual-frame {
        position: relative;
        width: 265px;
        height: 300px;
        margin: 52px auto 0;
        display: block;
    }

    .branches-hero__visual {
        position: absolute;
        top: 43px;
        right: auto;
        left: -14px;
        width: 430px;
        height: 430px;
        margin: 0;
        transform: scale(0.58);
        transform-origin: top left;
    }

    .branches-hero__circle--white {
        width: 360px;
        height: 360px;
        top: -74px;
        right: -50px;
    }

    .branches-hero__circle--yellow {
        width: 295px;
        height: 295px;
        top: -41.5px;
        right: -17.5px;
    }

    .branches-hero__graphic-card {
        right: 156px;
        bottom: 6px;
        width: 250px;
        height: 340px;
        border-radius: 36px;
    }
}

/* Plan Your Visit */
.branches-visit {
    position: relative;
    padding: 64px 0;
    overflow: hidden;
    background: var(--color-white);
}

.branches-visit::before,
.branches-visit::after {
    content: "";
    position: absolute;
    top: 32px;
    bottom: 32px;
    width: 6px;
    border-radius: 999px;
}

.branches-visit::before {
    left: 8px;
    background: var(--color-pink);
}

.branches-visit::after {
    right: 8px;
    background: var(--color-yellow);
}

.branches-visit__inner {
    width: min(100% - 72px, var(--page-width));
    margin: 0 auto;
}

.branches-visit__panel {
    padding: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 48px;
    align-items: center;
    border-radius: 34px;
    background: var(--color-pink);
}

.branches-visit__graphic-card {
    width: 100%;
    aspect-ratio: 1.45 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 28px;
    background: var(--color-white);
}

.branches-visit__graphic {
    width: 88%;
    height: auto;
    display: block;
}

.branches-visit__route {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.branches-visit__pin {
    color: var(--color-primary);
}

.branches-visit__pin path {
    fill: currentColor;
}

.branches-visit__pin circle {
    fill: var(--color-white);
}

.branches-visit__pin--red {
    color: var(--color-red);
}

.branches-visit__pin--blue {
    color: var(--color-primary);
}

.branches-visit__pin--yellow {
    color: var(--color-yellow);
}

.branches-visit__content {
    max-width: 520px;
}

.branches-visit__eyebrow {
    margin: 0 0 12px;
    color: var(--color-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.branches-visit__content h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: clamp(34px, 3.8vw, 48px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.branches-visit__description {
    margin: 18px 0 0;
    color: var(--color-primary);
    font-size: 14px;
    line-height: 1.65;
}

.branches-visit__features {
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    gap: 16px;
    list-style: none;
}

.branches-visit__feature {
    position: relative;
    padding-left: 28px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.branches-visit__feature::before {
    content: "";
    position: absolute;
    top: 0.35em;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--feature-color);
}

.branches-visit__feature--red {
    --feature-color: var(--color-red);
}

.branches-visit__feature--yellow {
    --feature-color: var(--color-yellow);
}

.branches-visit__feature--blue {
    --feature-color: var(--color-primary);
}

@media (max-width: 900px) {
    .branches-visit__inner {
        width: min(100% - 40px, var(--page-width));
    }

    .branches-visit__panel {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .branches-visit__graphic-card {
        max-width: 560px;
        margin: 0 auto;
    }

    .branches-visit__content {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .branches-visit {
        padding: 52px 0;
    }

    .branches-visit__panel {
        padding: 24px;
        border-radius: 26px;
    }

    .branches-visit__graphic-card {
        border-radius: 22px;
    }
}

/* Branch assistance contact strip */
.branches-contact-strip {
    position: relative;
    padding: 48px 0;
    overflow: hidden;
    background: var(--color-white);
}

.branches-contact-strip::before,
.branches-contact-strip::after {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    width: 6px;
    border-radius: 999px;
}

.branches-contact-strip::before {
    left: 8px;
    background: var(--color-pink);
}

.branches-contact-strip::after {
    right: 8px;
    background: var(--color-yellow);
}

.branches-contact-strip__inner {
    width: min(100% - 72px, var(--page-width));
    margin: 0 auto;
}

.branches-contact-strip__panel {
    min-height: 154px;
    padding: 26px 42px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 34px;
    align-items: center;
    border-radius: 28px;
    background: var(--color-primary);
}

.branches-contact-strip__icon {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-pink);
}

.branches-contact-strip__icon span {
    width: 52px;
    height: 52px;
    background: var(--color-white);
    clip-path: polygon(
        50% 0%,
        61% 34%,
        98% 35%,
        68% 57%,
        79% 91%,
        50% 70%,
        21% 91%,
        32% 57%,
        2% 35%,
        39% 34%
    );
}

.branches-contact-strip__content h2 {
    margin: 0;
    color: var(--color-white);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.branches-contact-strip__content p {
    margin: 12px 0 0;
    color: var(--color-white);
    font-size: 13px;
    line-height: 1.55;
}

.branches-contact-strip__phone {
    min-width: 184px;
    min-height: 46px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--color-primary);
    background: var(--color-yellow);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.branches-contact-strip__phone:hover,
.branches-contact-strip__phone:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(57, 86, 112, 0.18);
}

@media (min-width: 601px) and (max-width: 900px) {
    .branches-contact-strip__inner {
        width: min(100% - 40px, var(--page-width));
    }

    .branches-contact-strip__panel {
        min-height: 132px;
        padding: 24px 28px;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 22px;
    }

    .branches-contact-strip__icon {
        width: 72px;
        height: 72px;
    }

    .branches-contact-strip__icon span {
        width: 38px;
        height: 38px;
    }

    .branches-contact-strip__content h2 {
        font-size: 22px;
    }

    .branches-contact-strip__content p {
        margin-top: 8px;
        font-size: 12px;
    }

    .branches-contact-strip__phone {
        min-width: 150px;
        min-height: 42px;
        padding: 0 18px;
        justify-self: end;
    }
}

@media (max-width: 600px) {
    .branches-contact-strip {
        padding: 42px 0;
    }

    .branches-contact-strip__panel {
        padding: 28px 24px;
        grid-template-columns: 1fr;
        gap: 22px;
        text-align: center;
    }

    .branches-contact-strip__icon {
        justify-self: center;
    }

    .branches-contact-strip__phone {
        grid-column: 1;
        width: 100%;
        justify-self: stretch;
    }
}
