* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary-green: #2e6930;
    --light-green: #eaf3eb;
    --accent-green: #4caf50;
    --dark-bg: #1a1a1a;
    --text-main: #333333;
    --border-color: #d1d5db;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: #f9fafb;
    line-height: 1.5;
}

header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    z-index: 1000;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    max-width: 1040px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-container img {
    height: 40px;
    width: auto;
    display: block;
    border-radius: 6px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    color: var(--primary-green);
}

.desktop-nav {
    display: flex;
    gap: 8px;
    list-style: none;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover, .nav-item:hover .nav-link {
    background: var(--light-green);
    color: #1b3e1d;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 12px;
    min-width: 220px;
    visibility: hidden;
    opacity: 0;
    margin-top: 6px;
    transition: opacity 0.2s ease, visibility 0.2s ease, margin-top 0.2s ease;
    z-index: 99999; 
}

.nav-item:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    margin-top: 0px;
}

.dropdown-menu a {
    display: block;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.dropdown-menu a:hover {
    background: var(--light-green);
    color: var(--primary-green);
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 350px;
    height: auto;  
    max-height: 90vh;
    background: white;
    box-shadow: -4px 4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
    border-bottom-left-radius: 12px;
}

.mobile-drawer.active { 
    display: block; 
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.drawer-section {
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #eee);
}

.drawer-section-toggle {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-green); 
    padding: 12px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-section-toggle .arrow {
    transition: transform 0.2s ease;
    font-weight: normal;
}

.drawer-section.active .drawer-section-toggle .arrow {
    transform: rotate(180deg);
}

.drawer-links {
    display: none;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 12px;
    margin-top: 4px;
    margin-bottom: 12px;
    gap: 2px;
}

.drawer-section.active .drawer-links {
    display: flex;
}

.drawer-links a {
    display: block;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.drawer-links a:hover, 
.drawer-links a:active {
    background: var(--light-green);
    color: var(--primary-green);
}


.alphabet-bar-wrapper {
    background: var(--dark-bg);
    padding: 10px 16px;
}

.alphabet-bar {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.alphabet-bar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 9px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    transition: background 0.2s;
    text-align: center;
    min-width: 30px;
}

.alphabet-bar a:hover {
    background: var(--accent-green);
}

.page-frame {
    max-width: 1000px;
    margin: 0 auto 25px auto;
    padding: 20px 20px 30px 20px;
    background: #ffffff;
    border-top: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 15px rgba(46, 105, 48, 0.03);
}

.top-meta-section {
    font-size: 0.85rem;
    text-align: center;
    color: #444;
    margin-bottom: 20px;
    line-height: 1.6;
}

.top-meta-section a {
    color: var(--primary-green);
    text-decoration: underline;
}

.bottom-meta-section {
    font-size: 0.85rem;
    text-align: center;
    color: #444;
    margin-bottom: 20px;
    line-height: 1.6;
	border: 1px solid var(--border-color);
    border-radius: 6px;
}

.bottom-meta-section a {
    color: var(--primary-green);
    text-decoration: underline;
}

.breadcrumb-path {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.breadcrumb-path a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-path a:hover {
    text-decoration: underline;
}

.map-wrapper {
    width: 100%;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.map-wrapper #leaflet-map {
    width: 100%;
    height: 480px;
    z-index: 1;
}

.info-section {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 25px;
}

.info-section a {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
}

.info-section a:hover {
    text-decoration: underline;
}

.geo-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    text-align: center;
}

.geo-card h2 {
    font-size: 1.2rem;
    color: var(--primary-green);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--light-green);
    padding-bottom: 6px;
    display: inline-block;
    min-width: 250px;
}

.geo-card p {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.5;
}

.geo-card a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.geo-card a:hover {
    text-decoration: underline;
}

.geo-card img {
    max-width: 100%;
}

.share-box {
    display: flex;
    gap: 8px;
    max-width: 450px;
    margin: 6px auto 0 auto;
}

.share-box input {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #f9fafb;
    color: #555;
    outline: none;
    text-align: center;
}

.share-box button {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.share-box button:hover {
    background: #235225;
}

.dual-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
	margin-top: 20px;
    background: #fdfdfd;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.list-col h4 {
    color: var(--primary-green);
    border-bottom: 2px solid var(--light-green);
    padding-bottom: 6px;
    margin-bottom: 10px;
    font-size: 1rem;
    text-align: center;
}

.list-col h4 a {
color: var(--primary-green); 
}

.list-col ul { list-style: none; }

.list-col li {
    padding: 6px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f8fafc;
}

.list-col li a {
    text-decoration: none;
    color: var(--primary-green);
}

.list-col li a:hover {
    text-decoration: underline;
}

.data-grid-container {
    margin-bottom: 25px;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.data-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.data-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    background-color: #fcfdfd;
}

.data-card-header {
    font-weight: 600;
    color: var(--primary-green);
    font-size: 1rem;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--light-green);
}

.data-card-body p {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

.data-card a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.data-card a:hover {
    text-decoration: underline;
}

.mobile-sort-container {
    display: none;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-main);
}

.mobile-sort-container label {
    font-weight: 600;
    margin-right: 8px;
    color: var(--primary-green);
}

.mobile-sort-container select {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

.mobile-sort-container select:focus {
    border-color: var(--primary-green);
}

.pagination-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.pagination-bar a {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-align: center;
}

.pagination-bar a:hover {
    background: var(--light-green);
    border-color: var(--primary-green);
}

.pagination-bar a.active {
    background: var(--primary-green);
    color: #ffffff;
    border-color: var(--primary-green);
}

.search-container {
    position: relative !important;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: 999;
}

.search-box {
    width: 100%;
    max-width: 550px;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
    background: #fff;
}

#livesearch {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 550px !important;
    background: #ffffff !important;
    border: 1px solid var(--border-color, #ccc) !important;
    border-radius: 6px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25) !important;
    z-index: 999 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

#livesearch:empty {
    display: none !important;
}

#livesearch a {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 10px 14px !important;
    color: #333333 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #c0c0c0 !important;
    font-size: 0.90rem !important;
    background: #ffffff !important;
    transition: background-color 0.2s ease;
}

#livesearch .livesearch-district {
    color: #777777 !important;
    font-size: 0.80rem !important;
    margin-left: 10px !important;
    flex-shrink: 0 !important;
}

#livesearch a:hover {
    background-color: rgba(76, 175, 80, 0.08) !important;
    color: var(--accent-green, #4CAF50) !important;
}

#livesearch a:hover .livesearch-district {
    color: var(--accent-green, #4CAF50) !important;
}

#livesearch > *:last-child {
    border-bottom: none !important;
}

footer.main-footer {
    background: var(--dark-bg);
    color: #ccc;
    padding: 40px 20px 20px;
    text-align: center;
    font-size: 0.85rem;
}

.footer-links { margin-bottom: 15px; }

.footer-links a {
    color: #ddd;
    text-decoration: none;
    margin: 0 6px;
}

.footer-links a:hover { text-decoration: underline; }

.footer-friends {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-friends a { color: #aaa; text-decoration: none; margin: 0 4px; }

.footer-copy {
    margin-bottom: 15px;
    color: #888;
}

.footer-counters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.flag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, max-content));
    gap: 6px 16px;
    justify-content: center;
    font-size: 0.75rem;
    color: #999;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.mobile-translate-section { display: none; }

.custom-exit-btn {
    display: none; 
    position: fixed !important;
    bottom: 20px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    cursor: pointer !important;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: sans-serif;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid white;
    box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.3);
}

.custom-exit-btn:hover {
    background: rgba(220, 20, 60, 0.9);
    transform: translateX(-50%) scale(1.05);
}

.custom-fullscreen-btn {
    cursor: pointer !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

header, .access, .alphabet-bar-wrapper, .menu {
    overflow: visible !important;
}

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .menu-toggle { display: block; }
    .dual-lists { grid-template-columns: 1fr; }
    
    .page-frame {
        border: none;
        padding: 15px 8px;
        box-shadow: none;
        background: transparent;
    }

    .map-wrapper #leaflet-map {
        height: 380px;
    }

    .mobile-sort-container {
        display: block;
    }

    .header-main .desktop-translate {
        display: none !important;
    }
    .mobile-translate-section {
        display: block;
    }
}

@media (max-width: 480px) {
    .share-box {
        flex-direction: column;
    }
}

.data-grid-container {
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.data-grid-header-row {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr 1fr 1fr;
    background: var(--light-green);
    color: var(--primary-green);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
}

.data-grid-header-row div a {
    color: var(--primary-green);
    text-decoration: none;
}

.data-grid-header-row div a:hover {
    text-decoration: underline;
}

.data-grid-rows {
    display: flex;
    flex-direction: column;
}

.data-row {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr 1fr 1fr;
    padding: 12px 16px;
    border-bottom: 1px solid #f2f4f7;
    font-size: 0.9rem;
    align-items: center;
    color: var(--text-main);
    transition: background-color 0.15s ease;
}

.data-row:last-child {
    border-bottom: none;
}

.data-row:hover {
    background-color: #fcfdfd;
}

.data-row a {
    color: var(--primary-green);
    text-decoration: none;
}

.data-row a:hover {
    text-decoration: underline;
}

.mob-label {
    display: none;
}

@media (max-width: 768px) {
    .data-grid-container {
        border: none;
        background: transparent;
        box-shadow: none;
    }

    .data-grid-header-row {
        display: none;
    }

    .data-grid-rows {
        gap: 16px;
    }

    .data-row {
        display: block;
        background: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 16px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    }

    .data-row > div {
        margin-bottom: 6px;
    }
    
    .data-row > div:last-child {
        margin-bottom: 0;
    }

    .data-row > div:nth-child(1) {
        font-weight: 600;
        font-size: 1rem;
        margin-bottom: 8px;
        padding-bottom: 6px;
        border-bottom: 2px solid var(--light-green);
    }

    .mob-label {
        display: inline;
        font-weight: bold;
        color: var(--text-main);
    }
}