.electricity-provinces {
    --ep-brand: var(--main-color, #ff8102);
    --ep-navy: #15305d;
    --ep-text: #26364f;
    --ep-muted: #718098;
    --ep-line: #e3e8f0;
    --ep-soft: #fff7ee;
    margin: 0;
}

/* Giữ lại nội dung nhập từ config home_content của block cũ */
.electricity-provinces__home-content {
    margin: 0 0 18px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--ep-line);
    border-radius: 10px;
    color: #2c3442;
    font-size: 16px;
    line-height: 1.72;
}

.electricity-provinces__home-content h1,
.electricity-provinces__home-content h2,
.electricity-provinces__home-content h3 {
    color: var(--ep-navy);
    line-height: 1.35;
    margin: 0 0 12px;
}

.electricity-provinces__home-content h1 { font-size: 25px; }
.electricity-provinces__home-content h2 { font-size: 22px; }
.electricity-provinces__home-content h3 { font-size: 19px; }

.electricity-provinces__home-content p + p,
.electricity-provinces__home-content ul + p,
.electricity-provinces__home-content p + ul {
    margin-top: 10px;
}

.electricity-provinces__home-content a {
    color: var(--ep-brand);
    font-weight: 600;
}

.electricity-provinces__box {
    background: #fff;
    border: 1px solid var(--ep-line);
    border-radius: 12px;
    padding: 18px 20px 20px;
    box-shadow: 0 6px 18px rgba(25, 48, 85, .045);
}

.electricity-provinces__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 8px;
}

.electricity-provinces__intro {
    min-width: 0;
}

.electricity-provinces__intro strong {
    display: block;
    color: var(--ep-navy);
    font-size: 19px;
    line-height: 1.35;
    font-weight: 700;
}

.electricity-provinces__intro span {
    display: block;
    margin-top: 4px;
    color: var(--ep-muted);
    font-size: 14px;
    line-height: 1.5;
}

.electricity-provinces__switch {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: #f4f6f9;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
}

.electricity-provinces__tab {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: #53627a;
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    transition: .2s ease;
}

.electricity-provinces__tab b {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e6eaf0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5d6c82;
    font-size: 12px;
    font-weight: 700;
}

.electricity-provinces__tab:hover {
    color: var(--ep-navy);
}

.electricity-provinces__tab.is-active {
    background: #fff;
    color: var(--ep-brand);
    box-shadow: 0 2px 7px rgba(22, 48, 85, .09);
}

.electricity-provinces__tab.is-active b {
    color: #fff;
    background: var(--ep-brand);
}

.electricity-provinces__context {
    margin: 0 0 17px;
    color: #7a879a;
    font-size: 13px;
    line-height: 1.5;
}

.electricity-provinces__panel[hidden] {
    display: none !important;
}

.electricity-provinces__region + .electricity-provinces__region {
    margin-top: 24px;
}

.electricity-provinces__region-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf0f5;
}

.electricity-provinces__region-head h3 {
    margin: 0;
    color: var(--ep-navy);
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
}

.electricity-provinces__region-head span {
    flex: 0 0 auto;
    color: #75849a;
    font-size: 12px;
    line-height: 1;
    padding: 5px 8px;
    background: #f5f7fa;
    border-radius: 999px;
}

/* Không nhồi quá nhiều tỉnh trên một hàng: desktop tối đa 5 cột */
.electricity-provinces__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.electricity-provinces__item {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.electricity-provinces__link {
    min-height: 42px;
    height: 100%;
    padding: 6px 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 8px;
    color: var(--ep-text);
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.electricity-provinces__link:hover,
.electricity-provinces__link:focus-visible {
    color: var(--ep-brand);
    border-color: rgba(255, 129, 2, .44);
    background: var(--ep-soft);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(38, 55, 83, .06);
}

.electricity-provinces__icon {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #fff1e2;
    color: var(--ep-brand);
}

.electricity-provinces__icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.electricity-provinces__name {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.28;
}

@media screen and (max-width: 1180px) {
    .electricity-provinces__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media screen and (max-width: 760px) {
    .electricity-provinces__box {
        padding: 16px;
    }

    .electricity-provinces__toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
    }

    .electricity-provinces__switch {
        width: 100%;
    }

    .electricity-provinces__tab {
        flex: 1 1 50%;
    }

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

@media screen and (max-width: 600px) {
    .electricity-provinces__home-content {
        margin-bottom: 14px;
        padding: 15px 14px;
        border-radius: 9px;
        font-size: 15px;
        line-height: 1.65;
    }

    .electricity-provinces__home-content h1 { font-size: 22px; }
    .electricity-provinces__home-content h2 { font-size: 20px; }
    .electricity-provinces__home-content h3 { font-size: 18px; }

    .electricity-provinces__box {
        padding: 14px;
        border-radius: 10px;
        box-shadow: none;
    }

    .electricity-provinces__intro strong {
        font-size: 18px;
    }

    .electricity-provinces__intro span {
        font-size: 13px;
    }

    .electricity-provinces__context {
        margin-bottom: 14px;
    }

    .electricity-provinces__region + .electricity-provinces__region {
        margin-top: 20px;
    }

    .electricity-provinces__region-head {
        margin-bottom: 9px;
    }

    .electricity-provinces__region-head h3 {
        font-size: 17px;
    }

    .electricity-provinces__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .electricity-provinces__link {
        min-height: 40px;
        padding: 5px 7px;
        gap: 7px;
    }

    .electricity-provinces__icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .electricity-provinces__icon svg {
        width: 13px;
        height: 13px;
    }

    .electricity-provinces__name {
        font-size: 13.5px;
    }
}

@media screen and (max-width: 350px) {
    .electricity-provinces__grid {
        grid-template-columns: 1fr;
    }
}
