/*
 * HMZ Public Sub-Branches
 * Isolated homepage/network styling.
 * Does not modify main-branch/location or booking CSS.
 */

.hmz-sub-branches {
    position: relative;
    padding: 66px 0 72px;
    overflow: hidden;
    border-top: 1px solid #e7eef7;
    background:
        radial-gradient(circle at 95% 0%, rgba(37, 99, 235, .08), transparent 29%),
        radial-gradient(circle at 0% 100%, rgba(14, 165, 233, .06), transparent 25%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.hmz-sub-branches::before {
    content: "";
    position: absolute;
    top: 26px;
    right: -58px;
    width: 150px;
    height: 150px;
    border: 24px solid rgba(37, 99, 235, .045);
    border-radius: 50%;
    pointer-events: none;
}

.hmz-sub-branches .public-container {
    position: relative;
    z-index: 1;
}

.hmz-sub-branches__head {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.hmz-sub-branches__head > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    padding: 6px 11px;
    border: 1px solid #cfe0ff;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .12em;
}

.hmz-sub-branches__head > span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.hmz-sub-branches__head h2 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.hmz-sub-branches__head p {
    max-width: 650px;
    margin: 0 auto;
    color: #64748b;
    font-size: .96rem;
    line-height: 1.65;
}

.hmz-sub-branches__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.hmz-sub-branch-card {
    position: relative;
    min-width: 0;
    min-height: 100%;
    padding: 23px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dde8f5;
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .07);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.hmz-sub-branch-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.hmz-sub-branch-card::after {
    content: "";
    position: absolute;
    top: -42px;
    right: -42px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .045);
    pointer-events: none;
}

.hmz-sub-branch-card:hover {
    transform: translateY(-4px);
    border-color: #bfd5f4;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .11);
}

.hmz-sub-branch-card__top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 16px;
}

.hmz-sub-branch-card__icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border: 1px solid #cfe0ff;
    border-radius: 14px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 17px;
    box-shadow: 0 7px 18px rgba(37, 99, 235, .10);
}

.hmz-sub-branch-card__top > div {
    min-width: 0;
    padding-top: 1px;
}

.hmz-sub-branch-card__top small {
    display: block;
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: .12em;
}

.hmz-sub-branch-card__top h3 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #0f172a;
    font-size: 1.06rem;
    font-weight: 900;
    line-height: 1.35;
}

.hmz-sub-branch-card__address {
    position: relative;
    margin: 0 0 17px;
    padding: 13px 14px 13px 38px;
    border: 1px solid #edf2f7;
    border-radius: 13px;
    background: #f8fafc;
    color: #475569;
    font-size: .88rem;
    line-height: 1.6;
}

.hmz-sub-branch-card__address::before {
    content: "\f3c5";
    position: absolute;
    top: 14px;
    left: 14px;
    color: #2563eb;
    font-family: "Font Awesome 6 Free";
    font-size: 13px;
    font-weight: 900;
}

.hmz-sub-branch-card__meta {
    display: grid;
    gap: 9px;
    margin-bottom: 18px;
}

.hmz-sub-branch-card__meta a,
.hmz-sub-branch-card__meta span {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #334155;
    font-size: .87rem;
    line-height: 1.5;
    text-decoration: none;
}

.hmz-sub-branch-card__meta a:hover {
    color: #1d4ed8;
}

.hmz-sub-branch-card__meta i {
    width: 18px;
    flex: 0 0 18px;
    margin-top: 3px;
    color: #2563eb;
    text-align: center;
}

.hmz-sub-branch-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 2px;
}

.hmz-sub-branch-card__actions .btn {
    min-height: 36px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.hmz-sub-branches__more {
    margin-top: 30px;
    text-align: center;
}

.hmz-sub-branches__more .btn {
    min-height: 42px;
    padding: 10px 17px;
    border-radius: 12px;
    font-weight: 800;
}

/* A single branch should still look intentional rather than like plain text. */
.hmz-sub-branches__grid > .hmz-sub-branch-card:only-child {
    width: min(100%, 620px);
    justify-self: center;
}

@media (max-width: 991.98px) {
    .hmz-sub-branches {
        padding: 58px 0 64px;
    }

    .hmz-sub-branches__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .hmz-sub-branches {
        padding: 48px 0 54px;
    }

    .hmz-sub-branches__head {
        margin-bottom: 25px;
        text-align: left;
    }

    .hmz-sub-branches__head > span {
        margin-bottom: 8px;
    }

    .hmz-sub-branches__head p {
        margin: 0;
    }

    .hmz-sub-branches__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hmz-sub-branch-card {
        padding: 20px;
        border-radius: 17px;
    }

    .hmz-sub-branch-card__actions .btn {
        flex: 1 1 auto;
    }
}

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

    .hmz-sub-branch-card:hover {
        transform: none;
    }
}


/* V1.0.1 - Address icon fix
   Replaces the missing Font Awesome pseudo-glyph (shown as a small square)
   with a CSS-only location pin, so it renders reliably without font dependency. */
.hmz-sub-branch-card__address::before {
    content: "" !important;
    position: absolute !important;
    top: 17px !important;
    left: 16px !important;
    width: 12px !important;
    height: 12px !important;
    border: 2px solid #2563eb !important;
    border-radius: 50% 50% 50% 0 !important;
    background: #ffffff !important;
    transform: rotate(-45deg) !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.hmz-sub-branch-card__address::after {
    content: "" !important;
    position: absolute !important;
    top: 20px !important;
    left: 19px !important;
    width: 4px !important;
    height: 4px !important;
    border-radius: 50% !important;
    background: #2563eb !important;
    z-index: 1 !important;
}

.hmz-sub-branch-card__address {
    padding-left: 42px !important;
}
