/* Base styles */
html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* Contenitore principale */
.main {
    width: 100vw;
    position: relative;
    overflow: hidden;
}

#radius-filter {
display:none}

/* Map styles */
.mapboxgl-map {
    height: 100vh !important;
    width: 100vw !important;
    position: relative !important;
    font-family: "Twemoji Mozilla", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

.mapboxgl-control-container {
    display: none;
}

.mapboxgl-popup {
    max-width: 300px;
}

.mapboxgl-popup-content {
    text-align: center;
    font-family: 'Open Sans', sans-serif;
    padding: 15px;
}

body {
    font-family: Arial, sans-serif;
    background-size: cover;
    background-position: center;
    color: #333;
    margin: 0;
    padding: 0;
    display: contents;
    flex-direction: column;
    min-height: 70vh;
    overflow-x: hidden;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

select {
    color: #ffffff !important;
}


.details-section {
    padding: 20px;
    position: absolute;
    bottom: 118px;
    left: 26px;
    width: 100%;
    overflow-y: auto;
    z-index: 2;
    background: #00102a59;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding-bottom: 60px;
    text-shadow: 0 0 black;
    border: 1px solid #007bff;
    max-height: 60vh;
    height: 70vh;
    display: none; /* Nascondi di default */
    width: 30rem;
}

.details-section.active {
    display: block; /* Mostra quando è attivo */
}

.details-section.expanded {
    max-height: 60vh; /* Altezza massima quando espanso */
    height: 60vh; /* Altezza massima quando espanso */
}

.active-pin {
    border: solid 3px blue;
    border-radius: 5px;
    animation: blink 1s infinite;
    box-shadow: 0 0 10px rgba(13, 7, 209, 0.5);
    animation: pulse 1.5s infinite;
}

.flyer {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 15px;
    padding: 20px;
    width: 300px;
    text-align: center;
    position: relative;
}

.flyer img {
    max-width: 100px;
    margin-bottom: 15px;
}



.promotions {
    margin: 10px 0;
}

.promotion {
    margin: 5px 0;
    font-weight: bold;
}

.slogan {
    font-style: italic;
    margin: 10px 0;
}

.address {
    font-size: 0.9em;
    color: #555;
}

.qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
}

.qr-code img {
    width: 150px;
    height: 150px;
}

.qr-code .label {
    margin-top: 10px;
    font-weight: bold;
}

.swiper-pagination-bullet {
    background: #000;
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    background: #007bff;
    opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
    color: #007bff;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #007bff;
    color: #fff;
}

.swiper-pagination {
    position: relative;
    text-align: center;
    transition: .3s opacity;
    transform: translate3d(0, 0, 0);
    z-index: 10;
}

.swiper-button-next,
.swiper-button-prev {
    top: inherit;
    margin-top: -48px;
}

.collapsible-content {
    transition: max-height 2.3s ease-out;
}

.header-section {
    transition: background-color 0.5s;
}

.header-section:hover {
    background-color: #f8f9fa;
}



.filter-dropdown {
    width: 50px;
    padding: 8px;
    background-color: #122038;
    top: -2px;
    position: relative;
    border-radius: 10px;
    padding-bottom: 10px;
}

.filter-group {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(18, 32, 56, 0.95);
    padding: 10px;
    z-index: 1000;
}

.style-btn {
    background-color: #0a1a2b;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin: 0 5px;
    transition: background-color 0.3s ease;
}

.style-btn:hover {
    background-color: #1a2a3b;
}

.details-navigation {
    display: content;
    margin-top: 10px;
}

.details-navigation button:hover {
    background-color: #0a1a2b;
}

/* Navigation buttons */
.btg {
    background-color: #122038;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 998;
}

/* Navigation buttons */
.navigation-buttons {
    position: relative;
    right: 0px;
    bottom: 0;
    z-index: 1001;
    float: right;
}

#next-pin {
    background-color: #122038;
    color: #ffffff;
    width: 35px;
    padding: 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 105;
    right: 5px;
    position: relative;
}

#prev-pin {
    background-color: #122038;
    color: #ffffff;
    padding: 8px;
    width: 35px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 105;
    right: 5px;
    position: relative;
}
#prev-pin, #next-pin {
    margin: 0 5px;
}

.btg:hover {
    background-color: #0a1a2b;
}

#toggle-arrow {
    transform: rotate(180deg);
}

.alert-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 1.3s ease-in-out;
    pointer-events: none;
}

.alert-notification.show {
    opacity: 1;
}

.popup-section {
    transition: max-height 0.7s ease-out;
    overflow-y: scroll;
}

.popup-content.collapsed {
    max-height: 48px; /* Altezza dell'header della sezione */
}

.popup-section.expanded {
    max-height: 80vh; /* Altezza massima quando espanso */
    height: 80vh; /* Altezza massima quando espanso */
    margin-bottom: 80px;
}

.section-header {
    cursor: pointer;
    padding: 12px;
    background-color: #f8f9fa00;
    border-radius: 6px;
    margin-bottom: 8px;
    margin-top: 20px;
}

.section-content {
    padding: 0 12px;
}

/* Swiper Styles */
.swiper-container,
.swiper-container-2 {
    overflow: visible;
    padding: 20px 0;
    width: 100%;
}

.swiper-slide {
    height: auto; /* Altezza automatica basata sul contenuto */
    display: flex;
}

@media (min-width: 1024px) {
    .swiper-container,
    .swiper-container-2 {
        overflow: hidden;
        padding: 20px 40px;
    }

    .swiper-slide {
        opacity: 1 !important; /* Forza l'opacità per tutte le slide visibili */
    }
}

/* Navigation buttons */
.swiper-button-next,
.swiper-button-prev,
.swiper-button-next-2,
.swiper-button-prev-2 {
    color: #007bff;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after,
.swiper-button-next-2:after,
.swiper-button-prev-2:after {
    font-size: 20px;
}

.swiper-container,
.swiper-container-2 {
    width: 100%;
    height: auto;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
}

.swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
}

.swiper-button-next,
.swiper-button-prev,
.swiper-button-next-2,
.swiper-button-prev-2 {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    margin-top: -20px;
}

/* Footer Styles */
.mobile-footer {
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 0px;
    font-size: 13px;
    bottom: 0px;
    position: sticky;    
    
}

    
.footer-content {
    display: flex;
        flex-direction: column;
        gap: 8px;
        padding-top: 10px;
        padding-bottom: 25px;
}

.footer-content .info {
    text-align: center;
}

.footer-content .links {
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
}

.footer-content a {
    text-decoration: none;
}

#Pp{
    padding: 2px;
    text-decoration: none;
}

#Circuito{
        padding: 2px;
        color: #007bff;
        text-decoration: none;
        border: 1px solid #007bff;
        border-radius: 5px;
}
/* Main container */
.min-h-screen {
    width: 100%;
}

/* Content area */
.flex-1 {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes blink {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media screen and (max-width: 640px) {


    body{    height: 80vh;
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }


    .main {
        min-height: calc(80vh - env(safe-area-inset-bottom, 20px));
        overflow: hidden;

    }



    .swiper-button-next,
    .swiper-button-prev {
        position: relative;
        top: -220px;
        width: 60px;
        height: 60px;
        margin-top: 10px;
        z-index: 10;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--swiper-navigation-color, var(--swiper-theme-color));
        left: 220px;
    }

    .details-section {
        position: fixed;
        top: 0px;
        left: 0;
        width: 100%;
        overflow-y: auto;
        z-index: 2;
        background: #00102a59;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        text-shadow: 0 0 black;
        border: 1px solid #007bff;
        width: 100%;
        max-height: 80vh;
        height: 70vh;
        border-top-left-radius: 0;
        border-top-right-radius: 0;  

    }


        .filter-dropdown{
        background-color: #122038;
    }

    .filter-group {
        width: 100%;
        max-width: 400px;
        background: rgba(18, 32, 56, 0.95);
        border-radius: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        max-height: 50px;
        position: sticky;
        bottom: 40px;
    }

    .filter-item {
        margin: 8px 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .filter-item label {
        cursor: pointer;
        font-size: 16px;
    }

    .btg {
        position: fixed;
        bottom: 50vh;
        z-index: 3;
        padding: 10px;
        font-size: 14px;
    }

    .flex-1 {
        padding-bottom: 60px; /* Space for mobile footer */
    }
}


/* Aggiungi queste classi per gestire il contenuto collassabile */
#popup-content {
    max-height: 0;
    overflow: visible!important;
    transition: max-height 0.3s ease-out;
}

#popup-content.expanded {
    max-height: 1000px; /* o un valore appropriato */
}

.popup-header {
    cursor: pointer;
}

/* Add to your existing styles */
.location-btn {
    background: #0a1a2b;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin: 0 5px;
}

.location-btn:hover {
    background: #162736;
}

.mapboxgl-marker {
    transition: all 0.3s ease;
}

.mapboxgl-marker.active {
    transform: scale(1.5);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    z-index: 999 !important;
}

.active-marker {
    animation: pulse 1.5s infinite;
}

.mapboxgl-marker[data-state='active'] {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px rgba(13, 7, 209, 0.5));
    animation: pulse 1.5s infinite;
}