/* =============================================
   PLANIFICADOR OVERRIDE
   Estils visuals per al mapa Leaflet i panells
   del planificador de rutes Tourdera.
   ============================================= */

/* ---- LEAFLET MAP ---- */
#map {
    z-index: 0;
}

.right-scroll-div .img-div img {
    max-height: 250px;
    object-fit: cover;
}

.mapa-sec .leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.mapa-sec .leaflet-control-zoom a {
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    font-size: 20px !important;
    color: #222 !important;
    border-bottom: 1px solid #e8e8e8 !important;
    transition: background 0.2s ease;
}

.mapa-sec .leaflet-control-zoom a:hover {
    background: #007F6F !important;
    color: #fff !important;
}

.mapa-sec .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.75) !important;
    font-size: 10px !important;
    padding: 2px 8px !important;
    border-radius: 8px 0 0 0 !important;
}

/* ---- LEAFLET POPUPS ---- */
.leaflet-popup-content-wrapper {
    border-radius: 16px !important;
    box-shadow: 0 8px 30px rgba(0, 44, 24, 0.28) !important;
    padding: 0 !important;
    overflow: hidden;
    border: 2px solid rgba(0, 127, 111, 0.15);
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 18px 22px !important;
    font-family: 'Poppins-Regular', system-ui, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #222 !important;
    min-width: 220px;
}

.leaflet-popup-content strong {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.3;
    color: #1A1A1A;
    display: block;
    margin-bottom: 6px;
}

.leaflet-popup-tip-container {
    margin-top: -1px;
}

.leaflet-popup-tip {
    box-shadow: 0 4px 12px rgba(0, 44, 24, 0.15) !important;
    border: 1px solid rgba(0, 127, 111, 0.1);
}

.leaflet-popup-close-button {
    width: 28px !important;
    height: 28px !important;
    font-size: 20px !important;
    line-height: 28px !important;
    color: #999 !important;
    top: 6px !important;
    right: 6px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    text-align: center !important;
    padding: 0 !important;
    transition: all 0.2s ease;
}

.leaflet-popup-close-button:hover {
    color: #D5446B !important;
    background: #fff !important;
}

/* Popup custom content */
.popup-tram {
    font-family: 'Poppins-Regular', system-ui, sans-serif;
}

/* Imatge destacada de les incidències puntuals */
.popup-avis-img {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.popup-avis-img img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.popup-tram-title {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 16px;
    color: #1A1A1A;
    margin-bottom: 8px;
    line-height: 1.3;
}

.popup-tram-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.popup-tram-tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Poppins-Medium', system-ui, sans-serif;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: rgba(0, 127, 111, 0.1);
    color: #007F6F;
    border: 1px solid rgba(0, 127, 111, 0.2);
}

.popup-tram-tag.tag-municipi {
    background: rgba(255, 179, 0, 0.12);
    color: #996B00;
    border-color: rgba(255, 179, 0, 0.3);
}

.popup-tram-tag.tag-ferm {
    background: rgba(34, 34, 34, 0.06);
    color: #555;
    border-color: rgba(34, 34, 34, 0.12);
}

.popup-tram-info {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
}

.popup-tram-info span {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #222;
}

.popup-tram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 0 18px;
    height: 34px;
    border-radius: 50px;
    background: #007F6F;
    color: #fff;
    font-size: 13px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    text-decoration: none;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.popup-tram-btn:hover {
    background: #005E52;
}

/* Recompte de POIs al costat de cada categoria del filtre. */
.poi-count { color: #888; font-weight: 400; }

/* ---- Notificació "toast" del planificador (substitueix alert()) ---- */
.planner-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    z-index: 100001;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(92vw, 460px);
    padding: 12px 14px;
    background: #fff;
    border-left: 4px solid #007F6F;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    color: #222;
    font-size: 14px;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.planner-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.planner-toast--warn { border-left-color: #FFB300; }
.planner-toast-ico {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #007F6F;
    color: #fff;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 14px;
}
.planner-toast--warn .planner-toast-ico { background: #FFB300; color: #4a3600; }
.planner-toast-msg { flex: 1 1 auto; }
.planner-toast-close {
    flex: 0 0 auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #999;
    padding: 0 2px;
}
.planner-toast-close:hover { color: #333; }

/* En mòbil (≤767px) el toast s'eixampla gairebé a tota l'amplada. */
@media (max-width: 767px) {
    .planner-toast {
        max-width: none;
        width: calc(100vw - 24px);
    }
}

/* ---- Targeta d'INCIDÈNCIA dins el popup del tram (compacta) ---- */
.tram-popup-cards .tram-popup-avis {
    border-left: 4px solid #FF0000;
    background: rgba(255, 0, 0, 0.05);
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}
.tram-popup-avis-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.tram-popup-avis-ico {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    flex: 0 0 auto;
}
.tram-popup-avis-badge {
    display: inline-block;
    font-size: 10px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #fff;
    background: #FF0000;
    padding: 2px 7px;
    border-radius: 5px;
    line-height: 1.4;
}
.tram-popup-avis-title {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.3;
    color: #222;
    margin: 0 0 5px;
}
.tram-popup-avis-brief {
    font-size: 12px;
    line-height: 1.4;
    color: #666;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tram-popup-avis-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 14px;
    font-size: 12px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #fff !important;
    background: #007F6F;
    border-radius: 6px;
    text-decoration: none;
}
.tram-popup-avis-btn:hover { background: #005E52; }

.planner-confirm-popup {
    min-width: 220px;
}

.planner-confirm-popup strong {
    display: block;
    margin-bottom: 6px;
    color: #0f3b36;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
}

.planner-confirm-popup p {
    margin-bottom: 12px;
    color: #4f5f5a;
    font-size: 13px;
    line-height: 1.45;
}

.planner-confirm-actions {
    display: flex;
    gap: 8px;
}

.planner-confirm-actions button {
    flex: 1 1 auto;
    height: 38px;
    border-radius: 50px;
    border: 2px solid rgba(0, 127, 111, 0.25);
    background: #007F6F;
    color: #fff;
    font-size: 13px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 127, 111, 0.18);
}

.planner-confirm-actions button:hover {
    background: #005E52;
    border-color: rgba(0, 94, 82, 0.4);
    box-shadow: 0 6px 18px rgba(0, 127, 111, 0.28);
}

.planner-confirm-actions button.secondary {
    background: #fff;
    color: #0f3b36;
    border-color: rgba(0, 127, 111, 0.18);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.planner-confirm-actions button.secondary:hover {
    background: rgba(0, 127, 111, 0.06);
    border-color: rgba(0, 127, 111, 0.35);
    color: #007F6F;
}

/* ---- BASE LAYER STYLES (trams sobre el mapa) ---- */
/* Els trams base es fan més gruixuts i visibles */

/* ---- LOADING OVERLAY ---- */
.map-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-size: 16px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #007F6F;
    letter-spacing: 0.3px;
}

.map-loading-overlay.hidden {
    display: none;
}

/* ---- RIGHT SIDEBAR: Tram detail panel ---- */
.rightsidebar .right-content h3#tramTitle {
    font-size: 24px;
    line-height: 1.3;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #1A1A1A;
    margin-bottom: 10px;
}

.right-content h3 {
    color: #1A1A1A;
    font-size: 24px;
    line-height: 28px;
    font-family: 'Poppins-Semibold';
    margin-bottom: 30px;
}

.rightsidebar #tramSubtitle {
    font-family: 'Poppins-Regular', system-ui, sans-serif;
}

/* Clear selection button */
.btn-clear-selection {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid rgba(213, 68, 107, 0.35);
    border-radius: 50px;
    padding: 0 20px;
    height: 38px;
    font-size: 14px;
    font-family: 'Poppins-Medium', system-ui, sans-serif;
    color: #D5446B;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
    margin-bottom: 16px;
}

.btn-clear-selection:hover {
    background: #D5446B;
    color: #fff;
    border-color: #D5446B;
}

/* ---- ROUTE OPTIONS (tram click) ---- */
#routeOptionsContainer {
    font-family: 'Poppins-Regular', system-ui, sans-serif;
}

#routeOptionsContainer strong {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 16px;
    color: #1A1A1A;
}

.option-row {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

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

.option-row:hover {
    background: rgba(0, 127, 111, 0.03);
}

.swatch {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    margin-top: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.opt-label {
    font-size: 14px;
    line-height: 1.35;
    color: #222;
}

.opt-label label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    font-family: 'Poppins-Medium', system-ui, sans-serif;
}

.opt-label input[type="checkbox"] {
    accent-color: #007F6F;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
}

.opt-meta {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    font-family: 'Poppins-Regular', system-ui, sans-serif;
}

/* ---- TRAM DETAILS (key-value pairs) ---- */
#tramDetailsContainer {
    font-family: 'Poppins-Regular', system-ui, sans-serif;
}

#tramDetailsContainer strong {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 15px;
    color: #1A1A1A;
}

.tram-details {
    margin: 0;
}

.tram-details dt {
    font-size: 11px;
    color: #007F6F;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 14px;
}

.tram-details dt:first-child {
    margin-top: 8px;
}

.tram-details dd {
    margin: 3px 0 0 0;
    font-size: 14px;
    color: #333;
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    line-height: 1.4;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.tram-details dd pre {
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    font-size: 12px;
    background: #f8f8f8;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Tram stats */
.tram-stats {
    font-size: 14px;
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    padding: 10px 16px;
    background: rgba(0, 127, 111, 0.06);
    border-radius: 10px;
    margin-bottom: 14px;
    color: #333;
}

.tram-stats:empty {
    display: none;
}

.tram-stats strong {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #007F6F;
}

/* ---- BASE LAYER THUMBNAIL SWITCHER (on map) ---- */
.baselayer-switcher {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.baselayer-thumb {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.baselayer-thumb:hover {
    border-color: rgba(0, 127, 111, 0.4);
    box-shadow: 0 2px 10px rgba(0, 127, 111, 0.2);
    transform: scale(1.04);
}

.baselayer-thumb.active {
    border-color: #007F6F;
    box-shadow: 0 0 0 2px rgba(0, 127, 111, 0.25), 0 3px 12px rgba(0, 127, 111, 0.3);
}

.baselayer-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.baselayer-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    color: #fff;
    font-size: 9px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    text-align: center;
    padding: 10px 2px 3px;
    line-height: 1.2;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    pointer-events: none;
}

@media (max-width: 600px) {
    .baselayer-switcher {
        gap: 4px;
        padding: 3px;
    }
    .baselayer-thumb {
        width: 52px;
        height: 52px;
        border-radius: 8px;
        border-width: 2px;
    }
    .baselayer-label {
        font-size: 8px;
        padding: 8px 1px 2px;
    }
}

/* ---- PLANIFICADOR SIDEBAR OVERRIDES ---- */

/* Calculate route button */
.btn-calculate-route {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #007F6F;
    color: #fff;
    border: 3px solid rgba(0, 127, 111, 0.32);
    border-radius: 50px;
    padding: 0 20px;
    height: 53px;
    font-size: 16px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    letter-spacing: 0.27px;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-top: 16px;
}

.btn-calculate-route:hover {
    background: #005E52;
    border-color: rgba(0, 94, 82, 0.5);
}

/* Route result summary */
.route-result-summary {
    background: rgba(0, 127, 111, 0.06);
    border-radius: 16px;
    padding: 20px 22px;
    margin: 16px 0;
    border: 1px solid rgba(0, 127, 111, 0.12);
}

.route-result-summary h4 {
    font-size: 16px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #007F6F;
    margin-bottom: 6px;
}

.route-result-subtitle {
    font-size: 12px;
    line-height: 1.5;
    color: #51615d;
    margin-bottom: 12px;
}

.route-result-summary .stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 127, 111, 0.08);
    position: relative;
}

/* ---- DIFFICULTY INFO TOOLTIP ---- */
.difficulty-info-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.difficulty-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 14px;
    color: #007F6F;
    cursor: help;
    vertical-align: middle;
    border-radius: 50%;
    transition: color 0.2s ease;
}

.difficulty-info-icon:hover,
.difficulty-info-icon:focus {
    color: #005E52;
}

.difficulty-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid rgba(0, 127, 111, 0.2);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgba(0, 44, 24, 0.18);
    font-size: 12px;
    line-height: 1.55;
    color: #333;
    font-family: 'Poppins-Regular', system-ui, sans-serif;
}

.difficulty-tooltip strong {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #0f3b36;
}

.difficulty-tooltip em {
    color: #007F6F;
}

.difficulty-tooltip p {
    margin: 6px 0;
}

.difficulty-tooltip ul {
    margin: 4px 0 8px 18px;
    padding: 0;
}

.difficulty-tooltip ul li {
    margin-bottom: 3px;
    list-style: disc;
}

.stat-row:has(.difficulty-info-icon:hover) .difficulty-tooltip,
.stat-row:has(.difficulty-info-icon:focus) .difficulty-tooltip,
.difficulty-tooltip:hover {
    display: block;
}

.route-result-summary .stat-row:last-child {
    border-bottom: none;
}

.route-result-summary .stat-label {
    color: #555;
    flex-shrink: 0;
    white-space: nowrap;
    margin-right: 8px;
}

.route-result-summary .stat-row span:last-child {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #1A1A1A;
    text-align: right;
}

/* ---- STAGE TABS ---- */
.stage-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0 12px 0;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.stage-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    background: #e0e0e0;
    color: #555;
    font-size: 13px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.stage-tab.active {
    background: #FFB300;
    color: #1A1A1A;
}

.stage-tab .stage-tab-label {
    pointer-events: none;
}

.stage-tab .stage-date-input {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: transparent;
    font-size: 0;
    position: relative;
}

.stage-tab .stage-date-input::-webkit-calendar-picker-indicator {
    width: 22px;
    height: 22px;
    cursor: pointer;
    opacity: 0.6;
}

.stage-tab.active .stage-date-input::-webkit-calendar-picker-indicator {
    opacity: 0.9;
}

.stage-tab .stage-date-display {
    font-size: 11px;
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    color: #666;
    display: block;
    margin-top: -2px;
}

.stage-tab.active .stage-date-display {
    color: #333;
}

.stage-tab .stage-tab-remove {
    display: none;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    margin-left: 2px;
}

.stage-tab:hover .stage-tab-remove,
.stage-tab.active .stage-tab-remove {
    display: inline-block;
}

.stage-tab .stage-tab-remove:hover {
    color: #c62828;
}

.stage-tab-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px dashed #ccc;
    background: transparent;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s;
}

.stage-tab-add:hover {
    border-color: #007F6F;
    color: #007F6F;
}

/* ---- STAGE PANELS ---- */
.stage-panel {
    display: none;
}

.stage-panel.active {
    display: block;
}

.stage-panel .stage-origin-locked {
    font-size: 12px;
    color: #888;
    padding: 4px 0 2px 0;
    font-style: italic;
}

/* ---- STAGE RESULTS (per-stage summary after calculation) ---- */
.stage-result-tabs {
    display: flex;
    gap: 4px;
    padding: 0 0 8px 0;
    flex-wrap: wrap;
}

.stage-result-tab {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 15px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    cursor: pointer;
    background: #e8e8e8;
    color: #555;
    border: none;
}

.stage-result-tab.active {
    background: #FFB300;
    color: #1A1A1A;
}

.stage-result-tab.tab-total {
    background: #007F6F;
    color: #fff;
}

.stage-result-tab.tab-total.active {
    background: #005a4f;
}

/* ---- AUTOCOMPLETE ---- */
.punt-search-div .search-box input[type="text"] {
    padding-right: 20px;
	letter-spacing: 0;
	font-size: 14px;
}

.plan-input-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(213, 68, 107, 0.25);
    background: #fff;
    color: #D5446B;
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(213, 68, 107, 0.1);
    transition: all 0.25s ease;
    z-index: 6;
    opacity: 0;
}

.plan-input-clear.visible {
    display: inline-flex;
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.plan-input-clear:hover {
    background: #D5446B;
    color: #fff;
    border-color: #D5446B;
    box-shadow: 0 4px 12px rgba(213, 68, 107, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.plan-input-clear:active {
    transform: translateY(-50%) scale(0.95);
}

.punt-search-div .search-box .autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #FFB300;
    border-top: none;
    border-radius: 0 0 16px 16px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.punt-search-div .search-box .autocomplete-list.active {
    display: block;
}

.punt-search-div .search-box .autocomplete-list li {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    color: #222;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

.punt-search-div .search-box .autocomplete-list li:last-child {
    border-bottom: none;
}

.punt-search-div .search-box .autocomplete-list li:hover,
.punt-search-div .search-box .autocomplete-list li.is-active,
.punt-search-div .search-box .autocomplete-list li[aria-selected="true"] {
    background: rgba(0, 127, 111, 0.06);
    color: #007F6F;
}

/* ---- SEARCH DROPDOWN (header) ---- */
#dropdown .dropdown-item {
    padding: 10px 16px !important;
    font-family: 'Poppins-Regular', system-ui, sans-serif !important;
    font-size: 15px !important;
    color: #222 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

#dropdown .dropdown-item:hover {
    background: rgba(0, 127, 111, 0.06);
    color: #007F6F !important;
}

/* ---- LEGEND CONTROL ---- */
.legend-control {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    font-family: 'Poppins-Regular', system-ui, sans-serif;
}

.legend-toggle {
    padding: 8px 16px;
    font-size: 13px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #222;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s ease;
    user-select: none;
}

.legend-toggle:hover {
    background: rgba(0, 127, 111, 0.06);
    color: #007F6F;
}

.legend-panel {
    padding: 8px 16px 12px;
    border-top: 1px solid #eee;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 12px;
    color: #333;
}

.legend-line {
    display: inline-block;
    width: 24px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}


/* ---- ROUTE MARKERS ---- */
.route-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins-Bold', system-ui, sans-serif;
    font-size: 13px;
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
}

.route-marker-start {
    background: #007F6F;
}

.route-marker-end {
    background: #D5446B;
}

.profile-elev-tooltip {
    background: rgba(26, 26, 26, 0.88) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    font-size: 12px !important;
    font-family: 'Poppins-Semibold', system-ui, sans-serif !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    white-space: nowrap;
}

.profile-elev-tooltip::before {
    border-top-color: rgba(26, 26, 26, 0.88) !important;
}

.route-marker-wp {
    background: #FFB300;
    color: #222;
    font-size: 12px;
}

/* Tourdera (GeneratePress): el line-height global del tema desplaçava la lletra
   A/B/intermedi fora del cercle. Forcem el centrat de forma robusta. */
.route-marker {
    line-height: 1 !important;
    padding: 0 !important;
    box-sizing: border-box;
    text-align: center;
}
.route-marker span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

/* ---- INVERT ROUTE BUTTON ---- */
.btn-invert-route {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid rgba(0, 127, 111, 0.25);
    border-radius: 50px;
    padding: 0 20px;
    height: 36px;
    font-size: 13px;
    font-family: 'Poppins-Medium', system-ui, sans-serif;
    color: #007F6F;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-invert-route:hover {
    background: #007F6F;
    color: #fff;
    border-color: #007F6F;
}

.btn-invert-route img {
    filter: none;
    transition: filter 0.3s ease;
}

.btn-invert-route:hover img {
    filter: brightness(0) invert(1);
}

/* ---- ELEVATION PROFILE ---- */
.elevation-profile-placeholder {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 127, 111, 0.1);
}

.elevation-label {
    font-size: 13px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #007F6F;
    margin-bottom: 6px;
}

#elevationCanvas {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    cursor: crosshair;
    border: 1px solid rgba(0, 127, 111, 0.1);
}

.elevation-note {
    font-size: 11px;
    color: #999;
    font-style: italic;
    margin-top: 4px;
}

/* ---- WEATHER PLACEHOLDER ---- */
.weather-placeholder {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 179, 0, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(255, 179, 0, 0.15);
}

.weather-label {
    font-size: 13px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #996B00;
    margin-bottom: 4px;
}

.weather-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* ---- ROUTE PREVIEW MODAL ---- */
.route-preview-modal {
    align-items: flex-start;
    padding: 32px 18px;
    overflow-y: auto;
    background: rgba(17, 34, 31, 0.72);
}

.route-preview-box {
    width: min(1120px, 100%);
    max-width: 1120px;
    margin: 0 auto;
    border-radius: 26px;
}

.route-preview-in {
    padding: 34px;
    background: linear-gradient(180deg, #f9fcfb 0%, #ffffff 100%);
    border-radius: 26px;
}

.route-preview-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-right: 34px;
}

.route-preview-kicker {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8c9c98;
    margin-bottom: 8px;
}

.route-preview-header h2 {
    font-size: 28px;
    line-height: 1.2;
    color: #0f3b36;
    margin-bottom: 8px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
}

.route-preview-header p {
    color: #556560;
    font-size: 14px;
    line-height: 1.6;
}

.route-preview-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.route-preview-btn-secondary,
.route-preview-btn-primary {
    margin-top: 0;
    min-width: 150px;
    height: 46px;
    padding: 0 18px;
}

.route-preview-btn-secondary {
    background: #fff;
    color: #0f3b36;
    border-color: rgba(0, 127, 111, 0.18);
}

.route-preview-btn-primary {
    box-shadow: 0 12px 26px rgba(0, 127, 111, 0.16);
}

.route-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.route-preview-card {
    background: #fff;
    border: 1px solid rgba(0, 127, 111, 0.1);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(8, 39, 35, 0.06);
}

.route-preview-card h3 {
    font-size: 16px;
    color: #0f3b36;
    margin-bottom: 14px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
}

.route-preview-card-wide {
    grid-column: 1 / -1;
}

.route-preview-map {
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, #f3f8f5 0%, #eef5f2 100%);
    border: 1px solid rgba(0, 127, 111, 0.1);
    min-height: 320px;
}

.route-preview-map > svg {
    display: block;
    width: 100%;
    height: auto;
}

#previewElevationCanvas {
    width: 100%;
    height: 220px;
    border-radius: 14px;
    border: 1px solid rgba(0, 127, 111, 0.12);
    background: #f9fcfb;
    display: block;
}

.route-preview-note {
    margin-top: 10px;
    font-size: 12px;
    color: #60706b;
}

.route-preview-technical {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.route-preview-stat {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0, 127, 111, 0.05);
    border: 1px solid rgba(0, 127, 111, 0.08);
}

.route-preview-stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6d7a77;
    margin-bottom: 4px;
}

.route-preview-stat-value {
    display: block;
    color: #11221f;
    font-size: 14px;
    line-height: 1.45;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
}

.route-preview-empty-state,
.route-preview-weather-empty {
    min-height: 108px;
    display: flex;
    align-items: center;
    justify-content: left;
    text-align: center;
    padding: 20px;
    border-radius: 14px;
    background: #f7faf9;
    color: #6d7a77;
    border: 1px dashed rgba(0, 127, 111, 0.18);
    line-height: 1.6;
}

.route-preview-weather-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.route-preview-weather-card {
    flex: 1 1 120px;
    min-width: 120px;
    border-radius: 14px;
    padding: 12px 10px;
    background: #f7faf9;
    border: 1px solid rgba(0, 127, 111, 0.08);
    text-align: center;
}

.route-preview-weather-day {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #0f3b36;
    margin-bottom: 2px;
}

.route-preview-weather-date {
    color: #7a8683;
    font-size: 11px;
    margin-bottom: 8px;
}

.route-preview-weather-temp {
    font-size: 13px;
    color: #11221f;
    margin-bottom: 4px;
}

.route-preview-weather-meta {
    font-size: 11px;
    color: #60706b;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .route-preview-in {
        padding: 24px 18px;
    }

    .route-preview-header {
        flex-direction: column;
        padding-right: 18px;
    }

    .route-preview-actions {
        width: 100%;
        justify-content: stretch;
    }

    .route-preview-btn-secondary,
    .route-preview-btn-primary {
        flex: 1 1 180px;
    }

    .route-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- ACCESSIBILITY ---- */
*:focus-visible {
    outline: 3px solid #FFB300;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    background: #007F6F;
    color: #fff;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    z-index: 99999;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

.custom-modal-overlay {
    top: 70px;
}

.punt-search-lst ul {
    padding-right: 0;
}

.intermedi-box {
    display: flex;
}

.rightsidebar {
    width: 500px;
}

/* ---- FOOTER: allow map drag through empty areas ---- */
footer {
    pointer-events: none;
}

footer .filter-btm-div,
footer .filter-btn,
footer .filter-select-div {
    pointer-events: auto;
}

.plan-downbtn-div {
    padding: 25px 15px 35px;
}

.plan-downbtn-div ul li a {
    width: 135px;
}

span.difficulty-info-icon {
    border: 1px solid #1A1A1A;
    cursor: pointer;
}

span.difficulty-info-icon:hover {
    color: #fff!important;
    background: #1a1a1a;
}

.exp-main .exp-txt h3 span {
    height: auto;
	font-size: 13px;
}


/* =============================================
   PLANIFICADOR WP ADDITIONS
   Estils addicionals per la integracio WordPress:
   patrimoni, avisos, i links a fitxes WP.

   IMPORTANT: Afegir aquest contingut al FINAL
   de planificador-override.css
   ============================================= */

/* ---- MAP HEIGHT FALLBACK (WordPress) ---- */
.mapa-sec {
    position: relative;
    min-height: calc(100vh - 80px);
    height: calc(100vh - 80px);
}

#map {
    height: 100%;
    width: 100%;
}

/* ---- TRAM POPUP WITH RUTA CARDS ---- */
.tram-rutes-popup .leaflet-popup-content {
    padding: 0 !important;
    min-width: 260px;
    max-width: 320px;
}

.tram-popup-cards {
    max-height: 400px;
    overflow-y: auto;
}

.tram-popup-cards .exp-main {
    border-bottom: 1px solid #eee;
}

.tram-popup-cards .exp-main:last-child {
    border-bottom: none;
}

/* ---- TRAM POPUP RUTA ITEMS (anada/tornada grouped) ---- */
.tram-popup-ruta-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tram-popup-ruta-item:last-child {
    border-bottom: none;
}

.tram-popup-ruta-item h2 {
    font-size: 14px !important;
    margin-bottom: 6px !important;
}

.tram-popup-ruta-item .veure-ext-link {
    font-size: 12px !important;
    height: 28px !important;
    padding: 0 14px !important;
}

/* ---- EXP-MAIN CARD (popups & sidebar) ---- */
.exp-main {
    overflow: hidden;
}

.exp-img {
    width: 100%;
    overflow: hidden;
}

.exp-img img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.exp-txt {
    padding: 12px 14px;
}

.exp-txt h2 {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.3;
    color: #1A1A1A;
    margin-bottom: 4px;
}

.exp-txt h3 {
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
    font-weight: normal;
}

.exp-txt h3 span {
    color: #007F6F;
}

.exp-txt .veure-ext-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    height: 34px;
    border-radius: 50px;
    background: #007F6F;
    color: #fff !important;
    font-size: 13px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    text-decoration: none;
    transition: background 0.3s ease;
    width: 100%;
}

.exp-txt .veure-ext-link:hover {
    background: #005E52;
}

/* Popup-specific: remove default padding since card handles it */
.leaflet-popup-content:has(.exp-main) {
    padding: 0 !important;
    min-width: 240px;
}

/* ---- Descripció WYSIWYG del POI al popup (retallada amb el·lipsi) ---- */
.exp-txt .poi-desc {
    font-size: 12px;
    line-height: 1.45;
    color: #555;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 10;   /* màxim 10 línies, després el·lipsi */
    line-clamp: 10;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Reserva d'alçada per si el navegador no aplica el clamp a fills de bloc. */
    max-height: calc(1.45em * 10);
}
/* Contingut del WYSIWYG: els <p> es mantenen com a blocs, però normalitzem
   marges i mides perquè encaixin dins la targeta i el clamp funcioni bé. */
.exp-txt .poi-desc > *:first-child { margin-top: 0; }
.exp-txt .poi-desc > *:last-child { margin-bottom: 0; }
.exp-txt .poi-desc p {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.45;
    color: #555;
    font-family: 'Poppins-Regular', system-ui, sans-serif;
}
.exp-txt .poi-desc strong,
.exp-txt .poi-desc b {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: inherit; /* anul·la el .leaflet-popup-content strong { font-size:16px } */
}
.exp-txt .poi-desc a { color: #007F6F; text-decoration: underline; }
.exp-txt .poi-desc ul,
.exp-txt .poi-desc ol { margin: 0 0 6px; padding-left: 18px; }
.exp-txt .poi-desc h1,
.exp-txt .poi-desc h2,
.exp-txt .poi-desc h3,
.exp-txt .poi-desc h4 { font-size: 13px; line-height: 1.3; margin: 0 0 4px; }
.exp-txt .poi-desc img { display: none; } /* sense imatges dins la descripció */

/* ---- Responsive de la card del popup (mòbil) ---- */
@media (max-width: 767px) {
    .leaflet-popup-content { min-width: 200px !important; }
    .leaflet-popup-content:has(.exp-main) { min-width: 210px; }
    .exp-img img { height: 110px; }
    .exp-txt { padding: 10px 12px; }
    .exp-txt .poi-desc { -webkit-line-clamp: 6; line-clamp: 6; max-height: calc(1.45em * 6); } /* menys línies en pantalla petita */
}

/* ---- PATRIMONI MARKERS ---- */
.patrimoni-marker {
    background: transparent !important;
    border: none !important;
}

.patrimoni-marker svg {
    filter: drop-shadow(0 2px 4px rgba(0, 127, 111, 0.3));
}

/* ---- AVIS (ALERT) MARKERS ---- */
.avis-marker {
    background: transparent !important;
    border: none !important;
}

.avis-marker svg {
    filter: drop-shadow(0 2px 6px rgba(198, 40, 40, 0.35));
    animation: avis-pulse 2s ease-in-out infinite;
}

@keyframes avis-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ---- RUTA CARD IN TRAM DETAILS (.exp-main) ---- */
#tramWpLink:empty {
    display: none;
}

/* ---- SIDEBAR RUTA DETAILS ---- */
.rightsidebar .tag-lst a {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Poppins-Medium', system-ui, sans-serif;
    background: rgba(0, 127, 111, 0.08);
    color: #007F6F;
    border: 1px solid rgba(0, 127, 111, 0.15);
    text-decoration: none;
}

.rightsidebar .tag-lst a.active {
    background: #007F6F;
    color: #fff;
}

.rightsidebar .area-details h4 {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
}

.rightsidebar .fitxa-btn:hover {
    background: #005E52 !important;
}

#tramWpLink {
    margin-top: 14px;
    border-top: 1px solid #eee;
    padding-top: 14px;
}

#tramWpLink .exp-main {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 127, 111, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

#tramWpLink .exp-img {
    width: 100%;
    overflow: hidden;
}

#tramWpLink .exp-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

#tramWpLink .exp-txt {
    padding: 14px 16px;
}

#tramWpLink .exp-txt h2 {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.3;
    color: #1A1A1A;
    margin-bottom: 4px;
}

#tramWpLink .exp-txt h3 {
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

#tramWpLink .exp-txt h3 span {
    color: #007F6F;
}

#tramWpLink .veure-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    height: 34px;
    border-radius: 50px;
    background: #007F6F;
    color: #fff;
    font-size: 13px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    text-decoration: none;
    transition: background 0.3s ease;
    width: 100%;
}

#tramWpLink .veure-link:hover {
    background: #005E52;
    color: #fff;
}

.logo img {
    max-width: 200px;
}

a.filter-btn {
    width: 320px;
}

a.alert-btn {
    width: 175px;
}

.leaflet-control-attribution.leaflet-control svg {
    display: none!important;
}

/* =============================================
   AVIS / INCIDENCIA: popup, llista i panell lateral
   ============================================= */

/* "Veure més" dins del popup d'incidència sobre el mapa */
.popup-tram .avis-veure-mes {
    margin-top: 10px;
	color: #fff;
}

/* "Veure més" dins de cada item del llistat d'incidències (.alert-list) */
.alert-list .alert-veure-mes {
    display: inline-block;
    margin-top: 6px;
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 12px;
    line-height: 1;
    color: #007F6F;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}

.alert-list .alert-veure-mes:hover {
    color: #005E52;
}

/* Panell lateral .rightsidebar quan mostra una incidència */
.rightsidebar .right-content.avis-detail {
    padding: 28px 32px 40px;
}

.rightsidebar .right-content.avis-detail h3 {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    font-size: 26px;
    line-height: 1.25;
    color: #1A1A1A;
    margin: 0 0 14px;
}

.rightsidebar .right-content.avis-detail .alert-tipologia {
    margin-left: 0;
    margin-bottom: 18px;
    padding: 4px 12px;
    font-size: 12px;
}

.rightsidebar .right-content.avis-detail .avis-detail-body {
    font-family: 'Poppins-Regular', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: #333;
}

.rightsidebar .right-content.avis-detail .avis-detail-body p {
    margin: 0 0 14px;
}

.rightsidebar .right-content.avis-detail .avis-detail-body p:last-child {
    margin-bottom: 0;
}

.rightsidebar .right-content.avis-detail .avis-detail-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 18px 0;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.rightsidebar .right-content.avis-detail .avis-detail-body a {
    color: #007F6F;
    text-decoration: underline;
}

.rightsidebar .right-content.avis-detail .avis-detail-body a:hover {
    color: #005E52;
}

.rightsidebar .right-content.avis-detail .avis-detail-body :is(h2, h3, h4) {
    font-family: 'Poppins-Semibold', system-ui, sans-serif;
    color: #1A1A1A;
    margin: 22px 0 10px;
    line-height: 1.3;
}

.rightsidebar .right-content.avis-detail .avis-detail-body h2 { font-size: 20px; }
.rightsidebar .right-content.avis-detail .avis-detail-body h3 { font-size: 18px; }
.rightsidebar .right-content.avis-detail .avis-detail-body h4 { font-size: 16px; }

.rightsidebar .right-content.avis-detail .avis-detail-body ul,
.rightsidebar .right-content.avis-detail .avis-detail-body ol {
    margin: 0 0 14px 22px;
    padding: 0;
}

.rightsidebar .right-content.avis-detail .avis-detail-body li {
    margin-bottom: 6px;
}

.exp-main .exp-txt h2 {
    font-size: 22px;
    line-height: 26px;
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .rightsidebar .right-content.avis-detail {
        padding: 22px 22px 32px;
    }

    .rightsidebar .right-content.avis-detail h3 {
        font-size: 23px;
    }
}

@media screen and (max-width: 767px) {
	.plan-downbtn-div ul li a {
		width: 110px;
	}
	
    .rightsidebar .right-content.avis-detail {
        padding: 20px 18px 32px;
    }

    .rightsidebar .right-content.avis-detail h3 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .rightsidebar .right-content.avis-detail .avis-detail-body {
        font-size: 14px;
        line-height: 1.55;
    }

    .rightsidebar .right-content.avis-detail .avis-detail-body img {
        margin: 14px 0;
        border-radius: 8px;
    }

    .rightsidebar .right-content.avis-detail .avis-detail-body h2 { font-size: 18px; }
    .rightsidebar .right-content.avis-detail .avis-detail-body h3 { font-size: 16px; }
    .rightsidebar .right-content.avis-detail .avis-detail-body h4 { font-size: 15px; }
}

a.planifica-btn {
    column-gap: 5px;
}

.rightsidebar .right-content.avis-detail .avis-detail-body figure {
    max-width: 100%;
}

footer .filter-select-div {
    width: 100%;
    border-bottom-left-radius: 0;
}