﻿* {
    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: 'Roboto', 'Arial', sans-serif;
}
/* Ẩ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;
}


/* Background trống đồng - phiên bản cải tiến */
/* Container chính cho background */
.c-story-backgrounds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #AE0008; /* Màu nền đỏ */
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
/* Figure container cho ảnh quay - ĐIỀU CHỈNH CHÍNH */
.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;
    animation: rotateBackground 60s linear infinite;
    animation-direction: reverse;
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

    /* Styling cho ảnh trống đồng */
    .c-story-backgrounds__clockwise img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* Đổi từ cover sang contain để giữ tỷ lệ */
        object-position: center;
        opacity: 0.8;
        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: rotate(0deg);
    }

    to {
        transform: 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: 315px;
    background: #ffffff;
    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: all 0.3s ease;
    position: absolute;
    z-index: 1000;
    height: 100vh; /* Chiều cao cố định */
    overflow: hidden; /* Ẩn overflow */
}

    /* COLLAPSED STATE */
    .sidebar.collapsed {
        width: 80px;
        height: 80px; /* Chiều cao cố định khi collapsed */
    }

        .sidebar.collapsed .sidebar-header {
            padding: 15px 10px;
            justify-content: center;
        }

        .sidebar.collapsed .header-content,
        .sidebar.collapsed .close-btn {
            display: none;
        }

        .sidebar.collapsed .logo {
            margin: 0;
            cursor: pointer;
        }

        .sidebar.collapsed .city-info,
        .sidebar.collapsed .search-section,
        .sidebar.collapsed .commune-list {
            display: none;
        }

        .sidebar.collapsed .expand-btn {
            display: flex !important;
        }

/* 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, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 20px;
    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 .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: 8px;
    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: 8px;
    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;
    top: 85px;
    right: 20px;
    width: 383px;
    background: white;
    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;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section-title {
    font-size: 17px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section-content {
    font-size: 16px;
    line-height: 1.5;
}

.detail-section .etail-section-title a {
    text-decoration: none;
}

.detail-contact {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 13px;
}

.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;
    top: 35px;
    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;
    }

.logoOneCMS {
    width: auto;
    position: relative; /* Thêm dòng này */
}

    .logoOneCMS a {
        padding-top: 10px;
        position: absolute;
        bottom: 0;
        right: 0;
        z-index: 10000;
        display: flex;
        text-decoration: none;
    }

    .logoOneCMS .company-logo img {
        width: 151px;
        height: 25px;
        filter: brightness(0) invert(1);
    }

    .logoOneCMS .logo-one {
        color: #034EA2;
        font-size: 25px;
        font-weight: 700;
        font-family: 'Orbitron', sans-serif;
    }

    .logoOneCMS .logo-cms {
        color: #313131;
        font-size: 25px;
        font-weight: 700;
        font-family: 'Orbitron', sans-serif;
    }

    .logoOneCMS .sologan {
        margin-left: 7px;
        margin-right: 15px;
        font-size: 12px;
        margin-bottom: 15px;
        font-family: 'Orbitron', sans-serif;
        color: white;
    }

/* Responsive Design */
@media (min-width: 1200px) {
    .sidebar {
        width: 330px;
    }

        .sidebar.collapsed {
            width: 80px;
        }

    .detail-panel {
        width: 385px;
    }
}


@media (max-width: 768px) {
    .container {
        flex-direction: row;
    }

    .logoOneCMS .company-logo img {
        width: 100px;
        height: 20px;
    }

    .logoOneCMS .sologan {
        display: none;
    }

    .logoOneCMS {
        display: none;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 85%;
        max-width: 380px;
        transform: translateX(-100%);
        transition: transform 0.3s 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.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;
    }

    .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: 90%;
        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: 95%;
    }

        .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;
    }
}

/* 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: 9px;
    }
}







.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 */
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }

                    .list_article ul li .list_article_iteam a:hover {
                        color: #AE0008;
                    }



/* Sửa lại sidebar để có thể cuộn */
.sidebar {
    width: 315px;
    background: #ffffff;
    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: all 0.3s ease;
    position: absolute;
    z-index: 10000000000000000000000;
    height: 100vh;
    overflow-y: auto; /* Cho phép cuộn dọc */
    overflow-x: hidden; /* Ẩn cuộn ngang */
}

/* Đả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 */
}

/* Commune list sẽ chiếm phần còn lại và có thể cuộn */
.commune-list {
    flex: 1;
    overflow-y: auto;
    margin: 0 8px 8px 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8eaed;
    min-height: 300px; /* Đảm bảo có chiều cao tối thiểu */
}

/* 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;
}

/* css cái chuông */
.sidebar.collapsed {
    width: 60px !important;
    height: 60px !important;
    background: transparent !important;
    border: none !important;
    border-right: none !important; /* Bỏ border-right của sidebar gốc */
    box-shadow: none !important;
    border-radius: 50% !important;
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    overflow: hidden !important; /* Ẩn mọi thứ tràn ra ngoài */
}

    .sidebar.collapsed .sidebar-header {
        padding: 0 !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        height: 100%;
        background: transparent !important;
        border: none !important; /* Bỏ border của header */
    }

    .sidebar.collapsed .logo {
        display: flex !important;
        width: 100%;
        height: 100%;
        background: transparent !important;
        justify-content: center;
        align-items: center;
        margin: 0;
        cursor: pointer;
        border: none !important; /* Bỏ border của logo */
    }

        .sidebar.collapsed .logo img {
            width: 28px !important;
            height: 28px !important;
            filter: none !important;
        }

        .sidebar.collapsed .logo:hover {
            transform: scale(1.1);
            transition: all 0.3s ease;
        }

    /* Ẩn tất cả các phần tử khác */
    .sidebar.collapsed .header-content,
    .sidebar.collapsed .close-btn,
    .sidebar.collapsed .expand-btn,
    .sidebar.collapsed .list_article,
    .sidebar.collapsed .city-info,
    .sidebar.collapsed .search-section,
    .sidebar.collapsed .commune-list {
        display: none !important;
    }

/* Ẩn logo khi mở rộng */
.sidebar .logo {
    display: none;
}

/* Đảm bảo không có border nào xuất hiện khi collapsed */
.sidebar.collapsed * {
    border: none !important;
}

.clicle-mess {
    width: 15px;
    height: 15px;
    background-color: #AE0008;
    position: absolute;
    top: 10px;
    right: 15px;
    border-radius: 15px;
}
.list_article_pupup {
    width: 100%;
}

    .list_article_pupup ul {
    }

        .list_article_pupup ul li {
            list-style: none;
            margin-bottom: 15px;
        }

            .list_article_pupup ul li .list_article_iteam {
                display: flex;
                font-size: 12px;
            }

                .list_article_pupup ul li .list_article_iteam a {
                    text-decoration: none;
                    display: flex;
                    gap: 15px;
                    color: #333;
                }

                    .list_article_pupup ul li .list_article_iteam a img {
                        width: 100px;
                        height: 67px;
                    }

                    .list_article_pupup 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); 
                        max-height: calc(1.4em * 3);
                        display: -webkit-box;
                        -webkit-line-clamp: 3; 
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        text-overflow: ellipsis;*/
                    }

.list_articlelist_article_pupup {
    color: #AE0008;
}
