/* Mappa */
#map-container {
    width: 100%;
}

.divMap {
    cursor: pointer;
    padding: 10px;
    margin-bottom: 5px;
}

.maptooltip {
    width: 400px;
}

.maptooltip h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.maptooltip img {
    max-width: 150px;
}

.maptooltip p {
    margin-bottom: 40px;
}

.maptooltip .btn {
    float: none;
}

.maptooltip .btn-border {
    color: #57b6e6 !important;
}


/* ==========================================================
   Stili preesistenti della pagina
   ========================================================== */

a {
    cursor: pointer;
}

.form-control,
.checkbox input[type="checkbox"],
.input-group-addon:last-child {
    cursor: pointer;
}

.listahotel .ac-title {
    background: none;
    border: none;
    border-bottom: 3px solid #5ab4e6;
    color: #5ab4e6 !important;
}

.listahotel .ac-title span {
    font-size: 20px;
}

.list-hotels tbody tr td.intestazione {
    font-size: 16px !important;
}

img.tesserebwr {
    margin: -223px 0 15px 0;
    width: 80%;
    z-index: 1;
    position: relative;
}

#hpform .checkbox {
    margin: 6px 19px 3px;
}

#hpform label {
    font-size: 13px;
}


/* ==========================================================
   Explorer: filtro + mappa
   ========================================================== */

.cycle-explorer {
    margin: 25px 0 34px;
}

.cycle-explorer__layout {
    display: flex;
    gap: 24px;
    align-items: stretch;
}


/* ==========================================================
   Pannello filtro ciclovie
   ========================================================== */

.cycle-explorer__filters {
    width: 275px;
    flex: 0 0 275px;
    padding: 22px 18px;

    /* Leggero contrasto rispetto allo sfondo della pagina */
    background: #f7f9fb;

    /* Bordo più visibile ma discreto */
    border: 1px solid #ccd9e4;
    border-radius: 12px;

    box-shadow: 0 6px 20px rgba(0, 45, 90, .07);
}

.cycle-explorer__filters h4 {
    margin: 0 0 17px;
    color: #003b71;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
}

#hotel-filters.filter-bar {
    display: block;
    font-family: 'Noto Sans', Arial, sans-serif;
    font-size: 13px;
}


/* ==========================================================
   Bottoni filtro
   ========================================================== */

#hotel-filters .filter-link {
    --route-color: #003b71;

    display: flex;
    align-items: center;
    gap: 11px;

    width: 100%;
    min-height: 44px;

    margin: 0 0 8px;
    padding: 10px 12px;

    position: relative;

    color: #263d52 !important;
    background: #fff;

    border: 1px solid #d9e2ea;
    border-radius: 8px;

    text-decoration: none !important;
    font-weight: 600;
    line-height: 1.25;

    box-shadow: 0 2px 5px rgba(0, 45, 90, .03);

    transition:
        background .18s ease,
        border-color .18s ease,
        color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}


/* Evita separatori ereditati da eventuali CSS globali */
#hotel-filters .filter-link + .filter-link::before {
    display: none;
}


/* Pallino: stesso colore del percorso sulla mappa */
#hotel-filters .filter-link::before {
    content: '';
    display: block;

    width: 11px;
    height: 11px;
    flex: 0 0 11px;

    border-radius: 50%;
    background: var(--route-color);

    box-shadow:
        0 0 0 3px
        color-mix(in srgb, var(--route-color) 13%, transparent);
}

#hotel-filters .filter-link::after {
    display: none;
}


/* Colori delle ciclovie */
#hotel-filters .filter-link[data-region="all"] {
    --route-color: #003b71;
}

#hotel-filters .filter-link[data-region="sole"] {
    --route-color: #E0B900;
}

#hotel-filters .filter-link[data-region="po"] {
    --route-color: #1f4ed8;
}

#hotel-filters .filter-link[data-region="francigena"] {
    --route-color: #d96a00;
}

#hotel-filters .filter-link[data-region="dolomiti"] {
    --route-color: #1b8f3a;
}

#hotel-filters .filter-link[data-region="adriatica"] {
    --route-color: #9b2fae;
}

#hotel-filters .filter-link[data-region="appennini"] {
    --route-color: #1f4a4a;
}


/* Hover */
#hotel-filters .filter-link:hover {
    color: #16324f !important;
    background: #fff;
    border-color: #aebfcd;

    transform: translateX(2px);

    box-shadow: 0 3px 9px rgba(0, 45, 90, .08);
}


/* Ciclovia selezionata */
#hotel-filters .filter-link.active {
    color: var(--route-color) !important;

    background:
        color-mix(in srgb, var(--route-color) 8%, white);

    border-color:
        color-mix(in srgb, var(--route-color) 32%, white);

    box-shadow:
        inset 4px 0 0 var(--route-color),
        0 3px 9px rgba(0, 45, 90, .05);

    transform: translateX(2px);
}

#hotel-filters .filter-link.active::before {
    box-shadow:
        0 0 0 4px
        color-mix(in srgb, var(--route-color) 16%, transparent);
}


/* ==========================================================
   Contenitore mappa
   ========================================================== */

.cycle-explorer__map {
    flex: 1 1 auto;
    min-width: 0;
}

.cycle-explorer #map-container {
    height: 590px !important;
    margin: 0 !important;

    overflow: hidden;

    border: 1px solid #d8e1e8;
    border-radius: 12px;

    box-shadow: 0 7px 24px rgba(0, 45, 90, .10);
}


/* ==========================================================
   Bike Hotel CTA
   ========================================================== */

.bike-hotel-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    width: 100%;
    margin: 28px 0 32px;
    padding: 22px 30px;

    box-sizing: border-box;

    color: #fff;
    background: linear-gradient(115deg, #003b71 0%, #0068ad 100%);

    border-radius: 10px;
    text-align: left;
}

.bike-hotel-cta__text {
    flex: 1 1 auto;
    min-width: 0;
}

.bike-hotel-cta__text h3 {
    margin: 0 0 5px;
    padding: 0;

    color: #fff;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    text-align: left;
}

.bike-hotel-cta__text p {
    margin: 0;
    padding: 0;

    color: #fff;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}

.bike-hotel-cta .btn-bike {
    display: inline-block;
    flex: 0 0 auto;

    margin: 0;
    padding: 10px 19px;

    color: #003b71 !important;
    background: #fff;

    border-radius: 5px;

    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;

    transition:
        transform .18s ease,
        background .18s ease;
}

.bike-hotel-cta .btn-bike:hover,
.bike-hotel-cta .btn-bike:focus {
    color: #003b71 !important;
    background: #f2f6fa;
    text-decoration: none !important;
    transform: translateY(-1px);
}


/* ==========================================================
   Responsive già presente nella landing + redesign
   ========================================================== */

@media only screen and (max-width: 1107px) {

    .carousel-inner,
    .carousel-inner > .item {
        height: 500px;
    }

    .carousel-inner > .item > img {
        height: 500px;
        width: inherit;
        float: right;
    }
}


@media only screen and (max-width: 911px) {

    .carousel-inner,
    .carousel-inner > .item {
        height: 560px;
    }

    .carousel-inner > .item > img {
        height: 560px;
        width: inherit;
    }
}


@media (max-width: 991px) {

    .cycle-explorer__layout {
        display: block;
    }

    .cycle-explorer__filters {
        width: 100%;
        margin-bottom: 18px;
    }

    #hotel-filters.filter-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #hotel-filters .filter-link {
        width: auto;
        flex: 1 1 210px;
        margin: 0;
        border-color: #d9e2ea;
    }

    .cycle-explorer #map-container {
        height: 500px !important;
    }
}


@media only screen and (max-width: 767px) {

    /* Explorer più compatto su smartphone */
    .cycle-explorer {
        margin: 18px 0 26px;
    }

    .cycle-explorer__filters {
        width: 100%;
        padding: 16px 12px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .cycle-explorer__filters h4 {
        margin: 0 0 13px;
        font-size: 18px;
        line-height: 1.2;
    }

    /* Su mobile i percorsi diventano una griglia a due colonne */
    #hotel-filters.filter-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    #hotel-filters .filter-link {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        margin: 0;
        padding: 8px 9px;
        gap: 7px;
        font-size: 12px;
        line-height: 1.2;
        border-radius: 7px;
        transform: none !important;
    }

    #hotel-filters .filter-link:hover {
        transform: none !important;
    }

    #hotel-filters .filter-link::before {
        width: 8px;
        height: 8px;
        flex: 0 0 8px;
    }

    #hotel-filters .filter-link.active {
        transform: none !important;
        box-shadow:
            inset 3px 0 0 var(--route-color),
            0 2px 7px rgba(0, 45, 90, .05);
    }

    #hotel-filters .filter-link.active::before {
        box-shadow:
            0 0 0 3px
            color-mix(in srgb, var(--route-color) 16%, transparent);
    }

    /* La voce generale occupa tutta la prima riga */
    #hotel-filters .filter-link[data-region="all"] {
        grid-column: 1 / -1;
    }

    /* Mappa più proporzionata allo smartphone */
    .cycle-explorer #map-container {
        height: 430px !important;
        border-radius: 10px;
    }

    .carousel-caption {
        width: 100%;
        left: 0;
    }

    .carousel-caption h3 {
        font-size: 21px;
    }

    .carousel-inner,
    .carousel-inner > .item {
        height: 300px;
    }

    .carousel-inner > .item > img {
        height: 300px;
        width: inherit;
    }

    #hpform .checkbox,
    #hpform #popover-corpid {
        margin: 4px auto 4px 19px;
    }

    img.tesserebwr {
        margin: 0;
        width: 100%;
    }

    .list-hotels tbody tr td {
        padding: 10px 2px;
    }

    .list-hotels tbody tr td.intestazione {
        font-size: 11px !important;
    }

	.bike-hotel-cta {
		display: block;
		width: 100%;
		margin: 24px 0 28px;
		padding: 20px;
	}

	.bike-hotel-cta__text h3 {
		font-size: 19px;
	}

	.bike-hotel-cta__text p {
		font-size: 13px;
	}

	.bike-hotel-cta .btn-bike {
		margin-top: 16px;
		white-space: normal;
	}
}


@media only screen and (max-width: 375px) {

    #hotel-filters .filter-link {
        font-size: 11px;
        padding: 8px 7px;
        gap: 6px;
    }

    .cycle-explorer #map-container {
        height: 400px !important;
    }

    .carousel-caption {
        width: 100%;
        left: 0;
    }

    .carousel-caption h3 {
        font-size: 21px;
    }

    .carousel-inner,
    .carousel-inner > .item {
        height: 300px;
    }

    .carousel-inner > .item > img {
        height: 300px;
    }
}

/* =========================================================
   RIEPILOGO SELEZIONE CICLOVIA / COLLEGAMENTO ALLA TABELLA
   Versione leggera, senza box
   ========================================================= */

.cycle-selection-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin-top: 12px;
    padding: 10px 2px 13px;

    background: transparent;
    border: 0;
    border-bottom: 1px solid #d9e2ea;
    border-radius: 0;
    box-shadow: none;
}

.cycle-selection-summary__content {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

/* "Selezione" non serve più visivamente: manteniamo l'elemento
   nell'HTML ma lo nascondiamo. */
.cycle-selection-summary__label {
    display: none;
}

#selected-cycle-name {
    color: #003b71;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.cycle-selection-summary__count {
    color: #505863;
    font-size: 13px;
    line-height: 1.35;
}

.cycle-selection-summary__count::before {
    content: "\00B7";
    margin-right: 5px;
    color: #9aa9b3;
}

.cycle-selection-summary__button {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    flex: 0 0 auto;

    padding: 2px 0;

    background: transparent;
    border: 0;
    border-radius: 0;

    color: #003b71;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;

    cursor: pointer;
    box-shadow: none;
    transition: color .2s ease;
}

.cycle-selection-summary__button:hover,
.cycle-selection-summary__button:focus {
    background: transparent;
    border: 0;
    color: #0067a8;
    text-decoration: underline;
    outline-offset: 3px;
}

.cycle-selection-summary__button:hover {
    transform: none;
}

#hotel-list-section {
    scroll-margin-top: 20px;
}

#hotel-list-title {
    margin-top: 20px;
}

@media only screen and (max-width: 767px) {

    .cycle-selection-summary {
        display: block;
        margin-top: 10px;
        padding: 9px 1px 12px;
    }

    .cycle-selection-summary__content {
        display: block;
    }

    #selected-cycle-name {
        display: block;
        font-size: 14px;
    }

    .cycle-selection-summary__count {
        display: block;
        margin-top: 2px;
        font-size: 12px;
    }

    .cycle-selection-summary__count::before {
        display: none;
    }

    .cycle-selection-summary__button {
        margin-top: 7px;
        padding: 0;
        font-size: 12px;
    }

    #hotel-list-section {
        scroll-margin-top: 12px;
    }

    #hotel-list-title {
        margin-top: 12px;
    }
}
