/* Branches page: map, province list and legend. Loaded only on that page. */

.bx-branches {
    --bx-navy: 0, 49, 104;
    --bx-lime: 203, 219, 42;
    --bx-line: #e4ebf2;
}

/* ---------- intro text ---------- */
.bx-branches .bx-intro {
    background: linear-gradient(180deg, #f7fafc 0%, #fff 100%);
    border: 1px solid var(--bx-line);
    border-radius: 18px;
    padding: 22px 24px;
    margin-bottom: 32px;
}

.bx-branches .bx-intro cite {
    display: inline-block;
    border-radius: 999px;
    font-style: normal;
    font-weight: 700;
}

.bx-branches .bx-intro p {
    margin-bottom: 14px;
    line-height: 2.1;
    text-align: justify;
}

.bx-branches .bx-intro p:last-child {
    margin-bottom: 0;
}

/* ---------- province list ---------- */
.bx-branches .bx-list .btn {
    position: relative;
    min-height: 58px;
    padding: 10px 12px;
    gap: 7px;
    background: #fff;
    border: 1px solid var(--bx-line);
    border-radius: 14px;
    color: rgb(var(--bx-navy));
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 1px 2px rgba(var(--bx-navy), .04);
    transition: transform .2s cubic-bezier(.2, .8, .2, 1),
    box-shadow .2s cubic-bezier(.2, .8, .2, 1),
    border-color .2s ease, background-color .2s ease;
}

/* map pin, from the Font Awesome already loaded by the layout */
.bx-branches .bx-list .btn::before {
    content: "\f3c5";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 13px;
    color: rgba(var(--bx-navy), .45);
    transition: color .2s ease;
}

.bx-branches .bx-list .btn:hover,
.bx-branches .bx-list .btn:focus-visible {
    background: #fff;
    border-color: rgb(var(--bx-navy));
    color: rgb(var(--bx-navy));
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(var(--bx-navy), .14);
}

.bx-branches .bx-list .btn:hover::before {
    color: rgb(var(--bx-navy));
}

/* ---------- map card ---------- */
.bx-branches .bx-map-card {
    background: linear-gradient(180deg, #f7fafc 0%, #ffffff 65%);
    border: 1px solid var(--bx-line);
    border-radius: 20px;
    padding: 8px 10px 0;
    box-shadow: 0 2px 6px rgba(var(--bx-navy), .05);
}

.bx-branches #iranMap {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 14px rgba(var(--bx-navy), .12));
}

/* provinces: solid brand colours instead of two shades of washed out navy,
   plus a hairline between neighbours so the shapes stay readable */
.bx-branches #iranMap .province path {
    stroke: #ffffff;
    stroke-width: 1;
    cursor: pointer;
    transition: fill .25s ease, filter .25s ease;
}

.bx-branches #iranMap .province path[data-map-have-branch='true'] {
    fill: rgba(var(--bx-navy), .82);
}

.bx-branches #iranMap .province path[data-map-have-branch='false'] {
    fill: rgba(var(--bx-navy), .17);
}

.bx-branches #iranMap .province a:hover path[data-map-have-branch='true'] {
    fill: rgb(var(--bx-lime));
    stroke: rgb(var(--bx-navy));
}

.bx-branches #iranMap .province a:hover path[data-map-have-branch='false'] {
    fill: rgba(var(--bx-lime), .62);
    stroke: rgba(var(--bx-navy), .6);
}

/* softer water so the map does not shout */
.bx-branches #iranMap .sea path,
.bx-branches #iranMap .lake path {
    fill: #d9ecf8;
}

.bx-branches #iranMap .island {
    fill: #ffffff;
}

/* ---------- legend ---------- */
.bx-branches .bx-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
    background: #fff;
    border: 1px solid var(--bx-line);
    border-radius: 16px;
    padding: 14px 18px;
    margin: 18px 0 0;
    font-size: 14px;
    line-height: 2.1;
    color: #46566b;
}

.bx-branches .bx-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px !important;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
}

.bx-branches .bx-tag::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: currentColor;
}

.bx-branches .bx-tag-branch {
    background: rgba(var(--bx-navy), .08) !important;
    color: rgba(var(--bx-navy), .95) !important;
}

.bx-branches .bx-tag-cover {
    background: rgba(var(--bx-navy), .05) !important;
    color: rgba(var(--bx-navy), .45) !important;
}

@media (max-width: 575px) {
    .bx-branches .bx-intro {
        padding: 16px 16px;
    }

    .bx-branches .bx-list .btn {
        min-height: 52px;
        font-size: 14px;
    }

    .bx-branches .bx-legend {
        padding: 12px 14px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bx-branches * {
        transition: none !important;
    }
}

.bx-branches .bx-legend-hint {
    color: #5a6b80;
    font-size: 13.5px;
}

.bx-branches .bx-legend-hint::before {
    content: "\f05a";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    margin-inline-end: 6px;
    color: rgba(0, 49, 104, .35);
}

/* ---------- single branch page ---------- */
.bx-single .bx-card {
    background: #fff;
    border: 1px solid var(--bx-line);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: 0 1px 2px rgba(var(--bx-navy), .04);
}

.bx-single .bx-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bx-line);
    color: rgb(var(--bx-navy));
    font-size: 17px;
    font-weight: 700;
    font-style: normal;
}

.bx-single .bx-card-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(var(--bx-navy), .07);
    color: rgb(var(--bx-navy));
    font-size: 14px;
}

.bx-single .bx-card .table {
    margin: 0;
}

.bx-single .bx-card .table tr:last-child th,
.bx-single .bx-card .table tr:last-child td {
    border-bottom: 0;
}

.bx-single .bx-card .table th,
.bx-single .bx-card .table td {
    padding: 11px 4px;
    border-color: var(--bx-line);
    vertical-align: top;
    background: transparent;
}

.bx-single .bx-card .table th {
    width: 36%;
    color: #6b7c91;
    font-size: 14px;
    font-weight: 500;
}

.bx-single .bx-card .table td {
    color: rgb(var(--bx-navy));
    font-size: 15px;
    font-weight: 600;
    line-height: 2;
}

/* embedded google map */
.bx-single .bx-embed {
    border: 1px solid var(--bx-line);
    border-radius: 16px;
    overflow: hidden;
}

.bx-single .bx-embed iframe {
    width: 100%;
    min-height: 340px;
    border: 0;
    display: block;
}

.bx-single .bx-card p {
    line-height: 2.1;
    text-align: justify;
}

/* galleries */
.bx-single .swiper-branch-gallery .ratio,
.bx-single .certificate-gallery .border {
    border-radius: 14px;
    overflow: hidden;
    border-color: var(--bx-line) !important;
}

/* other branches strip */
.bx-single .bx-others {
    background: #f6f9fb;
    border-top: 1px solid var(--bx-line);
    border-bottom: 1px solid var(--bx-line);
    margin-top: 40px;
}

.bx-single .bx-others h3 {
    color: rgb(var(--bx-navy));
    font-size: 20px;
    font-weight: 700;
}

@media (max-width: 575px) {
    .bx-single .bx-card {
        padding: 16px;
    }

    .bx-single .bx-card .table th {
        width: 40%;
        font-size: 13px;
    }

    .bx-single .bx-card .table td {
        font-size: 14px;
    }
}

.bx-single .bx-card .table th,
.bx-single .bx-card .table td {
    text-align: start;
}

/* the stored embeds carry height=600 which dwarfs the rest of the page */
.bx-single .bx-embed iframe {
    height: 420px;
}

/* ---------- home: latest news carousel (this file is loaded on the home page) ---------- */
.swiper-news {
    padding: 4px 4px 46px;
}

.swiper-news .swiper-slide {
    height: auto;
}

.swiper-news .swiper-slide h4 {
    font-size: 17px;
    line-height: 1.9;
}

.swiper-news .swiper-slide p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.swiper-news .swiper-button-next,
.swiper-news .swiper-button-prev {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e4ebf2;
    box-shadow: 0 4px 12px rgba(0, 49, 104, .12);
    color: #003168;
    transition: background-color .2s ease, color .2s ease;
}

.swiper-news .swiper-button-next:after,
.swiper-news .swiper-button-prev:after {
    font-size: 15px;
    font-weight: 700;
}

.swiper-news .swiper-button-next:hover,
.swiper-news .swiper-button-prev:hover {
    background: #003168;
    color: #fff;
}

.swiper-news .swiper-pagination {
    bottom: 8px;
}

.swiper-news .swiper-pagination-bullet-active {
    background: #003168;
}

@media (max-width: 991px) {
    .swiper-news .swiper-button-next,
    .swiper-news .swiper-button-prev {
        display: none;
    }
}
