/* --- General Styles & Variables (Bảng màu & Gradient) --- */
* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-color: #2E7D32;
    /* Xanh lá đậm */
    --secondary-color: #6d7d6a;
    /* Xám-xanh phụ */
    --background-color: #f3f7ee;
    /* Nền xanh nhạt */
    --text-color: #2b3328;
    --heading-color: #1b3a1f;
    --card-bg: #ffffff;
    --border-color: #dbe7d4;
    --card-shadow: 0 6px 20px rgba(27, 58, 31, 0.12);
    /* Bóng xanh đậm nhẹ */
    --border-radius: 18px;
    --header-height: 66px;

    /* --- Biến màu Gradient mới (thiên nhiên) --- */
    --gradient-start: #a8e063;
    /* Xanh lá non */
    --gradient-end: #1f7a3f;
    /* Xanh lá rừng đậm */
    --button-gradient-start: #43a047;
    /* Xanh lá tươi */
    --button-gradient-end: #1b5e20;
    /* Xanh lá rừng */
    --kpi-gradient-start: #fff3b0;
    /* Vàng nắng nhạt */
    --kpi-gradient-end: #d4e157;
    /* Vàng chanh-lá */
}

/* --- [CHỈNH SỬA] Ảnh nền và Lớp phủ (Overlay) cho Body --- */
body {
    font-family: 'Quicksand', sans-serif;
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    /* Quan trọng để định vị lớp phủ */
    z-index: 1;
    /* Đảm bảo nội dung nổi trên lớp phủ */
    min-height: 100vh;
    /* Đảm bảo body đủ cao để ảnh nền hiển thị */
    background-color: #eef7e3;
    /* Màu nền dự phòng nếu ảnh không tải */
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/background-pattern.png');
    /* Thay bằng đường dẫn ảnh của bạn */
    background-size: cover;
    /* Hoặc 'contain' tùy ý */
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    /* Độ trong suốt 30% */
    z-index: -1;
    /* Đặt dưới nội dung */
}

/* --- [CHỈNH SỬA] Bố cục chính cho Trang chủ --- */
.main-layout {
    display: grid;
    grid-template-columns: 5fr 5fr;
    grid-template-areas:
        "search map"
        "stats map";
    gap: 2rem;
    align-items: stretch;
}

.map-container {
    grid-area: map;
    overflow: hidden;
    height: 100%;
    min-width: 0;
}

.search-container {
    grid-area: search;
    min-width: 0;
}

.featured-stats-container {
    grid-area: stats;
    min-width: 0;
}

.banner-container {
    grid-area: banner;
}

.stats-container {
    /* removed margin-top: 2rem to reduce gap */
}

/* --- [CHỈNH SỬA] Style cho thẻ card đồng nhất --- */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    /* Thêm viền nhẹ */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    /* Tăng kích thước tiêu đề */
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 12px;
    /* Tăng khoảng cách icon */
}

.card h2 i {
    color: var(--primary-color);
    font-size: 1.8rem;
    /* Tăng kích thước icon */
}

/* --- [CHỈNH SỬA] Các section của Trang chủ --- */
.search-section,
.stats-section {
    margin-top: 0;
    padding: 1.5rem;
}

.map-section {
    margin-top: 0;
    padding: 1.25rem;
    text-align: center;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.map-section h2 {
    margin: 1rem 0;
}

.map-section img {
    width: 96%;
    object-fit: contain;
    display: block;
    margin: 0.5rem auto;
}

.search-options {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
}

.search-options input[type="radio"],
.search-options input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: #fdfdfd;
    /* Nền hơi trắng hơn */
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.25);
}

/* --- GIỮ NGUYÊN HOẶC CHỈNH SỬA NHỎ CÁC PHẦN KHÁC --- */
.site-header {
    background: linear-gradient(to right, #1b5e20, #2E7D32);
    /* Thêm gradient cho header trang tin tức */
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.site-header h1 {
    margin: 0;
    font-weight: 700;
}

.subtitle {
    margin: 0.5rem 0 0;
    font-weight: 300;
    opacity: 0.9;
}

.results-grid {
    margin-top: 1.5rem;
    display: grid;
    gap: 1.5rem;
}

.result-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    border-left: 5px solid var(--primary-color);
    animation: fadeIn 0.5s ease-out forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.result-item h3 {
    margin: 0 0 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.result-item p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.result-item p span {
    font-weight: 500;
    color: #555;
}

.site-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    color: #fff;
    font-size: 0.9rem;
    background: #343a40;
    /* Màu tối cho footer */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal overlay */




/* Modal header */








/* Tabs */










/* Category-specific tab colors */






/* Tab content */


















/* Commune Name Item in Grid */
.commune-name-item {
    grid-column: 1 / -1;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #2E7D32 0%, #1b5e20 100%);
    border-radius: 8px;
    margin-top: 1.5rem;
}

.commune-name-item:first-child {
    margin-top: 0;
}

.commune-name-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.commune-name-label::before {
    content: '📍';
    font-size: 1.3rem;
}

/* Chung Section - Ẩm thực/Lễ hội áp dụng cho nhiều xã */
.commune-name-item.chung-section {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border: 2px solid #FF6B35;
}

.commune-name-item.chung-section .commune-name-label::before {
    content: '🌐';
}

/* Loading state */


/* Empty state */


/* Commune Group Styling - DEPRECATED (kept for backward compatibility) */
.commune-group {
    margin-bottom: 2.5rem;
}

.commune-group-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #2E7D32;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2E7D32;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    will-change: transform;
}

.commune-group-header-first {
    position: static;
    z-index: auto;
}

/* Lazy Loading Placeholder */
.lazy-item {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-item.loaded {
    opacity: 1;
}

.placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}






.detail-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.detail-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.detail-content {
    padding: 2rem;
}

.detail-content h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.8rem;
}

.detail-gallery-wrapper {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.detail-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0;
    scroll-behavior: smooth;
    max-width: 100%;
    justify-content: center;
    align-items: center;
}

/* Scrollbar styling */
.detail-gallery::-webkit-scrollbar {
    height: 8px;
}

.detail-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.detail-gallery::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.detail-gallery::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.detail-gallery-item {
    flex: 0 0 auto;
    width: 300px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.detail-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-video {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.detail-description {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #555;
}

.detail-description p {
    margin: 0;
    white-space: pre-wrap;
}

.detail-info {
    display: grid;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.detail-info-item strong {
    color: #333;
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-info-item span {
    color: #666;
    flex: 1;
}

.map-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #E6F4DD;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.map-link-btn:hover {
    background: #C8E6C9;
    border-color: #66BB6A;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.2);
}

.map-link-btn i {
    font-size: 1.1rem;
}






/* --- [CHỈNH SỬA] Responsive cho bố cục Grid mới --- */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "banner"
            "search"
            "map"
            "stats";
    }
}

@media (max-width: 768px) {
    .header-container {
        position: relative;
        padding: 0 15px;
    }

    .logo a {
        font-size: 1.1rem;
    }



    .logo-text-shine {
        display: inline-block;
        font-size: 0.85rem;
        margin-left: -5px;
        letter-spacing: -0.2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo {
        flex-shrink: 1;
        min-width: 0;
    }

    .hamburger-btn {
        flex-shrink: 0;
    }

    .card {
        padding: 1rem;
    }

    .card h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .search-box input {
        font-size: 1rem;
        padding: 0.6rem;
    }

    .details-panel {
        padding: 1rem;
    }

    .details-panel h3 {
        font-size: 1.1rem;
    }

    .panel-label {
        font-size: 0.85rem;
    }

    .site-footer {
        padding: 1.5rem 0;
        font-size: 0.8rem;
    }

    .site-footer p {
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }

    .logo a {
        font-size: 1rem;
    }

    .card {
        padding: 0.8rem;
        border-radius: 8px;
    }

    .card h2 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
        gap: 8px;
    }

    .card h2 i {
        font-size: 1.3rem;
    }

    .main-layout {
        gap: 1rem;
    }

    #staticMapImage {
        height: auto;
        max-height: 300px;
    }

    .search-box {
        margin-bottom: 0.5rem;
    }

    .search-box input {
        font-size: 16px;
        padding: 0.5rem;
        height: 44px;
    }

    .results-dropdown {
        max-height: 250px;
    }

    .result-card {
        padding: 0.75rem;
    }

    .result-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .result-card p {
        font-size: 0.8rem;
        margin: 0.3rem 0;
    }

    .details-panel {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .details-panel h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .panel-label {
        font-size: 0.8rem;
        font-weight: 600;
    }

    .details-panel p {
        margin: 0.5rem 0;
        line-height: 1.4;
    }

    .details-actions {
        margin-top: 1rem;
    }

    .map-button {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    .site-footer {
        padding: 1rem 0;
        font-size: 0.75rem;
    }

    .site-footer p {
        margin: 0.3rem 0;
    }
}

/* --- GIỮ NGUYÊN và CHỈNH SỬA NHỎ --- */
#map {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    font-family: 'Quicksand', sans-serif;
}

.commune-popup {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(4px) !important;
}

.commune-popup .leaflet-popup-content-wrapper {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.map-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    flex-grow: 1;
    padding: 12px 20px;
    margin-top: 1rem;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    /* Đậm hơn */
    color: white;
    background: linear-gradient(to right, var(--button-gradient-start), var(--button-gradient-end));
    /* Gradient cho nút */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
    /* Bóng nhẹ cho nút */
}

.map-button:hover {
    background: linear-gradient(to right, #1b5e20, #0d3d12);
    /* Đổi màu khi hover */
    transform: translateY(-3px);
    /* Nhấn nhá khi hover */
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
}

.map-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.map-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.map-node {
    width: 90vw;
    height: 90vh;
    max-width: calc(100% - 40px);
    max-height: calc(100% - 40px);
    background: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
}

.map-node .leaflet-container {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    z-index: 100000;
}

#staticMapContainer {
    height: 450px;
    width: auto;
    border-radius: 8px;
    background-color: #eef7e3;
}

.hidden {
    display: none !important;
}

#staticMapImage {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    object-fit: contain;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 25px;
    box-sizing: border-box;
    /* Sửa dòng này, thêm 25px đệm trái và phải */
}

@media (max-width: 768px) {
    .container-wide {
        padding: 15px 15px;
    }
}

@media (max-width: 480px) {
    .container-wide {
        padding: 10px 10px;
    }
}

.map-buttons-wrapper {
    margin-top: 1rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.map-button.secondary {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.2);
}

/* Màu xám */
.map-button.secondary:hover {
    background-color: #5a6268;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(108, 117, 125, 0.3);
}

.search-wrapper {
    position: relative;
}

.results-dropdown {
    position: absolute;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    box-sizing: border-box;
}

.search-box input:focus,
.search-wrapper.active .search-box input {
    border-radius: 8px 8px 0 0;
}

.results-dropdown .result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.results-dropdown .result-item:last-child {
    border-bottom: none;
}

.results-dropdown .result-item:hover {
    background-color: #f5f5f5;
}

.results-dropdown .result-item h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary-color);
}

.results-dropdown .result-item p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #666;
}

@media (max-width: 768px) {
    .results-dropdown {
        max-height: 300px;
    }

    .results-dropdown .result-item {
        padding: 10px 12px;
    }

    .results-dropdown .result-item h3 {
        font-size: 0.95rem;
    }

    .results-dropdown .result-item p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .results-dropdown {
        max-height: 250px;
    }

    .results-dropdown .result-item {
        padding: 8px 10px;
    }

    .results-dropdown .result-item h3 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .results-dropdown .result-item p {
        font-size: 0.75rem;
    }
}


























/* Search Status Messages */
.search-message {
    padding: 1rem 1.5rem;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.search-loading {
    padding: 1rem 1.5rem;
    text-align: center;
    color: #2E7D32;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.search-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #2E7D32;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.search-error {
    padding: 1rem 1.5rem;
    background-color: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #C62828;
    border-radius: 4px;
    font-size: 0.95rem;
}

.search-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: #999;
    font-size: 0.95rem;
}

.search-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


@media (max-width: 768px) {












    .search-empty {
        padding: 1.5rem 1rem;
    }
}



.details-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.4s ease-out;
}

.details-panel h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 0.75rem;
}

.details-panel p {
    margin: 0.75rem 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.details-panel .panel-label {
    font-weight: 500;
    color: #555;
    display: inline-block;
    min-width: 120px;
}

.details-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.details-actions .map-button {
    flex: 1;
    min-width: 120px;
    margin-top: 0;
}




















/* --- [CHỈNH SỬA] Style cho khu vực thống kê --- */
.stats-section {
    padding: 1.5rem;
    background-color: transparent;
    border-radius: var(--border-radius);
}

.kpi-cards {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    flex: 1;
    background: linear-gradient(135deg, var(--kpi-gradient-start), var(--kpi-gradient-end));
    /* Gradient cho KPI */
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #fbc6a7;
    /* Viền phù hợp với gradient */
    box-shadow: 0 4px 12px rgba(252, 182, 159, 0.3);
    /* Bóng cho KPI */
    color: #4a4a4a;
    /* Màu chữ dễ đọc trên nền sáng */
}

.kpi-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e76f51;
    /* Màu số nổi bật */
}

.kpi-card .label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* --- Thẻ KPI Tổng quan Quốc gia (6 thẻ đầy màu sắc) --- */
.kpi-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #43cea2, #185a9d);
}

.kpi-overview-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-overview-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.kpi-overview-icon {
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.kpi-overview-content {
    display: flex;
    flex-direction: column;
}

.kpi-overview-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.2rem;
}

.kpi-overview-value {
    font-size: 1rem;
    color: #333;
}

.kpi-overview-value strong {
    font-size: 1.6rem;
    font-weight: 800;
}

/* Màu nền cho từng thẻ KPI */
.kpi-ov-green { background: #d4edda; }
.kpi-ov-green .kpi-overview-icon { color: #28a745; }
.kpi-ov-green .kpi-overview-value strong { color: #1e7e34; }

.kpi-ov-teal { background: #d1ecf1; }
.kpi-ov-teal .kpi-overview-icon { color: #17a2b8; }
.kpi-ov-teal .kpi-overview-value strong { color: #117a8b; }

.kpi-ov-cream { background: #fff3cd; }
.kpi-ov-cream .kpi-overview-icon { color: #e65100; }
.kpi-ov-cream .kpi-overview-value strong { color: #e65100; }

.kpi-ov-mint { background: #c8e6c9; }
.kpi-ov-mint .kpi-overview-icon { color: #2e7d32; }
.kpi-ov-mint .kpi-overview-value strong { color: #1b5e20; }

.kpi-ov-blue { background: #bbdefb; }
.kpi-ov-blue .kpi-overview-icon { color: #1565c0; }
.kpi-ov-blue .kpi-overview-value strong { color: #0d47a1; }

.kpi-ov-purple { background: #e1bee7; }
.kpi-ov-purple .kpi-overview-icon { color: #7b1fa2; }
.kpi-ov-purple .kpi-overview-value strong { color: #6a1b9a; }

/* Responsive cho thẻ KPI tổng quan */
@media (max-width: 768px) {
    .kpi-overview-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
        gap: 0.75rem;
    }
    .kpi-overview-item {
        padding: 1rem;
    }
    .kpi-overview-value strong {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .kpi-overview-grid {
        grid-template-columns: 1fr;
    }
}

.top-lists {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .top-lists {
        grid-template-columns: 1fr;
    }
}

.top-list {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.top-list h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    font-size: 1rem;
}

.top-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-list li {
    padding: 0.75rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-list li:last-child {
    border-bottom: none;
}

.top-list li .name {
    font-weight: 500;
}

.top-list li .value {
    color: #333;
    font-weight: bold;
    background-color: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* --- [CHỈNH SỬA] Header mới cho Trang chủ (dùng màu tươi hơn) --- */
.site-header-main {
    background: linear-gradient(to right, #4db6ac, #00796b);
    /* Nền gradient xanh teal */
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    /* Tăng z-index để không bị các nút của map (leaflet) đè lên */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Thêm bóng đổ tạo chiều sâu */
    border-bottom: none;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    /* Giới hạn chiều rộng của nội dung bên trong */
    margin: 0 auto;
    /* Căn giữa nội dung */
    padding: 0 25px;
    /* Tạo khoảng đệm 25px ở hai bên */
    box-sizing: border-box;
    width: 100%;
}

.logo {
    position: relative;
    z-index: 10;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo a i {
    color: #f0f0f0;
    /* Icon màu trắng nhẹ */
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.main-nav a:hover {
    opacity: 1;
    color: white;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}



/* --- TOÀN BỘ CODE GỐC CHO CÁC TRANG KHÁC ĐƯỢC GIỮ NGUYÊN --- */
.content-page {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.content-page h1 {
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-top: 0;
}

.content-page h2 {
    color: var(--primary-color);
    margin-top: 2rem;
}

.content-page p,
.content-page li {
    line-height: 1.8;
    text-align: justify;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.article-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.article-card .thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article-card .content {
    padding: 1rem;
    flex-grow: 1;
}

.article-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.article-card .content p {
    text-align: justify;
}

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    display: block;
    background-color: white;
    /* Đổi màu hamburger thành trắng */
    height: 3px;
    width: 25px;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s ease-in-out;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 5px;
}

@media (max-width: 992px) {
    .hamburger-btn {
        display: block;
    }

    .main-nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: linear-gradient(to right, #4db6ac, #00796b);
        /* Gradient cho menu mobile đồng bộ với header */
        width: 100%;
        flex-direction: column;
        padding: 0.5rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .main-nav ul.nav-open {
        display: flex;
    }

    .main-nav li {
        text-align: center;
        padding: 0.2rem 0;
    }

    .main-nav a:hover::after {
        width: 0;
    }
}

df-messenger {
    --df-messenger-bot-message: #eef7e3;
    /* Màu tin nhắn bot nhẹ nhàng hơn */
    --df-messenger-user-message: #c8e6c9;
    /* Màu tin nhắn user nhẹ nhàng hơn */
    --df-messenger-font-color: #333;
    --df-messenger-send-icon: var(--primary-color);
    --df-messenger-chat-window-height: 450px;
    --df-messenger-chat-window-width: 350px;
}

/* --- Định dạng chữ Logo nổi bật và lấp lánh --- */
/* --- Định dạng chữ Logo nổi bật và lấp lánh (Đã sửa lỗi) --- */
.logo-text-shine {
    font-size: 1.65rem;
    font-weight: 700;
    color: white;
    text-shadow:
        0 0 5px rgba(255, 255, 255, 0.7),
        0 0 10px rgba(255, 255, 255, 0.5);

    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #fff, #eee, #fff);
    background-size: 200% 100%;

    /* Sửa lỗi ở đây */
    -webkit-background-clip: text;
    /* Dành cho trình duyệt cũ (Chrome, Safari) */
    background-clip: text;
    /* THÊM DÒNG NÀY: Dành cho trình duyệt hiện đại, sửa lỗi cảnh báo */

    -webkit-text-fill-color: transparent;
    animation: shine 3s infinite linear;
}

@media (max-width: 768px) {
    .logo-text-shine {
        font-size: 1.15rem;
        letter-spacing: -0.3px;
    }
}


.logo-animated-sticker {
    position: absolute;
    left: -10px; 
    top: 50%;
    transform: translateY(-50%); 
    height: 60px; 
    width: auto;
    z-index: 101;
    pointer-events: none;
}


.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    /* Đảm bảo có thuộc tính này */
}

/* Định nghĩa Animation lấp lánh */
@keyframes shine {
    0% {
        background-position: -200% 0;
        /* Bắt đầu từ bên trái ngoài */
    }

    100% {
        background-position: 200% 0;
        /* Kết thúc ở bên phải ngoài */
    }
}

/* [TÙY CHỌN] Điều chỉnh lại khoảng cách nếu cần */
.header-logo-img {
    height: 38px;
    /* Tăng chiều cao ảnh logo để khớp với chữ lớn hơn */
    width: auto;
    margin-right: 12px;
    /* Tăng khoảng cách giữa ảnh và chữ */
    vertical-align: middle;
}

/* Sửa lại header-container để có 3 cột */
.header-container {
    display: flex;
    justify-content: space-between;
    /* Đẩy các mục ra xa nhau */
    align-items: center;
}

.logo,
.main-nav {
    flex-shrink: 0;
    /* Không cho co lại */
}

/* Định dạng cho vùng chứa dropdown chọn tỉnh, phía trên khung Tra cứu chi tiết */
.province-selector-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 1.5rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.province-selector-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
    padding: 10px 15px 10px 20px;
    white-space: nowrap;
    text-align: left; 
}

/* Làm đẹp cho thẻ select */
.province-select-dropdown {
    width: 100%;
    max-width: 350px;
    padding: 10px 40px 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    color: var(--primary-color);
    background-color: #fff;
    border: none;
    border-left: 1px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231f7a3f' class='bi bi-caret-down-fill' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    transition: background-color 0.3s ease;
}

.province-select-dropdown:hover {
    border-color: var(--primary-color);
}

.province-select-dropdown option {
    background-color: #fff;
    color: var(--primary-color);
}

.contribution-container {
    grid-area: stats;
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

#user-profile {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

fieldset {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

fieldset:disabled {
    opacity: 0.5;
}

#user-profile .map-button {
    flex-grow: 0;
    /* Tắt chế độ tự "nở" ra */
    width: auto;
    /* Để nút tự co lại vừa với chữ "Đăng xuất" */
}

#contact-developer-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;

    /* Style cho nút tròn */
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;

    /* Căn giữa icon */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Kích thước icon và hiệu ứng */
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, background-color 0.2s;
}

#contact-developer-btn:hover {
    transform: scale(1.1);
    background: #1b5e20;
    /* Màu đậm hơn khi hover */
}

/* Lớp phủ nền mờ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Nội dung hộp thoại */
.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-content {
    transform: translateY(-20px);
}

.modal-content h2 {
    margin-top: 0;
    color: var(--primary-color);
}

.modal-content .close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-color);
}

.contact-info {
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.contact-info a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

/* Thêm thuộc tính này để có thể định vị nút con theo nó */
.search-wrapper {
    position: relative;
}

/* Style cho nút "Đóng góp" */
.scroll-to-contribute-btn {
    position: absolute;
    top: -15px;
    /* Nổi lên trên panel một chút */
    right: 0;

    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;

    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 20px;
    /* Bo tròn */

    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 10;
    /* Đảm bảo nó nổi lên trên */
}

.scroll-to-contribute-btn:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Thêm vào cuối file style.css */
.unverified-label {
    font-size: 0.8rem;
    font-style: italic;
    color: #e74c3c;
    /* Một màu đỏ/cam để gây chú ý */
    font-weight: 500;
    margin-left: 8px;
}

/* Nhãn "Chưa xác minh" màu cam/đỏ */
.unverified-label {
    font-size: 0.8rem;
    font-style: italic;
    color: #e67e22;
    /* Màu cam */
    font-weight: 500;
    margin-left: 8px;
}

/* Biểu tượng (icon) để bấm xác minh */
.verify-icon {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-left: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.verify-icon:hover {
    transform: scale(1.2);
}

/* Tích xanh "Đã xác minh" */
.verified-check {
    font-size: 0.9rem;
    color: #2ecc71;
    /* Màu xanh lá */
}

/* --- Thống kê tổng quan (Overall Stats) --- */
.overall-stats-section {
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(90deg, #e6f4dd 0%, #f3e5f5 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.overall-stats-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.overall-stats-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 120px;
}

.stat-mini-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2E7D32;
    line-height: 1.2;
}

.stat-mini-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.stat-mini-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    animation: slideRightMini 1.5s ease-in-out infinite;
}

@keyframes slideRightMini {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .overall-stats-row {
        gap: 1rem;
    }

    .stat-mini {
        min-width: 100px;
    }

    .stat-mini-number {
        font-size: 1.4rem;
    }

    .stat-mini-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .overall-stats-section {
        padding: 0.8rem 1rem;
    }

    .overall-stats-section h3 {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .overall-stats-row {
        gap: 0.8rem;
    }

    .stat-mini {
        min-width: 80px;
    }

    .stat-mini-number {
        font-size: 1.1rem;
    }

    .stat-mini-label {
        font-size: 0.65rem;
    }

    .stat-mini-arrow {
        font-size: 1.2rem;
    }

    .kpi-cards {
        flex-direction: column;
    }

    .kpi-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .overall-stats-section {
        padding: 0.6rem 0.8rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .overall-stats-section h3 {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .overall-stats-row {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .stat-mini {
        min-width: 70px;
        flex: 0 1 auto;
    }

    .stat-mini-number {
        font-size: 0.9rem;
    }

    .stat-mini-label {
        font-size: 0.6rem;
    }

    .stat-mini-arrow {
        font-size: 1rem;
        margin: 0 0.2rem;
    }

    .kpi-cards {
        flex-direction: column;
        gap: 1rem;
    }

    .kpi-card {
        padding: 0.8rem;
    }

    .kpi-card h3 {
        font-size: 0.9rem;
    }

    .top-lists {
        grid-template-columns: 1fr;
    }

    .top-list {
        padding: 1rem;
    }

    .top-list h4 {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .top-list li {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }






}

/* ===== ADMIN PAGE STYLES ===== */

.admin-main {
    min-height: 100vh;
    background-color: var(--bg-color);
}

/* Admin Container */
.admin-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.admin-container h1 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Login Section */
.admin-login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.admin-login-box {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-login-box h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.admin-login-box p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Form Section */
.admin-form-section {
    display: block;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    justify-content: space-between;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-align: center;
    max-width: 80px;
    transition: all 0.3s ease;
}

.step.step-active .step-number {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.15);
}

.step.step-active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 0.5rem;
    position: relative;
    top: -12px;
}

/* Form Steps */
.form-step {
    display: none;
    animation: slideIn 0.3s ease;
}

.form-step.step-active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group legend {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-select option {
    background-color: white;
    color: #333;
    padding: 0.5rem;
}

textarea.form-input {
    resize: vertical;
    font-family: 'Quicksand', sans-serif;
}

/* Radio Options */
.radio-option {
    display: block;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: rgba(46, 125, 50, 0.02);
}

.radio-option input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--primary-color);
}

.radio-label {
    cursor: pointer;
}

.radio-label strong {
    display: block;
    margin-bottom: 0.25rem;
}

.radio-label small {
    display: block;
    color: var(--secondary-color);
}

/* Item Forms */
.admin-items-container {
    margin-bottom: 2rem;
}

.item-form {
    padding: 1.5rem;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.item-header h3 {
    margin: 0;
    color: var(--primary-color);
}

/* URL List Management */
.url-list {
    margin-bottom: 0.75rem;
}

.url-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.url-input-wrapper .form-input {
    flex: 1;
}

.url-input-wrapper .btn-sm {
    flex-shrink: 0;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

/* Form Buttons Container */
.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

.form-buttons .btn-next {
    margin-left: auto;
}

.form-buttons .btn-prev {
    margin-right: auto;
}

.form-buttons .btn-prev.hidden {
    display: none;
}

/* Review Section */
.admin-review-container {
    margin-bottom: 2rem;
}

.review-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ddd;
}

.review-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.review-table {
    width: 100%;
    border-collapse: collapse;
}

.review-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.review-table td {
    padding: 0.75rem;
}

.review-table td:first-child {
    font-weight: 500;
    color: var(--secondary-color);
    width: 40%;
}

.review-item {
    padding: 1rem;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.review-item h4 {
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
}

.review-item p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* Error & Loading Messages */
.error-message {
    padding: 0.75rem 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin-bottom: 1rem;
}

.error-message.hidden {
    display: none;
}

.loading-spinner {
    padding: 1rem;
    text-align: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.loading-spinner.hidden {
    display: none;
}

.loading-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success Modal */
.admin-success-modal {
    max-width: 500px;
}

.success-icon {
    text-align: center;
    margin: 1rem 0;
}

.success-icon i {
    font-size: 4rem;
    color: #28a745;
}

.admin-success-modal h2 {
    color: #28a745;
    text-align: center;
    margin: 1rem 0;
}

.admin-success-modal p {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.success-details {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.success-details p {
    margin: 0.5rem 0;
    text-align: left;
}

.success-buttons {
    display: flex;
    gap: 1rem;
}

.success-buttons .btn {
    flex: 1;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-container {
        padding: 1rem;
        margin: 1rem auto;
    }

    .step-indicator {
        margin-bottom: 1.5rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.7rem;
        max-width: 60px;
    }

    .step-line {
        margin: 0 0.25rem;
        top: -10px;
    }

    .form-buttons {
        flex-direction: column;
    }

    .form-buttons .btn {
        width: 100%;
    }

    .form-buttons .btn-next {
        margin-left: 0;
        order: 2;
    }

    .form-buttons .btn-prev {
        margin-right: 0;
        order: 1;
    }

    .success-buttons {
        flex-direction: column;
    }

    .success-buttons .btn {
        width: 100%;
    }

    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .item-form {
        padding: 1rem;
    }

    .admin-login-box {
        max-width: 100%;
    }
}

/* ===== ADMIN TABS & DELETE FUNCTIONALITY ===== */

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.admin-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.admin-tab:hover {
    color: #2E7D32;
}

.admin-tab.active {
    color: #2E7D32;
    border-bottom-color: #2E7D32;
}

.admin-tab[data-type="du_lich"].active {
    background-color: #E6F4DD;
    color: #2E7D32;
}

.admin-tab[data-type="am_thuc"].active {
    background-color: #FFF3E0;
    color: #F57C00;
}

.admin-tab[data-type="le_hoi"].active {
    background-color: #F3E5F5;
    color: #7B1FA2;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.delete-items-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.delete-item-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.delete-item-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: #2E7D32;
}

.delete-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.delete-item-header h4 {
    margin: 0;
    color: #333;
    word-break: break-word;
    flex: 1;
}

.delete-item-card p {
    margin: 0.5rem 0;
    color: #555;
    font-size: 0.9rem;
}

.delete-item-card p strong {
    color: #333;
}

.delete-item-card a {
    color: #2E7D32;
    text-decoration: none;
    word-break: break-all;
}

.delete-item-card a:hover {
    text-decoration: underline;
}

.delete-items-list {
    margin-top: 2rem;
}

.text-center {
    text-align: center;
    color: #999;
    padding: 2rem;
}


@media (max-width: 768px) {


    .commune-group-header {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .commune-name-item {
        padding: 0.75rem 1rem;
        margin-top: 1rem;
    }

    .commune-name-label {
        font-size: 1rem;
    }

    .commune-name-label::before {
        font-size: 1.1rem;
    }




}

@media (max-width: 480px) {
    .commune-group {
        margin-bottom: 1.5rem;
    }

    .commune-group-header {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }


}

/* ===== CONTRIBUTION CHOICE MODAL STYLES ===== */
.contribution-choice-modal {
    max-width: 500px;
    padding: 2rem;
}

.contribution-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.contribution-choice-btn {
    padding: 1.2rem;
    font-size: 1rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.contribution-choice-btn i {
    font-size: 1.3rem;
}

.contribution-choice-btn:hover {
    transform: translateY(-2px);
    background-color: #f4d006;
    color: #000;
}






.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-step h2 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}



.category-option {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-option:hover {
    border-color: #f4d006;
    background-color: #fffaf0;
}

.category-option input[type="radio"] {
    margin-right: 1rem;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.category-option input[type="radio"]:checked + .category-label {
    color: #f4d006;
    font-weight: 600;
}

.category-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
}

.category-label i {
    font-size: 1.2rem;
}















.remove-item-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.3rem;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.remove-item-btn:hover {
    background-color: #cc0000;
}



.review-section {
    margin-bottom: 1.5rem;
}

.review-section h4 {
    margin-bottom: 0.8rem;
    color: #333;
    font-weight: 600;
}

.review-item {
    background: white;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-left: 4px solid #f4d006;
    border-radius: 0.3rem;
}

.review-item-title {
    font-weight: 600;
    color: #333;
}

.review-item-desc {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.wizard-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.wizard-buttons .map-button {
    flex: 1;
    max-width: 150px;
}

.wizard-buttons .map-button.secondary {
    max-width: 120px;
}

/* Mobile responsive for wizard */
@media (max-width: 768px) {




    .wizard-buttons {
        flex-wrap: wrap;
    }

    .wizard-buttons .map-button {
        max-width: 100%;
    }

    .contribution-choice-buttons {
        flex-direction: column;
    }
}

/* ===== SUBMISSION REVIEW STYLES ===== */
.submissions-list {
    margin-top: 2rem;
}

.submission-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.submission-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.submission-header {
    background: linear-gradient(135deg, #f4d006, #fffaf0);
    padding: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.submission-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.submission-title {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.submission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.category-badge,
.date-badge,
.email-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.category-badge {
    background: #e6f4dd;
    color: #2E7D32;
}

.date-badge {
    background: #f3e5f5;
    color: #7b1fa2;
}

.email-badge {
    background: #e8f5e9;
    color: #388e3c;
    font-family: monospace;
}

.submission-items {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.submission-item {
    background: #f9f9f9;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #f4d006;
    border-radius: 0.3rem;
}

.submission-item:last-child {
    margin-bottom: 0;
}

.item-title {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.item-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.item-video {
    margin-top: 0.5rem;
}

.item-video a {
    color: #2E7D32;
    text-decoration: none;
    font-size: 0.9rem;
}

.item-video a:hover {
    text-decoration: underline;
}

.submission-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #fafafa;
    border-top: 1px solid #ddd;
}

.btn-success {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 0.3rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-success:hover {
    background-color: #45a049;
}

.btn-danger {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 0.3rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-danger:hover {
    background-color: #da190b;
}

.btn-success i,
.btn-danger i {
    margin-right: 0.5rem;
}

.section-description {
    color: #999;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
    color: #999;
    padding: 2rem;
}

/* Mobile responsive for submissions */
@media (max-width: 768px) {
    .submission-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .submission-actions {
        flex-direction: column;
    }

    .submission-actions .btn-success,
    .submission-actions .btn-danger {
        width: 100%;
    }

    .submission-items {
        max-height: 300px;
    }
}






@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   SECTION: TỈNH THÀNH NỔI BẬT
   ============================================= */
.featured-provinces-section {
    margin-top: 2.5rem;
    margin-bottom: 2rem;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.featured-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #e65100;
    font-style: italic;
    margin: 0;
}

.featured-title i {
    color: #ff9800;
    margin-right: 0.3rem;
}

.featured-subtitle {
    margin: 0.3rem 0 0;
    color: #777;
    font-size: 0.95rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.featured-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.featured-card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.featured-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-card:hover .featured-card-img img {
    transform: scale(1.08);
}

.featured-card-body {
    padding: 1.2rem 1.5rem 1.5rem;
}

.featured-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.2rem;
}

.featured-card-region {
    display: inline-block;
    font-size: 0.8rem;
    color: #e65100;
    font-weight: 600;
    margin-bottom: 1rem;
}

.featured-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1rem;
    margin-bottom: 1.2rem;
    padding-top: 0.8rem;
    border-top: 1px solid #f0f0f0;
}

.fcs-item {
    display: flex;
    flex-direction: column;
}

.fcs-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fcs-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
}

.featured-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #e65100, #ff6d00);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-card-btn:hover {
    background: linear-gradient(135deg, #bf360c, #e65100);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.4);
}

/* Responsive: Tỉnh Thành Nổi Bật */
@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-title {
        font-size: 1.4rem;
    }

    .featured-card-img {
        height: 160px;
    }
}

/* =============================================
   SECTION: DANH SÁCH 34 TỈNH THÀNH (DYNAMIC)
   ============================================= */
.all-provinces-list-section {
    background: #def0ff; /* Light blue background as in image */
    padding: 2.5rem;
    border-radius: 16px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.all-provinces-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.all-provinces-header h2 {
    font-size: 2.2rem;
    color: #ff5722;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.all-provinces-header p {
    color: #555;
    font-size: 1rem;
    font-weight: 500;
}

/* Summary Cards on top */
.ap-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.ap-summary-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ap-summary-content {
    display: flex;
    flex-direction: column;
}

.ap-summary-title {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ap-summary-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #222;
}

.ap-summary-value small {
    font-size: 1rem;
    font-weight: 600;
    margin-left: 5px;
}

.ap-summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.icon-blue { background: #e3f2fd; color: #1976d2; }
.icon-pink { background: #fce4ec; color: #c2185b; }
.icon-green { background: #e8f5e9; color: #388e3c; }
.icon-orange { background: #fff3e0; color: #f57c00; }

/* Grid of provinces */
.ap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.ap-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    border: 1px solid #eaeaea;
}

/* Tỉnh => Xanh, Thành Phố => Cam */
.ap-card-header {
    padding: 1.5rem;
    color: white;
    position: relative;
}

.bg-tinh {
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%);
}

.bg-thanhpho {
    background: linear-gradient(135deg, #f12711 0%, #f5af19 100%);
}

.ap-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ap-card-stt {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.ap-card-subtitle {
    font-size: 0.9rem;
    opacity: 0.95;
    margin: 0;
    font-weight: 500;
}

.ap-card-body {
    padding: 1.5rem;
}

.ap-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ap-stat-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.ap-stat-icon {
    color: #4a90e2;
    font-size: 1.1rem;
    margin-top: 2px;
}
.ap-stat-icon.red { color: #e74c3c; }
.ap-stat-icon.green { color: #2ecc71; }
.ap-stat-icon.purple { color: #9b59b6; }
.ap-stat-icon.orange { color: #f39c12; }
.ap-stat-icon.yellow { color: #f1c40f; }
.ap-stat-icon.blue { color: #3498db; }

.ap-stat-content {
    display: flex;
    flex-direction: column;
}

.ap-stat-label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.2rem;
}

.ap-stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.ap-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 1rem 0;
}

/* Đơn vị hành chính row */
.ap-units-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ap-units-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.ap-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: white;
    font-weight: 600;
}
.tag-phuong { background: #ff7043; }
.tag-xa { background: #4caf50; }
.tag-khu { background: #8d6e63; }

.ap-btn-detail {
    background: #1877f2;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    animation: btnZoomGlow 0.35s infinite alternate ease-in-out;
}

.ap-btn-detail:hover {
    background: #166fe5;
    animation-play-state: paused;
}

@keyframes btnZoomGlow {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 rgba(255,255,255,0);
        filter: brightness(1);
    }
    100% { 
        transform: scale(1.08); 
        box-shadow: 0 0 15px rgba(24, 119, 242, 1), 0 0 25px rgba(255,255,255,0.8);
        filter: brightness(1.25);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .ap-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 992px) {
    .ap-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .ap-summary-grid {
        grid-template-columns: 1fr;
    }
    .all-provinces-list-section {
        padding: 1.5rem;
    }
    .ap-units-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .ap-btn-detail {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   FEATURED CAROUSEL (TOP 10 TỈNH THÀNH)
   ========================================= */
.featured-carousel-section {
    background: #f8fbff;
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.fc-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    text-align: center;
}

.fc-title {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ff5722;
    font-size: 2.2rem;
    margin: 0 0 0.5rem 0;
}

.fc-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

.fc-view-all {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    right: 0;
}

.fc-view-all:hover {
    text-decoration: underline;
}

.fc-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding-bottom: 1rem;
}

.fc-slider-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.6s ease-in-out;
}

.fc-card {
    min-width: calc(33.333% - 1.33rem); /* 3 cards visible */
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.fc-card-img-wrapper {
    position: relative;
    height: 220px;
    width: 100%;
}

.fc-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fc-card-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1.5rem;
    color: white;
}

.fc-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
    font-family: 'Quicksand', sans-serif;
}

.fc-card-region {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.fc-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fc-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.fc-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.fc-stat-label {
    font-size: 0.85rem;
    color: #888;
}

.fc-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.fc-stat-unit {
    font-weight: normal;
    font-size: 0.85rem;
    color: #666;
}

.fc-grdp {
    border-top: 1px dashed #eaeaea;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.fc-grdp-label {
    font-size: 0.85rem;
    color: #888;
}

.fc-grdp-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.fc-grdp-value.orange {
    color: #f57c00;
}

.fc-grdp-value.blue {
    color: #0d6efd;
}

.fc-btn {
    background: #1e40af;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
    text-decoration: none;
    font-family: 'Quicksand', sans-serif;
    animation: btnZoomGlow 0.35s infinite alternate ease-in-out;
}

.fc-btn:hover {
    background: #1e3a8a;
    animation-play-state: paused;
}

/* Responsive for slider */
@media (max-width: 992px) {
    .fc-card {
        min-width: calc(50% - 1rem); /* 2 cards */
    }
}
@media (max-width: 600px) {
    .fc-card {
        min-width: 100%; /* 1 card */
    }
    .fc-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* --- FULL QUICK CARD --- */
.full-quick-card {
    display: flex;
    flex-direction: row;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}
.fqc-left {
    flex: 0 0 45%; /* Use 45% for image, 55% for right as requested (or vice versa? user said "chia 55% bên trái là hình"). So 55% left */
    flex: 0 0 55%;
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 380px;
}
.fqc-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.fqc-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
}
.fqc-title {
    font-size: 1.8rem;
    margin: 0.5rem 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    color: white;
}
.fqc-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    color: white;
}
.fqc-right {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #fff; /* White background as requested */
}
.fqc-right .ap-card-body {
    padding: 0; /* Override padding since fqc-right has it */
}

/* Responsive */
@media (max-width: 992px) {
    .full-quick-card {
        flex-direction: column;
    }
    .fqc-left, .fqc-right {
        flex: none;
        width: 100%;
    }
    .fqc-left {
        min-height: 250px;
    }
}

/* --- Lớp CSS làm mờ ô Chọn tỉnh/thành phố --- */
.dimmed-selector {
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.3s ease;
}

.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    .footer-author {
        display: block;
        margin-top: 5px;
    }

    .fc-title, .all-provinces-header h2 {
        line-height: 1.3;
    }

    .fc-header {
        flex-direction: column;
    }

    .fc-view-all {
        position: static;
        margin-top: 15px;
    }

    .search-options label {
        white-space: normal;
    }

    .mobile-break {
        display: block;
    }
}
