:root {
    --np-green: #1f6b4a;
    --np-green-dark: #154a34;
    --np-sand: #f4f0e6;
    --np-card: #ffffff;
    --np-text: #1a2e24;
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background: linear-gradient(180deg, var(--np-sand) 0%, #e8efe9 40%, #dfece3 100%);
    color: var(--np-text);
    min-height: 100vh;
}

.site-header {
    background: url('/images/sfondo_tramonto.png') center center / cover no-repeat;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 24px rgba(21, 74, 52, 0.25);
}

.site-eyebrow {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
    opacity: 0.85;
}

.site-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
}

.site-subtitle {
    opacity: 0.9;
    font-size: 0.95rem;
}

.site-nav {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(31, 107, 74, 0.12);
    backdrop-filter: blur(6px);
    position: relative;
    z-index: 1030;
}

.site-nav .nav-link {
    color: var(--np-green-dark);
    font-weight: 500;
}

.site-nav .nav-link:hover {
    color: var(--np-green);
}

.site-nav .nav-link.active {
    background: var(--np-green);
    color: #fff;
}

.site-nav .dropdown-menu {
    border-color: rgba(31, 107, 74, 0.15);
    box-shadow: 0 8px 24px rgba(26, 46, 36, 0.12);
    z-index: 1031;
}

.site-nav .nav-link.dropdown-toggle {
    border: 0;
    background: transparent;
    color: var(--np-green-dark);
}

.site-nav .nav-link.dropdown-toggle.active,
.site-nav .nav-link.dropdown-toggle.show {
    background: var(--np-green);
    color: #fff;
}

.site-nav .nav-link.dropdown-toggle.active:hover,
.site-nav .nav-link.dropdown-toggle.show:hover {
    background: var(--np-green-dark);
    color: #fff;
}

.site-nav .nav-link.active:hover {
    background: var(--np-green-dark);
    color: #fff;
}

.site-nav .dropdown-item.active,
.site-nav .dropdown-item:active {
    background: var(--np-green);
    color: #fff;
}

.site-footer {
    color: #5a6f64;
    border-top: 1px solid rgba(31, 107, 74, 0.15);
    background: rgba(255, 255, 255, 0.5);
}

.site-footer a {
    color: var(--np-green-dark);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.notification-prompt {
    border-left: 4px solid var(--np-green) !important;
}

.notification-prompt-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.notification-topic-check {
    margin-bottom: 0;
}

.notification-prompt-actions {
    min-width: 11rem;
}

.notification-prefs-page {
    max-width: 40rem;
}

.notification-prefs-topics {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.notification-prefs-topic .form-check-label {
    font-weight: 500;
}

.legal-page {
    max-width: 900px;
}

.legal-card {
    border: none;
    border-left: 4px solid var(--np-green);
}

.metric-card {
    background: var(--np-card);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 8px 24px rgba(26, 46, 36, 0.08);
    border-left: 4px solid var(--np-green);
    height: 100%;
}

.metric-temp { border-left-color: #c45c26; }
.metric-rain { border-left-color: #2b6cb0; }
.metric-wind { border-left-color: #4a5568; }

.metric-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5a6f64;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.metric-extra {
    font-size: 0.9rem;
    color: #5a6f64;
    margin: 0.35rem 0 0;
}

.info-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--np-card);
    border-radius: 0.75rem;
    padding: 0.85rem 1.25rem;
    box-shadow: 0 4px 16px rgba(26, 46, 36, 0.06);
}

.section-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--np-green-dark);
}

.chart-card {
    background: var(--np-card);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(26, 46, 36, 0.08);
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--np-green-dark);
    margin-bottom: 1rem;
}

.history-table-wrap {
    max-height: 420px;
    overflow: auto;
    border: 1px solid rgba(26, 46, 36, 0.08);
    border-radius: 0.75rem;
}

.history-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f7f5;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5a6f64;
    white-space: nowrap;
}

.history-table tbody td {
    font-size: 0.9rem;
    vertical-align: middle;
}

.history-table-hint {
    margin-top: -0.35rem;
}

.forecast-daily {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.75rem;
}

.forecast-day-card {
    background: var(--np-card);
    border-radius: 1rem;
    padding: 0.9rem 0.75rem;
    box-shadow: 0 6px 18px rgba(26, 46, 36, 0.07);
    text-align: center;
}

.forecast-day-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--np-green-dark);
    margin-bottom: 0.35rem;
}

.forecast-day-icon {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.forecast-day-desc {
    font-size: 0.72rem;
    color: #5a6f64;
    min-height: 2.2em;
    margin-bottom: 0.35rem;
}

.forecast-day-temp {
    font-weight: 700;
    font-size: 0.95rem;
}

.forecast-day-temp .temp-min {
    color: #2b6cb0;
}

.forecast-day-temp .temp-max {
    color: #c45c26;
}

.forecast-day-meta {
    font-size: 0.72rem;
    color: #5a6f64;
    margin-top: 0.35rem;
    line-height: 1.35;
}

.forecast-hourly-wrap {
    margin-bottom: 1rem;
}

.forecast-hourly {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.forecast-hour-card {
    flex: 0 0 auto;
    min-width: 4.25rem;
    background: var(--np-card);
    border-radius: 0.75rem;
    padding: 0.55rem 0.45rem;
    box-shadow: 0 4px 12px rgba(26, 46, 36, 0.06);
    text-align: center;
    font-size: 0.75rem;
}

.forecast-hour-card .forecast-hour-time {
    font-weight: 600;
    color: var(--np-green-dark);
}

.forecast-hour-card .forecast-hour-icon {
    font-size: 1.25rem;
    margin: 0.15rem 0;
}

.omirl-station-card-palo {
    border-color: rgba(45, 90, 61, 0.28);
    box-shadow: 0 4px 16px rgba(45, 90, 61, 0.12);
}

.omirl-station-card {
    background: var(--np-card);
    border-radius: 0.85rem;
    padding: 0.85rem;
    box-shadow: 0 4px 14px rgba(26, 46, 36, 0.07);
    border: 1px solid rgba(26, 46, 36, 0.06);
    height: 100%;
}

.omirl-station-card .fw-semibold {
    font-size: 0.95rem;
}

.omirl-station-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.5rem;
    font-size: 0.8rem;
}

.omirl-station-metrics > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.omirl-station-metrics strong {
    font-size: 0.88rem;
}

.liguria-alert-banner {
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(26, 46, 36, 0.08);
}

.liguria-alert-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-bottom: 0.2rem;
}

.liguria-alert-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.liguria-alert-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

.liguria-alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.liguria-badge-green { background: #2f855a; }
.liguria-badge-yellow { background: #d69e2e; color: #1a2e24; }
.liguria-badge-orange { background: #dd6b20; }
.liguria-badge-red { background: #c53030; }

.liguria-alert-orange {
    background: #fff5eb;
    border-color: #fbd38d;
    color: #7b341e;
}

.liguria-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.liguria-alert-card {
    background: var(--np-card);
    border-radius: 0.75rem;
    padding: 0.8rem 0.9rem;
    box-shadow: 0 4px 12px rgba(26, 46, 36, 0.06);
}

.liguria-alert-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--np-green-dark);
    margin-bottom: 0.35rem;
}

.liguria-alert-card-level {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    color: #fff;
    margin-bottom: 0.35rem;
}

.liguria-alert-card-detail {
    font-size: 0.78rem;
    color: #4a5568;
    line-height: 1.35;
}

.liguria-phenomena-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.liguria-phenomenon-chip {
    display: inline-block;
    background: #edf2f7;
    color: #2d3748;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
}

.attivita-card {
    border: none;
    border-left: 4px solid var(--np-green);
    scroll-margin-top: 5rem;
    transition: box-shadow 0.25s ease, outline-color 0.25s ease;
}

.attivita-tabs .nav-link {
    color: var(--np-green-dark);
    font-weight: 500;
}

.attivita-tabs .nav-link.active {
    color: var(--np-green-dark);
    border-bottom-color: var(--np-green);
}

.attivita-category-badge {
    font-weight: 500;
    font-size: 0.72rem;
}

.attivita-date {
    text-transform: capitalize;
}

.attivita-past-list {
    border-radius: 0.75rem;
    overflow: hidden;
}

[id^="activity-"] {
    scroll-margin-top: 5rem;
}

.attivita-card--focus {
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.35), 0 8px 24px rgba(26, 46, 36, 0.12);
    outline: 2px solid rgba(45, 90, 61, 0.45);
    outline-offset: 2px;
}

.attivita-card-image,
.attivita-image-always {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

.attivita-card-image {
    border-radius: 0.75rem 0.75rem 0 0;
}

.attivita-actions .attivita-calendar-link {
    font-size: 0.78rem;
}

.attivita-participation .attivita-participate-btn {
    min-width: 6.5rem;
}

.attivita-participants-label {
    font-weight: 500;
    color: #4a5568;
}

.attivita-participants-names {
    color: #718096;
}

.admin-activity-thumb {
    max-width: 120px;
    max-height: 80px;
    object-fit: cover;
}

.admin-crud-toolbar .form-check-label,
.admin-activities-toolbar .form-check-label {
    user-select: none;
}

.admin-activities-page .activity-description-cell {
    max-width: 320px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-activities-page tr.activity-row-past td {
    color: #6c757d;
}

.admin-crud-page .admin-description-cell {
    max-width: 280px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-crud-page .admin-list-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

#activityFormModal .modal-body,
#categoryFormModal .modal-body,
#routeFormModal .modal-body,
#poiFormModal .modal-body {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

.route-track-editor-stage {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--bs-border-color, #dee2e6);
    box-shadow: 0 0.125rem 0.5rem rgba(15, 23, 42, 0.08);
    background: #e9ecef;
}

.route-track-editor-stage.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    border-radius: 0;
    border: 0;
    box-shadow: none;
}

.route-track-editor-stage.is-fullscreen .route-track-editor-map {
    height: 100vh;
    min-height: 100vh;
}

.route-track-editor-map {
    height: min(78vh, 820px);
    min-height: 480px;
    width: 100%;
    background: #e9ecef;
}

.route-track-editor-map.rte-box-select-active,
.route-track-editor-map.rte-box-select-active .leaflet-container,
.route-track-editor-map.rte-draw-mode-active,
.route-track-editor-map.rte-draw-mode-active .leaflet-container {
    cursor: crosshair;
}

.route-track-editor-map .leaflet-popup-pane {
    z-index: 700;
}

.route-track-editor-map .leaflet-marker-pane {
    z-index: 600;
}

.rte-map-panel {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    z-index: 1000;
    padding: 0.65rem 0.75rem 0.55rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(8px);
    max-height: calc(100% - 1.5rem);
    overflow: auto;
    pointer-events: none;
}

.rte-map-panel-top,
.rte-map-panel-tools,
.rte-tool-group,
.rte-tool-group-actions,
.rte-map-panel .btn-group,
.rte-map-panel .form-check,
.rte-map-panel .d-flex {
    pointer-events: none;
}

.rte-map-panel-title,
.rte-map-panel-hint,
.rte-map-panel .btn,
.rte-map-panel input,
.rte-map-panel select,
.rte-map-panel label,
.rte-map-panel a,
.rte-map-panel .form-check-input,
.rte-map-panel .form-check-label {
    pointer-events: auto;
}

.rte-map-panel-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.55rem;
}

.rte-map-panel-title {
    min-width: 0;
    flex: 1 1 12rem;
}

.rte-map-panel-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem 0.85rem;
}

.rte-tool-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.rte-tool-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.2;
}

.rte-tool-group-actions {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
}

.rte-snap-input {
    width: 3.4rem;
}

.rte-map-panel-hint {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    line-height: 1.35;
}

.rte-map-panel-hint kbd {
    font-size: 0.72rem;
}

.rte-map-status {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 1000;
    margin: 0;
    box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.12);
    pointer-events: none;
}

.rte-map-panel .btn.active {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

@media (max-width: 768px) {
    .route-track-editor-map {
        height: min(70vh, 640px);
        min-height: 420px;
    }

    .rte-map-panel {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        padding: 0.55rem;
    }

    .rte-tool-group-poi {
        flex: 1 1 100%;
    }
}

.rte-context-menu {
    position: fixed;
    z-index: 2000;
    min-width: 12rem;
    padding: 0.25rem 0;
    background: #fff;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.rte-context-menu button {
    display: block;
    width: 100%;
    padding: 0.35rem 0.75rem;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 0.875rem;
}

.rte-context-menu button:hover,
.rte-context-menu button:focus {
    background: var(--bs-light, #f8f9fa);
}

.rte-context-menu .text-danger:hover {
    background: rgba(220, 53, 69, 0.08);
}

.rte-endpoint-flag-wrap {
    background: transparent;
    border: 0;
}

.rte-endpoint-flag {
    position: relative;
    width: 28px;
    height: 36px;
    pointer-events: auto;
    cursor: pointer;
}

.rte-endpoint-flag-pole {
    position: absolute;
    left: 3px;
    bottom: 0;
    width: 3px;
    height: 34px;
    border-radius: 2px;
    background: #334155;
}

.rte-endpoint-flag-cloth {
    position: absolute;
    left: 6px;
    top: 2px;
    min-width: 18px;
    height: 14px;
    padding: 0 4px;
    border-radius: 2px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
}

.rte-endpoint-flag-start .rte-endpoint-flag-cloth {
    background: #198754;
}

.rte-endpoint-flag-end .rte-endpoint-flag-cloth {
    background: #dc3545;
}

.rte-flag-legend {
    font-weight: 600;
}

.rte-flag-legend-start {
    color: #198754;
}

.rte-flag-legend-end {
    color: #dc3545;
}

.rte-poi-marker-wrap {
    background: transparent;
    border: 0;
}

.rte-poi-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1.5px solid #5c4d9e;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.22);
    font-size: 12px;
    line-height: 1;
    cursor: default;
}

.rte-poi-popup-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.rte-poi-popup-img {
    display: block;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.rte-poi-popup-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.rte-poi-popup-desc {
    font-size: 0.82rem;
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.poi-admin-map {
    height: 250px;
    width: 100%;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.375rem;
    background: #e9ecef;
    z-index: 0;
}

.poi-admin-map .leaflet-container {
    height: 100%;
    width: 100%;
    border-radius: 0.375rem;
}

.poi-admin-map .leaflet-popup-pane {
    z-index: 700;
}

.poi-admin-map .leaflet-marker-pane {
    z-index: 600;
}

.poi-admin-nearby-wrap {
    background: transparent;
    border: 0;
}

.poi-admin-map-popup-img {
    display: block;
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.35rem;
}

.poi-gallery {
    position: relative;
    margin-bottom: 0.35rem;
}

.poi-gallery-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #e9ecef;
}

.poi-gallery-slide {
    display: none;
    width: 100%;
    max-height: 140px;
    object-fit: cover;
    margin: 0;
}

.poi-gallery-slide.is-active {
    display: block;
}

.poi-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1.6rem;
    height: 1.6rem;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.poi-gallery-prev { left: 0.35rem; }
.poi-gallery-next { right: 0.35rem; }

.poi-gallery-counter {
    position: absolute;
    right: 0.4rem;
    bottom: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 0.7rem;
    z-index: 2;
}

.admin-hub-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    color: inherit;
}

.admin-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.admin-hub-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.admin-log-file-list {
    max-height: 28rem;
    overflow-y: auto;
}

.admin-log-viewer {
    max-height: 32rem;
    overflow: auto;
    font-size: 0.78rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
    background: #1e1e1e;
    color: #d4d4d4;
}

.api-docs-pre {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem 1.1rem;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-x: auto;
    margin-bottom: 0;
}

.api-docs-pre code {
    color: inherit;
    white-space: pre;
}

.api-docs-tabs .nav-link {
    font-size: 0.85rem;
    color: var(--np-green-dark);
}

.api-docs-tabs .nav-link.active {
    color: var(--np-green-dark);
    border-bottom-color: var(--np-green);
}

.admin-api-docs-table code {
    font-size: 0.78rem;
}

.admin-realestate-map {
    height: 360px;
    width: 100%;
}

.admin-realestate-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.25rem;
    background: #e9ecef;
}

.admin-realestate-log {
    max-height: 12rem;
    overflow: auto;
}

.admin-realestate-table td {
    vertical-align: middle;
}

.admin-realestate-detail {
    font-size: 0.9rem;
}

.immobili-map {
    height: min(420px, 55vh);
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid rgba(31, 107, 74, 0.2);
    overflow: hidden;
}

.immobili-toolbar .form-select {
    min-width: 11rem;
}

.immobili-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.immobili-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1rem;
    background: var(--np-card);
    border: 1px solid rgba(31, 107, 74, 0.15);
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.immobili-card:hover {
    border-color: rgba(31, 107, 74, 0.45);
}

.immobili-card.is-selected {
    border-color: var(--np-green);
    border-left-width: 5px;
    background: #eef7f1;
    box-shadow: 0 0.45rem 1.1rem rgba(21, 74, 52, 0.18);
    outline: 2px solid rgba(31, 107, 74, 0.35);
    outline-offset: 1px;
}

.immobili-card.is-dimmed {
    opacity: 0.55;
}

.immobili-card.is-selected .immobili-card-title::before {
    content: "▶ ";
    color: var(--np-green);
}

.immobili-card-media {
    min-height: 110px;
}

.immobili-card-media img,
.immobili-card-placeholder {
    width: 100%;
    height: 100%;
    min-height: 110px;
    object-fit: cover;
    border-radius: 0.35rem;
    background: #e4ebe6;
}

.immobili-card-title {
    color: var(--np-green-dark);
}

.immobili-price {
    color: var(--np-green-dark);
    white-space: nowrap;
}

.immobili-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
}

.immobili-excerpt {
    color: #4a5c52;
}

.leaflet-marker-icon.immobili-marker-selected {
    filter: drop-shadow(0 0 4px var(--np-green));
}

@media (max-width: 640px) {
    .immobili-card {
        grid-template-columns: 1fr;
    }

    .immobili-card-media img,
    .immobili-card-placeholder {
        min-height: 160px;
        max-height: 200px;
    }
}

/* Home bulletin: notizie + eventi prossimi 7 giorni */
.home-ticker {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding: 0.15rem 0.1rem 0.45rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.home-ticker-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-width: 12.5rem;
    max-width: 18rem;
    text-align: left;
    border: 1px solid rgba(45, 90, 61, 0.16);
    border-radius: 0.85rem;
    background: var(--np-card, #fff);
    box-shadow: 0 4px 12px rgba(26, 46, 36, 0.06);
    padding: 0.7rem 0.85rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

a.home-ticker-item:hover,
a.home-ticker-item:focus-visible {
    color: inherit;
    text-decoration: none;
}

.home-ticker-event--has-image {
    padding-top: 0;
    overflow: hidden;
}

.home-ticker-image {
    display: block;
    width: calc(100% + 1.7rem);
    max-width: none;
    margin: 0 -0.85rem 0.35rem;
    height: 5.5rem;
    object-fit: cover;
}

.home-ticker-item:hover,
.home-ticker-item:focus-visible {
    border-color: rgba(45, 90, 61, 0.4);
    box-shadow: 0 6px 16px rgba(26, 46, 36, 0.1);
    transform: translateY(-1px);
    outline: none;
}

.home-ticker-news {
    border-left: 3px solid var(--np-green, #2d5a3d);
}

.home-ticker-event {
    border-left: 3px solid #c47a2c;
}

.home-ticker-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--np-green-dark, #1a2e24);
}

.home-ticker-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1f2d26;
}

.home-ticker-meta {
    font-size: 0.75rem;
    color: #5a6f64;
}

.home-detail-body {
    white-space: pre-wrap;
    line-height: 1.55;
}

.home-poi-map-stage {
    position: relative;
    border-radius: 0.85rem;
    border: 1px solid rgba(31, 107, 74, 0.18);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(26, 46, 36, 0.06);
    background: #e8efe9;
}

.home-poi-map-wrap {
    position: relative;
}

.home-poi-map {
    height: min(420px, 55vh);
    width: 100%;
    background: #e8efe9;
}

.home-poi-map-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 500;
    display: flex;
    gap: 6px;
}

.home-poi-map-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(31, 107, 74, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #1f4d35;
    box-shadow: 0 2px 8px rgba(26, 46, 36, 0.12);
    cursor: pointer;
}

.home-poi-map-tool-btn:hover,
.home-poi-map-tool-btn:focus-visible,
.home-poi-map-tool-btn.is-active {
    background: #fff;
    border-color: rgba(31, 107, 74, 0.4);
    outline: none;
}

.home-poi-map-stage:fullscreen,
.home-poi-map-stage.home-poi-map-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2000 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    background: #dde5df;
}

.home-poi-map-stage:fullscreen .home-poi-map-wrap,
.home-poi-map-stage.home-poi-map-fullscreen .home-poi-map-wrap,
.home-poi-map-stage:fullscreen .home-poi-map,
.home-poi-map-stage.home-poi-map-fullscreen .home-poi-map {
    position: absolute;
    inset: 0;
    height: 100% !important;
    width: 100% !important;
}

body.home-poi-map-fullscreen-active {
    overflow: hidden;
}

.home-poi-map-context {
    position: fixed;
    z-index: 2100;
    min-width: 240px;
    padding: 4px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
}

.home-poi-map-context-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 7px;
    background: transparent;
    text-align: left;
    font-size: 0.92rem;
    color: #1e293b;
    cursor: pointer;
    text-decoration: none;
}

.home-poi-map-context-item:hover,
.home-poi-map-context-item:focus-visible {
    background: rgba(45, 90, 61, 0.1);
    outline: none;
    color: #1e293b;
}

.home-poi-map-context-hint {
    font-size: 0.75rem;
    line-height: 1.35;
    max-width: 260px;
}

.home-poi-modal {
    position: absolute;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px;
    background: transparent;
    pointer-events: none;
}

.home-poi-modal.d-none {
    display: none;
}

.home-poi-modal-card {
    width: min(100%, 400px);
    max-height: calc(100% - 24px);
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.35);
    padding: 18px 20px 20px;
    pointer-events: auto;
}

@media (max-width: 767.98px) {
    .home-poi-modal {
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }

    .home-poi-modal-card {
        width: 100%;
        max-width: none;
        max-height: min(55vh, 420px);
        border-radius: 14px 14px 0 0;
    }
}

.home-poi-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.home-poi-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.home-poi-modal-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 4px;
}

.home-poi-coords {
    font-size: 0.8rem;
    color: #64748b;
    font-family: ui-monospace, monospace;
    margin-bottom: 0.75rem;
}

.home-poi-field {
    margin-bottom: 0.85rem;
}

.home-poi-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.home-poi-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.home-poi-photo-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.home-poi-photo-thumbs img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.home-poi-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.home-poi-placement {
    background: transparent;
    border: 0;
}

.home-poi-placement-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid #b91c1c;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(185, 28, 28, 0.45);
    cursor: grab;
    font-size: 14px;
    line-height: 1;
    user-select: none;
}

.home-poi-marker {
    background: transparent;
    border: 0;
}

.home-poi-marker-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--np-green, #2d5a3d);
    box-shadow: 0 3px 10px rgba(26, 46, 36, 0.28);
    border: 2px solid #fff;
}

.home-poi-marker-icon {
    display: block;
    transform: rotate(45deg);
    font-size: 0.95rem;
    line-height: 1;
}

.home-poi-popup-meta {
    font-size: 0.78rem;
    color: #5a6f64;
    margin-top: 0.2rem;
}

.home-poi-popup-desc {
    font-size: 0.85rem;
    margin: 0.45rem 0 0;
    line-height: 1.4;
}

.home-poi-popup-img {
    display: block;
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 0.4rem;
    margin-top: 0.55rem;
}

.home-poi-popup-link {
    display: inline-block;
    margin-top: 0.55rem;
    font-size: 0.82rem;
}

.home-poi-popup-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.home-poi-popup-actions .home-poi-popup-link {
    margin-top: 0.2rem;
}

.home-poi-popup-admin {
    font-weight: 600;
}

