:root{
    --bs-dark-rgb: 3, 87, 143;
    --bs-primary-rgb: 128, 187, 60;
    --bs-secondary-rgb: 241, 126, 106;
}
.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: rgb(241, 126, 106);
    --bs-btn-border-color: rgb(241, 126, 106);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #c04535;
    --bs-btn-hover-border-color: #c04535;
    --bs-btn-focus-shadow-rgb: 66, 70, 73;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #c04535;
    --bs-btn-active-border-color: #c04535;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: rgb(241, 126, 106);
    --bs-btn-disabled-border-color: #c04535;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: rgb(128, 187, 60);
    --bs-btn-border-color: rgb(128, 187, 60);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #7fd70b;
    --bs-btn-hover-border-color: #7fd70b;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #7fd70b;
    --bs-btn-active-border-color: #7fd70b;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: rgb(1128, 187, 60);
    --bs-btn-disabled-border-color: rgb(128, 187, 60);
}
.btn-dark {
    --bs-btn-color: #fff;
    --bs-btn-bg: rgb(55, 102, 17);
    --bs-btn-border-color: #376611;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #424649;
    --bs-btn-hover-border-color: #373b3e;
    --bs-btn-focus-shadow-rgb: 66, 70, 73;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4d5154;
    --bs-btn-active-border-color: #373b3e;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #376611;
    --bs-btn-disabled-border-color: rgb(54, 100, 17);
}
body {
    background-color: #ffffff8c;
}
a {font-style: normal;color: rgb(77, 77, 77);text-decoration: none;}
a:hover{color: black;}
.navbar {
    position: absolute !important;
    top: 0px;
    width: 100%;
    transition: all 0.3s ease;
    z-index: 1030;
    background-color: rgba(var(--bs-primary-rgb), 1) !important;
    color: white !important;
}

.navbar.navbar-scrolled {
    position: fixed !important;
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: rgba(var(--bs-primary-rgb), 1) !important;
}
.navbar-brand span {
    font-size: 1.5rem;

}
.navbar-brand span.text-secondary {
    color: rgba(var(--bs-secondary-rgb), 1) !important;
}
.navbar-brand span.text-primary {
    color: rgba(var(--bs-primary-rgb), 1) !important;
}
.border-white {
    text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff,
    1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
}
body.navbar-fixed {
    padding-top: 4rem;
}

.card a {
    text-decoration: none !important;
    color: darkslategrey;
}

.card a:hover {
    text-decoration: none !important;
    color: rgb(138, 155, 155) !important;
}

.banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.carouselExampleControls {
    height: 300px;
}

.carousel-item {
    top: 10px;
    height: auto;
    min-height: 400px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 2rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fix specifico per il carousel del banner - sovrascrive gli stili generali */
#carouselExampleControls {
    position: relative;
    overflow: hidden;
}

#carouselExampleControls .carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Esclude il carousel del banner dalle regole generali e imposta stili specifici */
#carouselExampleControls .carousel-item {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 400px !important;
    min-height: 400px !important;
    margin-bottom: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    /* Rimuove display: flex del CSS generale che interferisce */
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    position: relative;
    /* Bootstrap 5 carousel gestisce le transizioni con transform */
    transition: transform 0.6s ease-in-out;
    /* Bootstrap usa float per posizionare gli elementi */
    float: left;
    margin-right: -100%;
    opacity: 0;
}

#carouselExampleControls .carousel-item.active {
    margin-right: 0;
    opacity: 1;
}

#carouselExampleControls .carousel-item.carousel-item-next,
#carouselExampleControls .carousel-item.carousel-item-prev {
    opacity: 1;
}

#carouselExampleControls .carousel-item img {
    display: block;
    width: 100%;
    height: 400px;
    opacity: 0;
    pointer-events: none;
    object-fit: cover;
    position: static !important;
    min-width: auto !important;
}

.navbar-dark,
.navbar {
    height: 4rem;
}

.jumbotron {
    height: 20rem;
    margin-bottom: 2rem;
    background-color: transparent;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    display: flex;
    align-items: center;
}

.immaginiList {
    display: contents;
}

.galleria {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    align-items: start;
}

.mappa {
    margin-top: 10px;
}

.parco-testo {
    line-height: 1.8;
    font-size: 1.1rem;
}

.parco-testo p {
    margin-bottom: 1rem;
}

.parco-testo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.carousel-item>img {
    height: 100vh;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

#modalImages .modal-dialog {
    max-width: 100%;
    margin: 0;
    height: 100vh;
}

#modalImages .modal-content {
    height: 100vh;
    border: none;
    border-radius: 0;
}

#modalImages .modal-body {
    top: 3.5rem;
    height: 90vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalImages .carousel {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

#modalImages .carousel-inner {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

#modalImages .carousel-item {
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    float: left !important;
    margin-right: -100% !important;
    transition: transform 0.6s ease-in-out !important;
}

#modalImages .carousel-item.active {
    margin-right: 0 !important;
}

#modalImages .carousel-item img {
    max-width: 100%;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 1 !important;
}

a.navbar-brand {
    color: white !important;
}

.imageList {
    width: 100%;
    max-width: 250px;
    height: 200px;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    display: block;
    border: 2px solid #ddd;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.imageList:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    position: relative;
}

/* Responsive per immagini */
@media (max-width: 768px) {
    .galleria {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .imageList {
        max-width: 100%;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .galleria {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    
    .imageList {
        max-width: 100%;
        height: 150px;
    }
}

/* Cookie Banner Styles */

#cookie-banner.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: rgba(33, 37, 41, 0.98);
    color: white;
    padding: 20px;
    z-index: 1050;
    border: 2px solid #28a745;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: none;
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#cookie-banner.cookie-banner p {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 0;
}

#cookie-banner.cookie-banner .cookie-link {
    color: #28a745 !important;
    text-decoration: underline !important;
}

#cookie-banner.cookie-banner .cookie-link:hover {
    color: #20c997 !important;
}

#cookie-banner.cookie-banner .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* Padding aggiuntivo al footer quando il cookie banner è visibile */
body.has-cookie-banner {
    padding-bottom: 150px;
}

[data-tooltip]:hover::after {
    display: block;
    position: absolute;
    content: attr(data-tooltip);
    border: 1px solid black;
    background: #eee;
    padding: .25em;
}

.rating .star  {
    cursor: pointer;
    color: #f17f6a;
    font-size: 1.5rem;
    margin-left: 2px;
    font-size: 1.5rem;
}

.rating-disabled .star {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.ratingParco .star {
     color: rgb(241, 126, 106);
    font-size: 1.5rem;
    margin-left: 2px;
    font-size: 1.5rem;
}

.navbar-brand {
    padding-left: 1rem;
}

.nav-link {
    padding-left: 1rem;
    color: white !important;
}

.navbar-collapse {
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
    z-index: 100
}

.navbar-search {
    min-width: 300px;
}



@media (max-width: 768px) {
    .navbar-search {
        min-width: 200px;
        margin-top: 10px;
    }
    
    .navbar-search .form-control {
        font-size: 14px;
    }
    
    .navbar-search .btn {
        font-size: 14px;
        padding: 6px 12px;
    }
}

.carousel {
    z-index: 10
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #cookie-banner.cookie-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 15px;
    }

    #cookie-banner.cookie-banner .col-md-4 {
        text-align: center !important;
        margin-top: 10px;
    }

    #cookie-banner.cookie-banner .btn {
        margin: 2px;
        font-size: 11px;
        padding: 5px 10px;
    }

    body.has-cookie-banner {
        padding-bottom: 200px;
    }

    .parcoImgList {
        width: 100px;
        height: 100px;
    }

    .horizontal-scroll-mobile {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .horizontal-scroll-mobile::-webkit-scrollbar {
        height: 6px;
    }
    
    .horizontal-scroll-mobile::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .horizontal-scroll-mobile::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 3px;
    }
    
    /* Per i 4 blocchi "Cosa vuoi fare oggi?" */
    .horizontal-scroll-mobile > [class*="col-"]:not(.col-12) {
        flex: 0 0 auto;
        min-width: 45%;
        max-width: 45%;
    }
    
    /* Per la sezione "I parchi più belli" - i parchi sono col-12 col-md-6 */
    .horizontal-scroll-mobile > [class*="col-12"] {
        flex: 0 0 auto;
        min-width: 85%;
        max-width: 85%;
    }
    
    .horizontal-scroll-mobile > [class*="col-12"] > .row {
        margin: 0;
    }
}

/* Stile per card parco Plus */
.card.parco-plus {
    box-shadow: 0 0 0 3px rgba(64, 138, 15, 0.3), 0 4px 20px rgba(64, 138, 15, 0.5) !important;
    border: 2px solid rgba(138, 235, 74, 0.6) !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card.parco-plus:hover {
    box-shadow: 0 0 0 3px rgba(64, 138, 15, 0.4), 0 6px 25px rgba(64, 138, 15, 0.7) !important;
    border-color: rgba(64, 138, 15, 0.8) !important;
}

.badge-plus {
    background-color: #50b0e7 !important;
    background: #50b0e7 !important;
    color: #ffffff !important;
    font-weight: bold !important;
    padding: 0.4em 0.7em !important;
    font-size: 0.875rem !important;
    margin-left: 5px !important;
    border: none !important;
    display: inline-block !important;
}

/* Banner visitatori */
.visitors-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background-color: rgba(var(--bs-secondary-rgb), 1);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999 !important;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
    animation: slideInRight 0.5s ease-out;
    max-width: 250px;
    text-align: center;
    line-height: 1.4;
    transition: opacity 0.5s ease-out;
    opacity: 1;
}

.visitors-banner #visitors-count {
    font-weight: bold;
    font-size: 1.1rem;
    color: #f5c518 !important;
    display: inline-block;
    min-width: 20px;
}

.visitors-banner a {
    color: white !important;
    text-decoration: none !important;
    display: block;
    transition: opacity 0.3s ease;
}

.visitors-banner a:hover {
    color: #f5c518 !important;
    text-decoration: underline !important;
}

/* Pulsante chiusura banner */
.banner-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 8px;
    line-height: 1;
    transition: color 0.3s ease, transform 0.2s ease;
    z-index: 10;
}

.banner-close-btn:hover {
    color: #f5c518;
    transform: scale(1.2);
}

.banner-close-btn:focus {
    outline: 2px solid #f5c518;
    outline-offset: 2px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Banner più piccoli su smartphone - priorità alta */
.visitors-banner.smartphone-banner {
    right: 10px !important;
    bottom: 10px !important;
    max-width: 220px !important;
    padding: 12px 16px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
}

.visitors-banner.smartphone-banner #visitors-count {
    font-size: 1.1rem !important;
    color: #f5c518 !important;
    display: inline-block !important;
    min-width: 20px !important;
}

.visitors-banner.smartphone-banner .banner-close-btn {
    font-size: 1.2rem !important;
    top: 5px !important;
    right: 5px !important;
}

/* Responsive per banner visitatori (tablet e desktop) */
@media (max-width: 768px) {
    .visitors-banner:not(.smartphone-banner) {
        right: 10px;
        bottom: 10px;
        max-width: 200px;
        padding: 12px 15px;
        font-size: 0.8rem;
    }
    
    .visitors-banner:not(.smartphone-banner) #visitors-count {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .visitors-banner:not(.smartphone-banner) {
        right: 5px;
        bottom: 5px;
        max-width: 160px;
        padding: 10px 12px;
        font-size: 0.75rem;
    }
}