﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body, #map {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 10;
    font-family: var(--main-font);
}
/* Ẩn copyright text của Google Maps */
.gmnoprint .gm-style-cc {
    display: none !important;
}

/* Ẩn tất cả các elements có class gmnoprint */
.gmnoprint {
    display: none !important;
}

/* Ẩn copyright cụ thể */
[class*="copyright"] {
    display: none !important;
}

/* Ẩn các text liên quan đến Google Maps attribution */
.gm-style .gm-style-cc {
    display: none !important;
}

.gm-style-cc {
    display: none !important;
}

/* Ẩn Terms of Use link */
.gm-style .gm-style-cc a {
    display: none !important;
}

.gmnoprint {
    display: none !important;
}

.c-story-backgrounds {
    position: fixed;
    width: 100%;
    height: 100vh;
    background-color: #00aeef;
    opacity: 80%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

    .c-story-backgrounds::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 100vw;
        height: 100vw;
        transform: translate(-50%, -50%);
        background-image: url(/image/trongdong.png);
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        animation: rotateBackground 60s linear infinite;
        transform-origin: center center;
        opacity: 1;
        z-index: 9999;
    }

.c-story-backgrounds__clockwise {
    position: absolute;
    top: -50%; /* Mở rộng ra trên */
    left: -60%; /* Mở rộng ra trái */
    width: 220%; /* Tăng chiều rộng */
    height: 220%; /* Tăng chiều cao */
    margin: 0;
    padding: 0;
}

    .c-story-backgrounds__clockwise img {
        width: 100%;
        height: 100%;
        object-fit: fill; /* Đổi từ cover sang contain để giữ tỷ lệ */
        object-position: center;
        opacity: 1;
        display: block;
    }

/* Responsive cho mobile */
@media (max-width: 768px) {
    .c-story-backgrounds__clockwise {
        top: 0%;
        left: -21%;
        width: 140%;
        height: 100%;
        animation-duration: 90s; /* Chậm hơn trên mobile */
    }
}

/* Lazy loading support */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

    .lazy.loaded {
        opacity: 1;
    }

/* Keyframe animation */
@keyframes rotateBackground {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive cho mobile - quay chậm hơn */
@media (max-width: 768px) {
    #rotating-background {
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        animation-duration: 90s; /* Chậm hơn trên mobile */
    }
}

/* Tùy chọn: Pause khi hover (chỉ trên desktop) */
@media (min-width: 769px) {
    #rotating-background:hover {
        animation-play-state: paused;
    }
}

/* Hiệu ứng fade kết hợp với quay */
@keyframes rotateWithFade {
    0% {
        transform: rotate(0deg);
        opacity: 0.3;
    }

    50% {
        opacity: 0.2;
    }

    100% {
        transform: rotate(360deg);
        opacity: 0.3;
    }
}

/* Class để chuyển đổi hiệu ứng */
#rotating-background.fade-effect {
    animation: rotateWithFade 60s linear infinite;
}

.container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* Sidebar bên trái */
.sidebar {
    width: 380px;
    background: #fafafa;
    border-right: 1px solid #e8eaed;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    transition: transform 0.5s ease;
    position: absolute;
    z-index: 99999;
    height: 100vh;
    overflow-y: auto; 
    overflow-x: hidden; 
}

    .sidebar.collapsed {
        transform: translateX(-100%);
        transition: transform 0.5s ease;
    }

        .sidebar.collapsed .expand-btn {
            display: none !important;
        }

.logo-city {
    width: auto;
    position: relative;
}

    .logo-city .logo-map {
        background: transparent !important;
        justify-content: center;
        align-items: center;
        margin: 0;
        cursor: pointer;
        border: none !important;
        position: absolute;
        top: 20px;
        left: 20px;
        z-index: 999;
    }

        .logo-city .logo-map img {
            width: 38px !important;
            height: 38px !important;
            filter: none !important;
        }

        .logo-city .logo-map:hover img {
            transform: scale(1.1);
            transition: all 0.3s ease;
        }

/* Map container */
.map-container {
    flex: 1;
    position: relative;
    height: 100vh;
}

#map {
    width: 100%;
    height: 100%;
}

/* Header của sidebar */
.sidebar-header {
    background: linear-gradient(135deg, #009EF7 0%, #1447e6 100%);
    color: white;
    padding: 26px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    flex-shrink: 0;
}

    .sidebar-header .logo {
        width: 50px;
        height: 50px;
        background: #fff;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        cursor: pointer;
    }

        .sidebar-header .logo img {
            width: 22px;
            height: 22px;
            object-fit: contain;
        }

    .sidebar-header .header-content h1 {
        font-size: 20px;
        font-weight: 700;
        margin: 0;
        color: white;
    }

    .sidebar-header .header-content .detail {
        font-size: .85rem;
    }

    .sidebar-header .close-btn {
        position: absolute;
        /*top: 17px;*/
        right: 15px;
        width: 30px;
        height: 30px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        border-radius: 50%;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s;
    }

        .sidebar-header .close-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

/* Expand button */
.expand-btn {
    display: none;
    position: absolute;
    top: 29px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

    .expand-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* Thông tin cơ bản Hà Nội */
.city-info {
    background: #f8f9fa;
    padding: 16px;
    margin: 0 8px;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #e8eaed;
    flex-shrink: 0;
}

.city-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #1a73e8;
    font-size: 18px;
}

    .city-info-item:last-child {
        margin-bottom: 0;
    }

.city-info-label {
    font-weight: 500;
    color: #202124;
}

.city-info-value {
    color: #5f6368;
    font-weight: 400;
}

/* Search section */
.search-section {
    padding: 16px;
    background: white;
    margin: 8px;
    border-radius: 0.65rem;
    border: 1px solid #e8eaed;
    flex-shrink: 0;
}

    .search-section h3 {
        color: #202124;
        margin-bottom: 12px;
        text-align: center;
        font-weight: 700;
    }

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    font-size: 17px;
}

    .search-input:focus {
        border-color: #1a73e8;
        box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
    }

/* Danh sách phường/xã */
.commune-list {
    flex: 1; /* Chiếm toàn bộ không gian còn lại */
    overflow-y: auto; /* Chỉ có scroll dọc */
    margin: 0 8px 8px 8px;
    background: white;
    border-radius: 0.65rem;
    border: 1px solid #e8eaed;
}

.commune-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
}

    .commune-item:hover {
        background-color: #f8f9fa;
    }

    .commune-item.selected {
        background-color: #e8f0fe;
        border-left: 4px solid #1a73e8;
    }

    .commune-item:first-child {
        border-radius: 8px 8px 0 0;
    }

    .commune-item:last-child {
        border-bottom: none;
        border-radius: 0 0 8px 8px;
    }

.commune-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.commune-name {
    font-size: 15px;
    color: #202124;
    font-weight: 400;
}

/* Panel chi tiết bên phải */
.detail-panel {
    position: absolute;
    bottom: 20px;
    right: 10px;
    width: 383px;
    background: #fafafa;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    max-height: calc(100vh - 105px);
    overflow: hidden;
    transition: all 0.3s ease;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

    .detail-panel.show {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

.detail-panel-header {
    padding: 13px;
    border-bottom: 1px solid #e8eaed;
    position: relative;
}

.detail-panel-title {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin: 0 40px 0 0;
    line-height: 1.3;
}

.detail-panel-close {
    position: absolute;
    top: 12px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

    .detail-panel-close:hover {
        background-color: #f1f3f4;
    }

.detail-panel-content {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 185px);
}

.detail-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 10px;
}

.detail-info-item {
    text-align: center;
    flex: 1;
}

.text-blue {
    color: #324C9A;
    font-weight: bold;
}

.bg-text-blue {
    background-color: #EFF6FF;
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 10px;
}

.text-green {
    color: #155A32;
    font-weight: bold;
    background-color: #F0FDF4;
}

.bg-text-green {
    background-color: #F0FDF4;
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 10px;
}


.detail-info-value {
    font-size: 20px;
    margin-bottom: 4px;
}

.detail-info-label {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: center;
}

    .detail-info-label svg {
        margin-right: 6px;
    }

.detail-section {
    margin-bottom: 24px;
}

.detail-section-title {
    font: 700 16px / 1.2 var(--main-font), Arial;
    color: #222;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section-content {
    font-size: 16px;
    line-height: 1.5;
    background-color: #eff6ff;
    border-radius: 8px;
}

.detail-section .etail-section-title a {
    text-decoration: none;
}

.detail-contact {
    padding: 13px;
    color: #364153;
    font-size: 16px;
}

    .detail-contact.leader {
        line-height: 1.5;
        background-color: #eff6ff;
        border-radius: 8px;
    }

.contact-item {
    /* display: flex;
  align-items: flex-start; */
    letter-spacing: normal; /* hoặc 0 */
    word-spacing: normal;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.4;
}


    .contact-item:last-child {
        margin-bottom: 0;
    }

.contact-icon {
    width: 20px;
    height: 20px;
    color: #5f6368;
}

.contact-text {
    font-size: 14px;
    color: #202124;
}

.contact-link {
    color: #1a73e8;
    text-decoration: none;
}

    .contact-link:hover {
        text-decoration: underline;
    }

/* Custom labels trên map - Zoom responsive */
.custom-label {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    background: transparent;
    padding: 0;
    border-radius: 0;
    white-space: nowrap;
    box-shadow: none;
    border: none;
    color: #000000;
    pointer-events: none;
    user-select: none;
    text-align: center;
    line-height: 1.2;
    transition: none;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8), -1px -1px 2px rgba(255, 255, 255, 0.8), 1px -1px 2px rgba(255, 255, 255, 0.8), -1px 1px 2px rgba(255, 255, 255, 0.8);
    opacity: 1;
    transform-origin: center center;
    will-change: transform;
}

    /* Zoom level classes */
    .custom-label.zoom-small {
        font-size: 0px;
        opacity: 0.7;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .custom-label.zoom-medium {
        font-size: 11px;
        opacity: 0.85;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .custom-label.zoom-large {
        font-size: 18px;
        opacity: 1;
        max-width: none;
        overflow: visible;
    }

    .custom-label.zoom-xlarge {
        font-size: 22px;
        opacity: 1;
        max-width: none;
        overflow: visible;
    }

/* Toggle buttons */
.toggle-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1002;
    display: flex;
    gap: 8px;
}

.toggle-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    right: -10px;
}

    .toggle-btn:hover {
        background-color: #f8f9fa;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .toggle-btn svg {
        width: 20px;
        height: 20px;
        color: #5f6368;
    }

    .toggle-btn.active {
        background: #1a73e8;
        color: white;
    }

        .toggle-btn.active svg {
            color: white;
        }

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1005;
    width: 45px;
    height: 45px;
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .mobile-toggle:hover {
        background-color: #f8f9fa;
        transform: scale(1.05);
    }

    .mobile-toggle svg {
        color: #202124;
    }

/* Overlay cho mobile */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1003;
    backdrop-filter: blur(2px);
}

    .mobile-overlay.active {
        display: block;
    }

.logoViettel {
    width: auto;
    position: relative; /* Thêm dòng này */
}

    .logoViettel .logo-footer {
        padding-top: 10px;
        position: absolute;
        bottom: 8px;
        left: 390px;
        z-index: 10000;
        display: flex;
        text-decoration: none;
    }

    .logoViettel .company-logo img {
        width: 100%;
        height: 25px;
        /*filter: brightness(0) invert(1);*/
    }

/* Responsive Design */
@media (min-width: 1200px) {
    .sidebar {
        width: 380px;
    }

    .detail-panel {
        width: 385px;
    }
}

@media (max-width: 1024px) {
    .mobile-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 85%;
        max-width: 380px;
        transform: translateX(-100%);
        transition: transform 0.5s ease;
        z-index: 1004;
        border-radius: 0 15px 15px 0;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
        overflow: auto;
    }

        .sidebar.active {
            transform: translateX(0);
        }

        /*.sidebar .close-btn,
        .sidebar .expand-btn {
            display: none !important;
        }*/

    .toggle-buttons {
        top: -20px;
    }
}

@media (max-width: 426px) {
    .toggle-buttons {
        top: 25px;
        right: 0px;
    }
}


@media (max-width: 768px) {
    .container {
        flex-direction: row;
    }

    .logoViettel .company-logo img {
        width: 100px;
        height: 20px;
    }

    .logoViettel .sologan {
        display: none;
    }

    .logoViettel {
        display: none;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        max-width: 380px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 9999;
        border-radius: 0 15px 15px 0;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
        overflow: auto;
    }

        .sidebar.active {
            transform: translateX(0);
        }

        .sidebar.collapsed {
            width: 85%;
            max-width: 380px;
            transform: translateX(-100%);
            height: 100vh;
        }

            .sidebar.collapsed.active {
                transform: translateX(0);
            }

        /*.sidebar .close-btn,
        .sidebar .expand-btn {
            display: none !important;
        }*/

    .mobile-toggle {
        display: flex;
    }

    .map-container {
        width: 100%;
        margin-left: 0;
        position: relative;
    }

    .detail-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        z-index: 1002;
    }
        /* 
  .toggle-buttons {
    margin-right: 45px;
    margin-top: -10px;
  } */

        .detail-panel.show {
            transform: translateY(0);
        }

    .detail-panel-content {
        max-height: calc(70vh - 80px);
        padding: 15px;
    }

    .detail-panel-header {
        padding: 15px;
    }

    .detail-panel-title {
        font-size: 22px;
    }

    .detail-info {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .detail-info-item {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
    }

    .detail-info-value {
        font-size: 18px;
        margin-bottom: 0;
    }

    .detail-info-label {
        font-size: 16px;
    }

    .detail-section-title {
        font-size: 16px;
    }

    .detail-section-content {
        font-size: 15px;
    }

    .contact-item {
        font-size: 15px;
        flex-wrap: wrap;
    }

    .toggle-buttons {
        right: 15px;
        top: 15px;
    }

    .toggle-btn {
        top: 0;
        right: -8px;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile label adjustments */
    .custom-label.zoom-small {
        font-size: 8px;
        max-width: 60px;
    }

    .custom-label.zoom-medium {
        font-size: 11px;
        max-width: 100px;
    }

    .custom-label.zoom-large {
        font-size: 14px;
    }

    .custom-label.zoom-xlarge {
        font-size: 16px;
    }

    .detail-panel-close {
        top: 13px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        max-width: none;
    }

    .sidebar-header {
        padding: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        position: relative;
    }

        .sidebar-header .header-content h1 {
            font-size: 18px;
        }

    .sidebar.collapsed {
        width: 90%;
        transform: translateX(-100%);
    }

    .city-info {
        padding: 12px;
        margin: 0 6px;
    }

    .city-info-item {
        font-size: 18px;
        padding: 6px 10px;
    }

    .search-section {
        padding: 12px;
        margin: 6px;
    }

        .search-section h3 {
            font-size: 20px;
        }

    .search-input {
        font-size: 16px;
        padding: 10px 14px;
    }

    .commune-list {
        margin: 0 6px 6px 6px;
    }

    .commune-item {
        padding: 12px 14px;
    }

    .commune-name {
        font-size: 16px;
    }

    .detail-panel {
        max-height: 75vh;
    }

    .detail-panel-content {
        max-height: calc(75vh - 70px);
        padding: 12px;
    }

    .detail-panel-header {
        padding: 12px;
    }

    .detail-panel-title {
        font-size: 20px;
    }

    .detail-info-item {
        padding: 10px;
    }

    .detail-info-value {
        font-size: 16px;
    }

    .detail-info-label {
        font-size: 14px;
    }

    .detail-section-title {
        font-size: 15px;
    }

    .detail-section-content {
        font-size: 14px;
    }

    .contact-item {
        font-size: 14px;
    }

    /*.sidebar .close-btn {
        display: none !important;
    }*/

    /* Smaller mobile label adjustments */
    .custom-label.zoom-small {
        font-size: 7px;
        max-width: 50px;
    }

    .custom-label.zoom-medium {
        font-size: 10px;
        max-width: 80px;
    }

    .custom-label.zoom-large {
        font-size: 13px;
    }

    .custom-label.zoom-xlarge {
        font-size: 15px;
    }

    .detail-panel-close {
        top: 5px;
    }

    .detail-panel-header {
        display: flex;
        align-items: center;
        padding: 15px;
    }
}

@media (max-width: 425px) {
    .commune-item .commune-name {
        font-size: 15px;
    }

    .sidebar {
        width: 100%;
    }

        .sidebar.collapsed {
            width: 95%;
            transform: translateX(-100%);
        }

    .mobile-toggle {
        width: 48px;
        height: 48px;
        top: 16px;
        left: 12px;
    }

    .sidebar-header {
        padding: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        position: relative;
    }

        .sidebar-header .header-content h1 {
            font-size: 16px;
        }

    .city-info-item {
        font-size: 16px;
    }

    .search-section h3 {
        font-size: 18px;
    }

    .commune-name {
        font-size: 15px;
    }

    .toggle-buttons {
        right: 10px;
    }

    .toggle-btn {
        width: 35px;
        height: 35px;
    }

        .toggle-btn svg {
            width: 18px;
            height: 18px;
        }

    .sidebar .close-btn {
        display: none !important;
    }

    .detail-panel {
        max-height: 80vh;
    }

    .detail-panel-content {
        max-height: calc(80vh - 60px);
        padding: 10px;
    }

    .detail-panel-header {
        padding: 16px;
    }

    .detail-panel-title {
        font-size: 18px;
    }
}

@media (max-width: 375px) {
    .sidebar {
        width: 100%;
    }

        .sidebar.collapsed {
            width: 100%;
            transform: translateX(-100%);
        }

    .sidebar-header {
        padding: 12px;
        display: flex;
        align-items: center;
        gap: 12px;
        position: relative;
    }

        .sidebar-header .header-content h1 {
            font-size: 15px;
        }

    .city-info {
        padding: 10px;
        margin: 0 4px;
    }

    .city-info-item {
        font-size: 15px;
        padding: 5px 8px;
    }

    .search-section {
        padding: 10px;
        margin: 4px;
    }

        .search-section h3 {
            font-size: 17px;
        }

    .search-input {
        font-size: 15px;
        padding: 8px 12px;
    }

    .commune-list {
        margin: 0 4px 4px 4px;
    }

    .commune-item {
        padding: 10px 12px;
    }

    .commune-name {
        font-size: 14px;
    }

    .detail-panel {
        max-height: 85vh;
    }

    .detail-panel-content {
        max-height: calc(85vh - 50px);
        padding: 8px;
    }

    .detail-panel-header {
        padding: 8px;
    }

    .detail-panel-title {
        font-size: 16px;
    }
}

@media (max-width: 992px) {
    .sidebar.active .expand-btn {
        display: flex !important;
    }
}

/* Scrollbar styling */
.commune-list::-webkit-scrollbar,
.detail-panel-content::-webkit-scrollbar {
    width: 6px;
}

.commune-list::-webkit-scrollbar-track,
.detail-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.commune-list::-webkit-scrollbar-thumb,
.detail-panel-content::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 3px;
}

    .commune-list::-webkit-scrollbar-thumb:hover,
    .detail-panel-content::-webkit-scrollbar-thumb:hover {
        background: #bdc1c6;
    }

/* Loading animation */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #5f6368;
}

    .loading::after {
        content: '';
        width: 20px;
        height: 20px;
        border: 2px solid #e8eaed;
        border-top: 2px solid #1a73e8;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-left: 12px;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animation cho các elements */
.commune-item {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media(min-width: 769px) and (max-width: 871px) {
    .sidebar {
        width: 253px;
    }

    .sidebar-header .header-content h1 {
        font-size: 15px;
    }

    .sidebar-header {
        padding: 15px !important;
    }

    .search-section h3 {
        font-size: 15px !important;
    }

    .city-info-item {
        font-size: 12px;
    }

    .commune-name {
        font-size: 11px;
    }

    .search-input {
        font-size: 15px;
    }

    .search-section {
        padding: 8px;
    }

    .city-info {
        padding: 8px;
    }

    .detail-panel-title {
        font-size: 16px;
    }

    #detailPanel {
        width: 267px;
    }

    .contact-item {
        font-size: 12px;
        padding: 5px 11px;
        margin-bottom: 0px;
    }

    .detail-info {
        margin-top: 7px;
        margin-bottom: 7px;
    }

    .detail-section {
        margin-bottom: 10px;
    }

    .detail-section-title {
        font-size: 13px;
    }

    .detail-panel-header {
        padding: 10px;
    }

    .detail-panel-content {
        padding: 10px;
    }

    .detail-section-content {
        font-size: 13px;
    }

    .detail-info-value {
        font-size: 15px;
    }

    .detail-contact {
        padding: 0px;
    }

    .detail-section {
        margin-bottom: 14px;
    }

    .detail-panel-close {
        top: 11px;
    }

    .sidebar-header .close-btn {
        top: 25px;
    }
}







.search-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    background-color: #fff;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

    .search-select:focus {
        border-color: #4CAF50;
        box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    }

    .search-select:disabled {
        background-color: #f5f5f5;
        color: #999;
        cursor: not-allowed;
    }

.toggle-buttons {
    position: absolute;
    right: 20px;
    z-index: 1002;
    display: flex;
    gap: 8px;
}


/* sologan Nghệ An */
.container {
    position: relative;
    z-index: 1;
}

.sologonVuonMinh {
    position: absolute;
    bottom: 33px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    color: white;
    font-weight: 700;
    /* font-family: Comic Sans MS, cursive, sans-serif; */
    font-size: 36px;
}

@media (max-width: 768px) {
    .sologonVuonMinh {
        font-size: 18px;
    }
}


.list_article {
    width: 100%;
}

    .list_article ul {
        padding: 15px;
    }

        .list_article ul li {
            list-style: none;
            margin-bottom: 15px;
        }

            .list_article ul li .list_article_iteam {
                display: flex;
                font-size: 12px;
            }

                .list_article ul li .list_article_iteam a {
                    text-decoration: none;
                    display: flex;
                    gap: 15px;
                    color: #333;
                }

                    .list_article ul li .list_article_iteam a img {
                        width: 100px;
                    }

                    .list_article ul li .list_article_iteam a h3 {
                        font-size: 15px;
                        line-height: 1.4em; /* chiều cao mỗi dòng */
                        height: calc(1.4em * 3); /* đúng 3 dòng */
                        max-height: calc(1.4em * 3);
                        display: -webkit-box;
                        -webkit-line-clamp: 3; /* giới hạn 3 dòng */
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }

                    .list_article ul li .list_article_iteam a:hover {
                        color: #AE0008;
                    }

/* Đảm bảo các phần tử không bị flex co lại */
.sidebar-header,
.list_article,
.city-info,
.search-section {
    flex-shrink: 0; /* Không cho phép co lại */
}

.card-list .card-body {
    min-height: 300px;
}

    .card-list .card-body .commune-list {
        flex: 1;
        overflow-y: auto;
        margin: 0 8px 8px 8px;
        background: white;
        border-radius: 0.65rem;
        border: 1px solid #e8eaed;
        max-height: 300px;
    }

/* Style đẹp cho thanh cuộn */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 4px;
}

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: #bdc1c6;
    }

/* Responsive cho mobile */
@media (max-width: 768px) {
    .sidebar {
        overflow-y: auto; /* Đảm bảo có cuộn trên mobile */
    }
}





/* goong map */
.custom-label.zoom-small {
    font-size: 10px !important; /* Thay đổi từ 0px thành 10px */
    opacity: 0.8 !important;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-label.zoom-medium {
    font-size: 12px !important;
    opacity: 0.9 !important;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-label.zoom-large {
    font-size: 16px !important;
    opacity: 1 !important;
    max-width: none;
    overflow: visible;
}

.custom-label.zoom-xlarge {
    font-size: 20px !important;
    opacity: 1 !important;
    max-width: none;
    overflow: visible;
}

/* Override CSS classes với !important */
.custom-label.zoom-small {
    font-size: 10px !important;
    opacity: 0.8 !important;
    max-width: none !important;
    overflow: visible !important;
}

.custom-label.zoom-medium {
    font-size: 12px !important;
    opacity: 0.9 !important;
    max-width: none !important;
    overflow: visible !important;
}

.custom-label.zoom-large {
    font-size: 14px !important;
    opacity: 1 !important;
    max-width: none !important;
    overflow: visible !important;
}

.custom-label.zoom-xlarge {
    font-size: 16px !important;
    opacity: 1 !important;
    max-width: none !important;
    overflow: visible !important;
}

.custom-label.zoom-xxlarge {
    font-size: 18px !important;
    opacity: 1 !important;
    max-width: none !important;
    overflow: visible !important;
}

.clicle-mess {
    width: 15px;
    height: 15px;
    background-color: #AE0008;
    position: absolute;
    top: 10px;
    right: 15px;
    border-radius: 15px;
}

.map-tooltip {
    position: absolute;
    background: #eff6ff;
    color: #0b0809;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    display: none;
}

/*ToolBar Detail*/
.header-content .container-wrap {
    display: flex;
    align-items: center;
    flex: 1;
}

    .header-content .container-wrap .header-icon {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        width: 30px;
        height: 30px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        margin-right: 10px;
    }

    .header-content .container-wrap .header-title {
        flex: 1;
        max-width: 17.05rem;
    }

.card-city-info {
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin: 8px;
    background: white;
    border: 1px solid #e8eaed;
    border-radius: 0.65rem;
    box-shadow: 0px 3px 4px 0px rgba(0, 0, 0, 0.03);
}

    .card-city-info .card-header {
        display: grid;
        grid-template-rows: auto auto;
        grid-auto-rows: min-content;
        align-items: flex-start;
        gap: 8px;
        padding-bottom: 16px;
        font-family: var(--main-font);
    }

        .card-city-info .card-header .title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: bold;
        }

            .card-city-info .card-header .title svg{
                width: 16px;
                height: 16px;
            }

        .card-city-info .card-header .description {
            color: #71717b;
            font-size: 15px;
        }

    .card-city-info .card-content .grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding-bottom: 16px;
        font-family: var(--main-font);
    }

        .card-city-info .card-content .grid .number {
            color: #2b7fff;
            font-weight: 700;
            font-size: 1.25rem;
        }

        .card-city-info .card-content .grid .title {
            color: #71717b;
            font-size: 13px;
        }

    .card-city-info .card-content .card-content-data {
        font-size: 14px;
        padding: 12px;
        background-color: #eff6ff;
        border-radius: .65rem;
    }

        .card-city-info .card-content .card-content-data .data-header {
            display: flex;
            align-items: center;
            gap: .25rem;
            margin-bottom: 8px;
        }

            .card-city-info .card-content .card-content-data .data-header svg {
                width: 12px;
                height: 12px;
            }

            .card-city-info .card-content .card-content-data .data-header .title {
                color: #71717b;
                font-weight: 600;
                font-size: 14px;
            }

        .card-city-info .card-content .card-content-data .data-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
            margin-bottom: 8px;
        }

            .card-city-info .card-content .card-content-data .data-grid .data-box {
                padding: 8px;
                background-color: #ffff;
                border-radius: calc(0.65rem - 2px);
            }

                .card-city-info .card-content .card-content-data .data-grid .data-box .title {
                    color: #6a7282;
                    font-size: 14px;
                }

                .card-city-info .card-content .card-content-data .data-grid .data-box .number {
                    color: #2b7fff;
                    font-size: 16px;
                    font-weight: 600;
                }

                .card-city-info .card-content .card-content-data .data-grid .data-box .green {
                    color: #00a63e;
                }

                .card-city-info .card-content .card-content-data .data-grid .data-box .red {
                    color: #e17100;
                }

    .card-city-info .card-content .text-center {
        text-align: center;
    }

.card-list {
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin: 8px;
    background: white;
    border: 1px solid #e8eaed;
    border-radius: 0.65rem;
    box-shadow: 0px 3px 4px 0px rgba(0, 0, 0, 0.03);
}

    .card-list .card-header {
        padding-top: 16px;
        align-items: flex-start;
        display: grid;
        gap: 12px;
        grid-template-rows: auto auto;
        grid-auto-rows: min-content;
    }

        .card-list .card-header svg {
            width: 32px;
            height: 32px;
            stroke: #1447e6;
        }

        .card-list .card-header .text-blue-800 {
            color: #1447e6;
            display: flex;
            gap: 16px;
            align-items: center;
            font-size: 15px;
            font-weight: 700;
            font-family: var(--main-font);
        }

    .card-list .card-search {
        margin-bottom: 16px;
    }

        .card-list .card-search .search-box {
            position: relative;
        }

            .card-list .card-search .search-box .search-input {
                font-size: .825rem;
                outline-style: none;
                padding-left: 25px
            }

            .card-list .card-search .search-box svg {
                width: 14px;
                height: 14px;
                position: absolute;
                top: 35%;
                left: 6px;
                stroke: #6a7282;
            }

    .card-list .card-body .commune-list {
        margin: 0px;
        border-radius: 0px;
        border: none;
    }

/*Danh sách tin bài*/
:root {
    --main-font: "Roboto", Arial, "Helvetica Neue", Helvetica, sans-serif;
    --merri-font: 'Merriweather', serif;
    --noto-font: NotoSerif;
    --main-red: #ED1C24;
}

.asp-16-9-contain {
    background-color: transparent;
    width: 100%;
    height: 0px;
    position: relative;
    overflow: hidden;
    padding: 0px 0px 56.25%;
}

.asp-16-9 {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
}

.detail-section .detail-section-title a {
    font: 700 16px / 1.2 var(--main-font), Arial;
    color: #222;
    text-decoration: none;
}

.detail-section .list .story-wrap {
    display: flex;
    flex-direction: row;
    margin-bottom: 30px;
}

    .detail-section .list .story-wrap .img-wrap {
        width: 35%;
        margin-right: 12px;
    }

    .detail-section .list .story-wrap .info-wrap {
        flex: 1;
        font-family: var(--main-font), Arial;
        line-height: 1.4;
    }

    .detail-section .list .story-wrap .name {
        font-size: 16px;
        margin-bottom: 7px;
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .detail-section .list .story-wrap .info-wrap .name > * {
        color: rgb(34, 34, 34);
        transition: 300ms;
        text-decoration: none;
    }

    .detail-section .list .story-wrap .info-wrap .description {
        margin-bottom: 0px;
    }

        .detail-section .list .story-wrap .info-wrap .description > * {
            color: rgb(82, 82, 82);
            font-size: 14px;
            text-decoration: none;
        }

@media only screen and (min-width: 1200px){
    /*.card-list .card-body {
        min-height: calc(100vh - 650px);
    }

        .card-list .card-body .commune-list {
            max-height: calc(100vh - 650px);
        }*/
}

@media only screen and (max-width: 1200px) and (min-width: 992px) {
    /*.card-list .card-body {
        min-height: calc(100vh - 660px);
    }

        .card-list .card-body .commune-list {
            max-height: calc(100vh - 660px);
        }*/
}