*{
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8fafc;
    color: #111827;
    overflow-x: hidden;
}

#map {
    height: 90vh;
}

/* HEATMAP GRID OVERLAY (Siguranta) */
.heatmap-grid-overlay {
    pointer-events: none;
}

/* Etichete cartiere peste heatmap (ca in heatmap2.png) */
.heatmap-neighborhood-label-marker {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    pointer-events: none !important;
}

.heatmap-neighborhood-label-marker span {
    display: inline-block;
    transform: translate(-50%, -50%);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-shadow:
        0 0 4px rgba(0, 0, 0, 0.95),
        0 0 8px rgba(0, 0, 0, 0.85),
        1px 1px 2px rgba(0, 0, 0, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.45px;
    white-space: nowrap;
    pointer-events: none;
}

.rent-heatmap-label-marker .rent-heatmap-label {
    display: block;
    transform: translate(-50%, -50%);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    text-transform: none;
    text-align: center;
    text-shadow:
        0 0 4px rgba(0, 0, 0, 0.95),
        0 0 8px rgba(0, 0, 0, 0.85),
        1px 1px 2px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

.rent-heatmap-label-marker .rent-label-name,
.rent-heatmap-label-marker .rent-label-price,
.rent-heatmap-label-marker .rent-label-mp {
    display: block;
    white-space: nowrap;
    line-height: 1.25;
}

.rent-heatmap-label-marker .rent-label-name {
    font-weight: 700;
    font-size: 10px;
}

.rent-heatmap-label-marker .rent-label-price {
    font-weight: 800;
    font-size: 11px;
}

.rent-heatmap-label-marker .rent-label-mp {
    font-weight: 600;
    font-size: 9px;
    opacity: 0.95;
}

/* Autobuze STB pe harta */
.bus-stop-label-marker {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    pointer-events: none !important;
}

.bus-stop-label-marker span {
    display: inline-block;
    transform: translate(-50%, -120%);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 9px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    text-shadow:
        0 0 3px rgba(0, 0, 0, 0.95),
        0 0 6px rgba(0, 0, 0, 0.85),
        1px 1px 2px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

/* Harta zgomot — overlay pe harta Leaflet */
.noise-map-overlay {
    pointer-events: none;
    background: transparent !important;
}

.leaflet-tooltip.bus-stop-tooltip {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #0f172a;
    border: 1px solid #7ec8e3;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* HERO SECTION */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
    position: relative;
    padding-bottom: 60px;
}

/* NAVBAR - Centered Logo and Left Menu as requested */
.navbar {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #111827;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 1;
    position: relative;
    z-index: 100000;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    order: 2;
    margin: 0 auto; /* Perfect centering */
    text-align: center;
}

.logo img {
    height: 48px;
    width: auto;
    object-fit: contain; /* Ensures logo maintains aspect ratio perfectly */
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #111827;
    line-height: 1.2;
}

.logo span {
    font-size: 11px;
    color: #4b5563;
    display: block;
    margin-top: 2px;
    font-weight: 500;
}

/* Header above main content so user dropdown isn't hidden by search/filters */
header {
    position: relative;
    z-index: 1100;
}

@media (max-width: 1023px) {
    header {
        position: sticky;
        top: 0;
        z-index: 1100;
    }
}

/* USER PROFILE ICON & DROPDOWN */
.user-menu-container {
    position: relative;
    order: 3;
    z-index: 901;
}

.user-profile-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    color: #4b5563;
    transition: all 0.2s;
    border: 2px solid transparent;
    order: 3;
}

.user-profile-btn:hover {
    color: #111827;
    background: rgba(241, 245, 249, 0.8);
}

.user-profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
}

.user-profile-btn svg {
    width: 28px;
    height: 28px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: none; /* Controlled via JS */
    flex-direction: column;
    padding: 8px;
    z-index: 902;
}

.user-dropdown.active {
    display: flex;
    position: fixed;
    z-index: 5000 !important;
}

.dropdown-header {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 8px;
}

.dropdown-header strong {
    font-size: 15px;
    color: #111827;
}

.dropdown-header span {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: #f1f5f9;
    color: #111827;
}

.user-dropdown hr {
    border: 0;
    height: 1px;
    background: #f1f5f9;
    margin: 6px 0;
}

.user-dropdown a.logout-link {
    color: #ef4444;
}

.user-dropdown a.logout-link:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* OFF-CANVAS SIDEBAR DRAWER — suport dialog nativ + fallback vechi */
.sidebar-drawer {
    margin: 0;
    padding: 30px 24px;
    width: min(290px, 88vw);
    max-width: min(290px, 88vw);
    height: 100%;
    max-height: none;
    border: none;
    background: #111827;
    color: white;
    position: fixed;
    inset: 0 auto 0 0;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

.sidebar-drawer::backdrop {
    background: rgba(17, 24, 39, 0.45);
}

dialog.sidebar-drawer:not([open]) {
    display: none;
}

/* Drawer div (fallback pe pagini fara dialog) */
div.sidebar-drawer {
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    z-index: 99999;
}

div.sidebar-drawer.active {
    transform: translateX(0);
    display: flex;
}

/* Fallback vechi (div + overlay) daca exista pe alte pagini */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(17, 24, 39, 0.45);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    cursor: pointer;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1023px) {
    .menu-btn {
        min-width: 44px;
        min-height: 44px;
        pointer-events: auto !important;
    }

    header {
        isolation: isolate;
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    border-bottom: 1px solid #1f2937;
    padding-bottom: 20px;
}

.sidebar-logo h2 {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: white;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-menu a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu a:hover {
    background: #1f2937;
    color: white;
    transform: translateX(5px);
}

/* HERO CONTENT */
.hero-content {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    flex-grow: 1;
}

.hero-text {
    flex: 1;
    max-width: 550px;
}

.hero-text h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 20px;
    color: #111827;
}

.hero-text p {
    font-size: 18px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 35px;
}

/* SEARCH BOX */
.search-box {
    display: flex;
    gap: 15px;
    background: #ffffff;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.search-box input {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    padding: 14px 42px 14px 45px;
    font-size: 16px;
    color: #1d2939;
    border-radius: 12px;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>') no-repeat 14px center;
}

.search-clear-btn {
    position: absolute;
    right: 14px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent !important;
    color: #6b7280;
    padding: 0;
    cursor: pointer;
    z-index: 2;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

.search-clear-btn:hover,
.search-clear-btn:active,
.search-clear-btn:focus {
    background: transparent !important;
    color: #374151;
    transform: none !important;
    outline: none;
}

.search-box > button,
.search-box > #searchBtn {
    padding: 16px 32px;
    background: #5d5fef;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(93, 95, 239, 0.25);
}

.search-box > button:hover,
.search-box > #searchBtn:hover {
    background: #4a4cd8;
    transform: translateY(-1px);
}

/* SEARCH SUGGESTIONS DROPDOWN */
.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: none; /* Hidden by default */
    flex-direction: column;
    overflow: hidden;
    z-index: 150;
}

.suggestions-dropdown.active {
    display: flex;
    max-height: 480px; /* ~10 randuri vizibile, restul cu scroll */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.suggestions-dropdown.active .suggestion-item {
    flex-shrink: 0;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    font-size: 15px;
    color: #1f2937;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8fafc;
}

.suggestion-item svg {
    color: #94a3b8;
    flex-shrink: 0;
}

.suggestion-item span {
    font-weight: 500;
}

.suggestion-item .type-badge {
    margin-left: auto;
    font-size: 10px;
    background: #e0e7ff;
    color: #4f46e5;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.suggestion-item.street .type-badge {
    background: #f1f5f9;
    color: #475569;
}

/* HERO SEPARATOR */
.hero-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
    width: 100%;
}

.hero-separator::before,
.hero-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.hero-separator span {
    padding: 0 15px;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* GOOGLE LOGIN BUTTON */
.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ffffff;
    color: #1F2937;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.auth-error-msg {
    margin: 12px 0 0;
    color: #dc2626;
    font-size: 14px;
    text-align: center;
}

.google-login-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(0, 0, 0, 0.08);
}

.google-login-btn img {
    width: 20px;
    height: 20px;
}

/* HERO IMAGE */
.hero-image {
    flex: 1;
    max-width: 560px;
    height: 440px;
    border-radius: 35px;
    overflow: hidden;
    background: linear-gradient(135deg, #c7d2fe 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.hero-image img,
.hero-image picture {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-image img {
    object-fit: cover;
}

/* INTRO SECTION */
.intro {
    max-width: 820px;
    margin: 80px auto 40px;
    padding: 0 30px;
    text-align: center;
}

.intro h2 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #111827;
}

.intro p {
    font-size: 18px;
    color: #6b7280;
    line-height: 1.6;
}

/* FEATURES SECTION */
.feature {
    background: white;
    max-width: 1200px;
    margin: 0 auto 100px;
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(241, 245, 249, 0.8);
}

.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
}

.feature-text h2 {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111827;
}

.feature-text p {
    font-size: 18px;
    line-height: 1.7;
    color: #4b5563;
}

.feature-image {
    flex: 1;
    height: 350px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 25px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* FOOTER SECTION */
.footer {
    background: #111827;
    color: white;
    padding: 80px 30px 40px;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    border-bottom: 1px solid #1f2937;
    padding-bottom: 50px;
}

.footer h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ffffff;
}

.footer h4 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: #9ca3af;
}

.footer p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer a:not(.footer-social-link) {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    margin-top: 12px;
    font-size: 15px;
    transition: color 0.2s;
}

.footer a:not(.footer-social-link):hover {
    color: white;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.footer-brand-row p {
    margin: 0;
    font-size: 15px;
    flex: 1 1 220px;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.footer .footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-top: 0;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #d1d5db;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0;
    line-height: 0;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.footer .footer-social-link svg {
    width: 15px;
    height: 15px;
    max-width: 15px;
    max-height: 15px;
    display: block;
    flex-shrink: 0;
}

.footer .footer-social-link:hover {
    color: #fff;
    transform: translateY(-1px);
}

.footer-social-link--facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.footer-social-link--tiktok:hover {
    background: #010101;
    border-color: #25f4ee;
    color: #fff;
}

.footer-social-link--youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
}

.copyright {
    max-width: 1200px;
    margin: 30px auto 0;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* RESPONSIVE DESIGN - Mobile adaptation like the provided image */
@media(max-width: 900px) {
    .feature {
        gap: 40px;
        padding: 30px;
        margin-bottom: 60px;
    }

    .feature-text h2 {
        font-size: 28px;
    }
}

@media(max-width: 760px) {
    .navbar {
        padding: 15px 20px;
    }

    .logo img {
        height: 38px; /* Perfectly sized logo image for mobile screens */
    }

    .logo h2 {
        font-size: 18px;
    }

    .logo span {
        font-size: 9px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 10px 20px 40px;
        gap: 30px;
    }

    .hero-text {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text h1 {
        font-size: 34px;
        margin-bottom: 15px;
    }

    .hero-text p {
        font-size: 16px;
        margin-bottom: 25px;
    }

    /* Stack Search Box beautifully as in mockup */
    .search-box {
        flex-direction: column;
        width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        gap: 15px;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .search-box input {
        width: 100%;
        background-color: white;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
        padding: 18px 42px 18px 50px;
        background-position: 18px center;
        font-size: 15px;
    }

    .search-box > button,
    .search-box > #searchBtn {
        width: 100%;
        padding: 18px;
        border-radius: 16px;
        font-size: 16px;
        box-shadow: 0 4px 14px rgba(93, 95, 239, 0.35);
    }

    .hero-image {
        width: 100%;
        max-width: 100%;
        height: min(62vh, 420px);
        border-radius: 25px;
    }

    .hero-image img {
        object-position: center top;
    }

    .intro {
        margin: 50px auto 30px;
    }

    .intro h2 {
        font-size: 28px;
    }

    .intro p {
        font-size: 16px;
    }

    .feature {
        flex-direction: column !important;
        padding: 20px;
        gap: 25px;
        margin-bottom: 40px;
        background: transparent;
        box-shadow: none;
        border: none;
    }

    .feature-text {
        text-align: center;
    }

    .feature-text h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .feature-text p {
        font-size: 15px;
        line-height: 1.6;
    }

    .feature-image {
        width: 100%;
        height: 220px;
        border-radius: 20px;
    }

    /* Footer mobil: 2x2 — Mapio+Platforma sus, Companie+Legal jos */
    .footer-container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
        gap: 32px 20px;
        padding-bottom: 40px;
    }

    .footer {
        padding: 60px 24px 30px;
    }

    .footer h3 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .footer h4 {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .footer p {
        font-size: 14px;
    }

    .footer a:not(.footer-social-link) {
        font-size: 14px;
        margin-top: 10px;
    }

    .footer-brand-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .footer-brand-row p {
        font-size: 14px;
        flex-basis: auto;
    }

    .footer-social {
        flex-wrap: wrap;
    }

    .footer .footer-social-link {
        width: 32px;
        height: 32px;
    }

    .footer .footer-social-link svg {
        width: 14px;
        height: 14px;
        max-width: 14px;
        max-height: 14px;
    }
}


/* ==========================================================================
   DASHBOARD-SPECIFIC STYLES (moved from page-level embedded styling)
   ========================================================================== */

.dashboard-page {
    background: #f4f6fb !important;
}

.dashboard-page .navbar {
    max-width: none;
    width: 100%;
    padding-left: clamp(10px, 1.25vw, 24px);
    padding-right: clamp(10px, 1.25vw, 24px);
}

.dashboard-page .footer-container,
.dashboard-page .copyright {
    max-width: none;
    width: 100%;
    padding-left: clamp(10px, 1.25vw, 28px);
    padding-right: clamp(10px, 1.25vw, 28px);
    box-sizing: border-box;
}

.main {
    max-width: 1700px; /* Lățime extinsă pentru a elimina complet spațiul gol inutil de pe monitoarele mari */
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    position: relative;
    z-index: 1; /* Trap search/filters z-index inside main, below header */
}

/* STATS */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 3px 20px rgba(0,0,0,.05);
    border: 1px solid #e2e8f0;
}

.card-title {
    color: #6b7280;
    font-size: 14px;
}

.card-value {
    font-size: 30px;
    margin-top: 10px;
    font-weight: bold;
}

/* MAP */

.map-wrapper {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 3px 20px rgba(0,0,0,.05);
    border: 1px solid #e2e8f0;
}

.family-popup .leaflet-popup-content {
    margin: 10px 12px;
}

.family-popup-content h4 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.family-popup-content p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

/* Popup blocuri — Mapio Score */
.bloc-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.bloc-popup-content {
    font-family: 'Segoe UI', Arial, sans-serif;
    min-width: 240px;
    max-width: 300px;
}

.bloc-popup-header {
    padding: 12px 14px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.bloc-popup-id {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.bloc-popup-title {
    margin: 0 0 4px;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.bloc-popup-address,
.bloc-popup-zone {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.35;
}

.bloc-popup-score {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border-bottom: 1px solid #e5e7eb;
}

.bloc-popup-score-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.bloc-popup-score-value {
    font-size: 22px;
    font-weight: 800;
    color: #059669;
    letter-spacing: -0.02em;
}

.bloc-popup-score--pending .bloc-popup-score-value {
    color: #9ca3af;
    font-size: 18px;
}

.bloc-popup-details {
    padding: 8px 14px 12px;
}

.bloc-popup-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 12px;
    line-height: 1.35;
}

.bloc-popup-row:last-child {
    border-bottom: none;
}

.bloc-popup-label {
    color: #6b7280;
    flex: 1 1 52%;
}

.bloc-popup-value {
    color: #111827;
    font-weight: 600;
    text-align: right;
    flex: 1 1 48%;
}

.bloc-popup-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.bloc-popup-edit-btn {
    border: none;
    background: #eff6ff;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.bloc-popup-edit-btn:hover {
    background: #dbeafe;
}

.bloc-popup-login {
    padding: 12px 14px 14px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.bloc-popup-login p {
    margin: 0 0 10px;
    font-size: 12px;
    color: #4b5563;
    line-height: 1.4;
}

.bloc-popup-login-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}

.bloc-popup-login-btn:hover {
    background: #1d4ed8;
    color: #fff !important;
}

.bloc-popup a.bloc-popup-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    color: #1f2937 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.bloc-popup a.bloc-popup-google-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #111827 !important;
}

.bloc-popup a.bloc-popup-google-btn img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.bloc-popup-loading {
    padding: 16px 14px;
    font-size: 12px;
    color: #6b7280;
}

.risc-seismic-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 2px 0 4px 28px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
}

.risc-seismic-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.risc-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.risc-dot--r1 { background: #dc2626; }
.risc-dot--r2 { background: #ea580c; }
.risc-dot--r3 { background: #eab308; }
.risc-dot--r4 { background: #2563eb; }
.risc-dot--u { background: #7c3aed; }
.risc-dot--c { background: #16a34a; }
.risc-dot--n { background: #9ca3af; }

.blocuri-export-link {
    display: inline-flex;
    align-items: center;
    margin-left: 28px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.blocuri-export-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.bloc-edit-form {
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bloc-edit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: #374151;
}

.bloc-edit-field input,
.bloc-edit-field textarea {
    font-size: 12px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
}

.bloc-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.bloc-edit-actions-right {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.bloc-edit-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #dc2626;
    cursor: pointer;
    padding: 0;
}

.bloc-edit-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.bloc-delete-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.bloc-delete-confirm {
    width: min(100%, 360px);
    background: #fff;
    border-radius: 14px;
    padding: 20px 18px 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    border: 1px solid #e2e8f0;
}

.bloc-delete-confirm-msg {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.bloc-delete-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.bloc-delete-confirm-no,
.bloc-delete-confirm-yes {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    cursor: pointer;
}

.bloc-delete-confirm-no {
    background: #f3f4f6;
    color: #374151;
}

.bloc-delete-confirm-yes {
    background: #dc2626;
    color: #fff;
    font-weight: 600;
}

.bloc-edit-cancel,
.bloc-edit-save {
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
}

.bloc-edit-cancel {
    background: #f3f4f6;
    color: #374151;
}

.bloc-edit-save {
    background: #059669;
    color: #fff;
    font-weight: 600;
}

.bloc-edit-status {
    margin: 0;
    font-size: 11px;
    color: #6b7280;
}

/* Dashboard map: full width edge-to-edge on narrow screens */
@media (max-width: 1023px) {
    .dashboard-page .main {
        padding-left: 0;
        padding-right: 0;
        gap: 10px;
    }

    .dashboard-page .content-wrapper {
        gap: 8px;
    }

    .dashboard-page .search-box-container,
    .dashboard-page .mobile-filters-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dashboard-page .map-wrapper {
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }
}

/* Neighborhood search popup on map */
.neighborhood-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
}

.neighborhood-popup .leaflet-popup-content {
    margin: 12px 14px;
    line-height: 1.45;
    min-width: 0;
}

.neighborhood-popup-content h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.neighborhood-popup-content p {
    margin: 0;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.45;
}

.neighborhood-popup-content p + p {
    margin-top: 4px;
}

.neighborhood-popup-meta-line {
    font-size: 12px;
    line-height: 1.4;
}

.neighborhood-popup-body {
    margin: 0;
}

.neighborhood-popup-link {
    display: inline;
    margin-top: 0;
    font-size: 13px;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
}

.neighborhood-popup-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

@media (max-width: 1023px) {
    .neighborhood-popup .leaflet-popup-content-wrapper {
        max-width: calc(100vw - 32px);
    }

    .neighborhood-popup .leaflet-popup-content {
        max-width: calc(100vw - 60px);
    }
}

/* BOTTOM */

.bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.list-item {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    transition: background 0.2s, padding-left 0.2s;
    font-size: 15px;
    color: #4b5563;
}

.list-item-clickable {
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
}

.list-item-clickable:hover {
    background: #f8fafc;
    padding-left: 8px;
    border-radius: 8px;
}

.badge {
    background: #4e54c8;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* SEARCH OVERRIDE FOR DASHBOARD */
.search-box-container {
    width: 100%;
    margin-bottom: 5px;
}

/* MOBILE FILTERS CARD (dashboard) */
.mobile-filters-card {
    display: none;
    position: relative;
    width: 100%;
    z-index: 1009;
}

.mobile-filters-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    font-size: 16px;
    font-weight: 600;
    color: #1d2939;
    cursor: pointer;
    font-family: inherit;
    transition: border-radius 0.15s ease;
}

.mobile-filters-toggle-label {
    text-align: left;
}

.mobile-filters-chevron {
    font-size: 14px;
    color: #6b7280;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.mobile-filters-card.is-open .mobile-filters-toggle {
    border-radius: 16px 16px 0 0;
    border-bottom-color: transparent;
    box-shadow: none;
}

.mobile-filters-card.is-open .mobile-filters-chevron {
    transform: rotate(180deg);
}

.mobile-filters-panel {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    z-index: auto;
}

.sidebar-filters.mobile-filters-mode {
    display: none !important;
    position: relative;
    margin-top: 0;
    border-radius: 0 0 16px 16px;
    border-top: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    max-height: none;
    overflow: visible;
    padding: 12px 16px 16px;
}

.sidebar-filters.mobile-filters-mode .filter-list {
    max-height: none;
    overflow: visible;
}

.mobile-filters-apply-btn {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #5d5fef 0%, #4f46e5 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-filters-apply-btn:active {
    transform: scale(0.98);
}

.sidebar-filters.mobile-filters-mode .mobile-filters-apply-btn {
    display: block;
}

.sidebar-filters.mobile-filters-mode.is-open {
    display: block !important;
    border-radius: 0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
}

.mobile-filters-panel .sidebar-contribute.mobile-filters-contribute {
    display: block;
    margin-top: 0;
    border-radius: 0 0 16px 16px;
    border-top: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.sidebar-filters.mobile-filters-mode .filter-header {
    display: none;
}

@media (max-width: 1023px) {
    .mobile-filters-card {
        display: block;
        margin-bottom: 5px;
    }
}

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

    .bottom {
        grid-template-columns: 1fr;
    }
}

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

    #map {
        height: 400px;
    }
}

/* NEIGHBORHOOD LABELS ON MAP */
.neighborhood-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 13px !important; /* Mărit de la 11px la 13px pentru o lizibilitate mult mai bună la baseline */
    font-weight: 800 !important;
    color: #1e293b !important;
    text-shadow: -1.5px -1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px 1.5px 0 #fff !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.sector-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    letter-spacing: 0.3px !important;
}

.sector-popup-meta {
    font-weight: 600;
    color: #374151;
}

/* ==========================================
   SPLIT DASHBOARD LAYOUT & SIDEBAR FILTERS (DESKTOP)
   ========================================== */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

@media(min-width: 1024px) {
    .main {
        display: grid;
        grid-template-columns: 350px 1fr 300px;
        gap: 30px;
    }

    .sidebar-filters {
        display: block !important; /* Arătăm sidebar-ul permanent doar pe Desktop */
    }

    .menu-btn {
        display: none !important; /* Ascundem butonul hamburger pe Desktop */
    }
}

.sidebar-filters {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05); /* Umbră profesională business clean */
    border: 1px solid #e2e8f0;
    height: fit-content;
    display: none; /* Ascuns implicit pe mobil */
}

.filter-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.filter-header h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #111827;
    font-weight: 700;
}

.filter-header span {
    font-size: 12px;
    color: #6b7280;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-size: 16px;
    font-weight: 400;
    color: #374151; /* Text gri închis profesional */
    border: 1px solid #e2e8f0;
    background: #f9fafb;
    user-select: none;
}

.filter-item:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.filter-label-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-item input[type="checkbox"] {
    accent-color: #2563eb; /* Albastru corporate high-end */
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-count {
    font-size: 12.5px; /* Font mărit */
    color: #4b5563;
    font-weight: 600;
    background: #e5e7eb;
    padding: 3px 10px; /* Padding generos */
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
}

/* Starea de checkat - Curată, minimalistă și profesională */
.filter-item-checked {
    background: #f0f9ff !important; /* Soft blue tint */
    color: #0369a1 !important; /* Deep ocean blue */
    border-color: #bae6fd !important;
}

.filter-item-checked .filter-count {
    background: #bae6fd !important;
    color: #0369a1 !important;
}

/* Modals animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   CONTACT PAGE STYLES (Clean, mobile-first and matching the project)
   ========================================================================== */
.contact-page {
    background: #f8fafc;
}

.contact-main {
    max-width: 1200px;
    margin: 40px auto 100px;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    width: 100%;
}

.contact-info-container h1 {
    font-size: 40px;
    font-weight: 800;
    margin: 0 0 20px;
    color: #111827;
    line-height: 1.2;
}

.contact-info-container p {
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-detail-icon {
    background: #eef2ff;
    color: #5d5fef;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(93, 95, 239, 0.05);
}

.contact-detail-content h4 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.contact-detail-content p {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.contact-form-container {
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.contact-form-container h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #111827;
}

.contact-form-container p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 25px;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #111827;
    background: #f9fafb;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #5d5fef;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(93, 95, 239, 0.1);
}

.contact-submit-btn {
    width: 100%;
    padding: 16px;
    background: #5d5fef;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(93, 95, 239, 0.2);
}

.contact-submit-btn:hover {
    background: #4a4cd8;
    transform: translateY(-1px);
}

.contact-success-alert {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 1023px) {
    .contact-main {
        grid-template-columns: 1fr;
        gap: 40px;
        margin: 20px auto 60px;
        padding: 0 20px;
    }
}

@media (max-width: 900px) {
    .contact-form-container {
        padding: 30px 20px;
    }
}

@media (max-width: 500px) {
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ==========================================
   FIX FOR SEARCH SUGGESTIONS DROPDOWN STACKING OVER LEAFLET MAP
   ========================================== */
.search-box-container {
    position: relative !important;
    z-index: 1010 !important; /* Stack above Leaflet layers which are z-index 400 */
}

.suggestions-dropdown {
    z-index: 2000 !important; /* Force dropdown above everything else */
}

/* ==========================================
   RESPONSIVE MOBILE SEARCHBAR UPDATES (HIDE BUTTON, SHOW LUPA)
   ========================================== */
@media (max-width: 760px) {
    #searchBtn {
        display: none !important; /* Hide too big blue button on mobile */
    }

    .search-box {
        padding: 5px !important;
        border-radius: 16px !important;
    }

    .search-box input {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') !important; /* Show magnifying glass */
        background-position: 16px center !important;
        background-repeat: no-repeat !important;
        padding-left: 48px !important;
    }
}

/* ==========================================
   SPECIFIC STYLES FOR THE RIGHT SIDEBAR
   ========================================== */
@media(max-width: 1023px) {
    .sidebar-navigation {
        display: none !important;
    }
}
@media(min-width: 1024px) {
    .sidebar-navigation {
        display: block !important;
        background: #fff;
        border-radius: 16px;
        padding: 24px;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
        border: 1px solid #e2e8f0;
        height: fit-content;
    }
}
.filter-item-clickable-link {
    transition: all 0.2s ease-in-out;
}
.filter-item-clickable-link:hover {
    background: #f0f9ff !important;
    color: #0369a1 !important;
    border-color: #bae6fd !important;
    padding-left: 20px !important;
}

/* ==========================================
   DASHBOARD — LEFT STACK (Filtre)
   ========================================== */
.sidebar-left-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

/* ==========================================
   DASHBOARD — RIGHT STACK (Navigare + Contribuie)
   ========================================== */
.sidebar-right-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.sidebar-contribute {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    height: fit-content;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-left-stack > .sidebar-filters,
.sidebar-right-stack > .sidebar-contribute,
.sidebar-right-stack > .sidebar-navigation {
    width: 100%;
}

.contrib-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contrib-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f9fafb;
    color: #374151;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-family: inherit;
    user-select: none;
    box-sizing: border-box;
}

.contrib-item:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151;
}

.contrib-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

/* Modal Contribuie */
.contrib-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(15, 23, 42, 0.55);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.contrib-modal-overlay.active {
    display: flex;
}

.contrib-modal {
    position: relative;
    width: min(100%, 440px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    border: 1px solid #e2e8f0;
}

.contrib-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
}

.contrib-modal-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: #111827;
}

.contrib-modal-lead {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
}

.contrib-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contrib-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contrib-field span {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.contrib-field input,
.contrib-field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
}

.contrib-field textarea {
    resize: vertical;
    min-height: 100px;
}

.contrib-field input:focus,
.contrib-field textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.contrib-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.contrib-submit-btn {
    margin-top: 4px;
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: 10px;
    background: #4f46e5;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.contrib-submit-btn:hover:not(:disabled) {
    background: #4338ca;
}

.contrib-submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.contrib-feedback {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    padding: 10px 12px;
    border-radius: 8px;
}

.contrib-feedback.is-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.contrib-feedback.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

@media (max-width: 1023px) {
    .sidebar-contribute {
        display: block;
        border-radius: 12px;
        margin-top: 10px;
    }

    .sidebar-left-stack {
        gap: 10px;
    }
}

/* ==========================================
   LAYOUT FOR PAGES WITH TWO COLUMNS (CONTENT + SIDEBAR)
   ========================================== */
@media(min-width: 1024px) {
    .main-two-columns {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 280px !important;
        gap: clamp(20px, 2.5vw, 36px) !important;
        max-width: min(100%, 1920px) !important;
        margin: 0 auto;
        padding: 20px clamp(16px, 3vw, 48px);
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 1023px) {
    .main-two-columns {
        display: flex !important;
        flex-direction: column;
        gap: 20px !important;
        padding: 16px 20px;
        width: 100%;
        max-width: 100% !important;
    }
}

/* ==========================================
   RESPONSIVE RULES FOR CONTACT LEFT WRAPPER
   ========================================== */
.contact-left-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1.2fr !important;
    gap: 40px !important;
    width: 100%;
}
@media (max-width: 1023px) {
    .contact-left-wrapper {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
}

/* ==========================================
   DASHBOARD (dash.php) — FULL-WIDTH DESKTOP MAP
   ========================================== */
@media (min-width: 1024px) {
    .dashboard-page .main {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 14px clamp(10px, 1.25vw, 24px);
        gap: clamp(10px, 1.1vw, 18px);
        grid-template-columns: 320px minmax(0, 1fr) 260px;
        align-items: start;
        box-sizing: border-box;
    }

    .dashboard-page .content-wrapper {
        min-width: 0;
        gap: 10px;
    }

    .dashboard-page .sidebar-left-stack,
    .dashboard-page .sidebar-right-stack {
        position: sticky;
        top: 12px;
        align-self: start;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }

    .dashboard-page .sidebar-filters,
    .dashboard-page .sidebar-contribute,
    .dashboard-page .sidebar-navigation {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .dashboard-page .sidebar-filters,
    .dashboard-page .sidebar-contribute,
    .dashboard-page .sidebar-navigation {
        padding: 20px;
    }

    .dashboard-page .map-wrapper {
        border-radius: 14px;
    }

    .dashboard-page #map {
        height: min(92vh, calc(100vh - 120px));
        min-height: 480px;
    }
}

@media (min-width: 1440px) {
    .dashboard-page .navbar {
        padding-left: clamp(14px, 1.5vw, 28px);
        padding-right: clamp(14px, 1.5vw, 28px);
    }

    .dashboard-page .main {
        padding-left: clamp(14px, 1.5vw, 28px);
        padding-right: clamp(14px, 1.5vw, 28px);
        grid-template-columns: 340px minmax(0, 1fr) 280px;
    }
}
