body {
    background-color: #fdf0d5;
    color: #003049;
    margin: 0;
    padding: 0;
}

.section-divider {
    width: 100%;
    height: 3px;
    background-color: #003049;
}

.spacer-section {
    height: 5vh;
    background-color: #fdf0d5;
}

/* Stato vuoto */
.empty-state {
    grid-column: 1 / -1;
    justify-self: center;
    align-self: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 0;
    min-height: 320px;
}

.empty-content {
    text-align: center;
}

.empty-icon {
    margin-bottom: 30px;
}

.empty-icon i {
    font-size: 4rem;
    color: #669bbc;
}

.empty-content h3 {
    color: #003049;
    margin-bottom: 15px;
}

.empty-content p {
    color: #669bbc;
}

/* sezione iniziale */
.hero-section {
    margin-top: 5vh;
    margin-bottom: 5vh;
    position: relative;
    width: 100vw;
    height: 50vh;
    background-image: url("/img/fuori-dal-tacco.png");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7); /* overlay scuro */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero-text {
    color: white;
    max-width: 900px;
    padding: 1rem;
}

.hero-text h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.hero-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-text p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        height: 45vh;
    }

    .hero-text h2 {
        font-size: 2rem;
    }

    .hero-text h3 {
        font-size: 1.4rem;
    }

    .hero-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 38vh;
    }

    .hero-text h2 {
        font-size: 1.6rem;
    }

    .hero-text h3 {
        font-size: 1.2rem;
    }

    .hero-text p {
        font-size: 0.95rem;
    }
}

/* sezione controlli */
.control-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 3rem;
}

.control-container .btn {
    border-color: #c1121f;
    color: #c1121f;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.control-container .btn:hover {
    background-color: #780000;
    color: #ffffff;
}

.control-container .btn-check:checked + .btn {
    background-color: #780000;
    color: #ffffff;
    border-color: #780000;
}

@media (max-width: 768px) {
    .control-container {
        padding: 1rem 3rem;
        gap: 0.5rem;
    }

    .control-container .btn {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .control-container {
        padding: 1rem 3rem;
    }

    .control-container .btn {
        font-size: 0.9rem;
        padding: 0.35rem 0.7rem;
    }
}

/* ========== Contenitore Filtri ========== */
#filterSidebar {
    background-color: #fdf0d5;
    color: #003049;
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* leggermente aumentato */
    padding: 1rem 0.5rem;
}

.filter-row {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 48, 73, 0.7);
}

.filter-container .col-md-3 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border: 1px solid rgba(0, 48, 73, 0.7);
    border-top: none;
    min-width: 0;
    box-sizing: border-box;
}

/* ========== Input Testuali ========== */
.filter-container input.filter {
    width: 100%;
    font-size: 14px;
    color: #003049;
    background: #fdf0d5;
    border: none;
    text-align: left;
    height: 35px;
    box-sizing: border-box;
}

.filter-container input.filter::placeholder {
    color: rgba(0, 48, 73, 0.5);
}

.filter-container input.filter:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

/* ========== Input Selettivi ========== */
.filter-container select.filter {
    width: 100%;
    font-size: 14px;
    color: #003049;
    background: #fdf0d5;
    border: none;
    text-align: left;
    height: 35px;
    box-sizing: border-box;
    position: relative;
    padding-right: 20px;
    cursor: pointer;
}

/* Wrapper per l'icona */
.filter-container .select-wrapper {
    position: relative;
}

.filter-container .select-wrapper select.filter {
    appearance: none;
    background: none;
}

/* Icona personalizzata */
.filter-container .select-wrapper .fa-caret-down {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #003049;
}

/* ========== Check box ========== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

/* Stile collassabile */
.collapse {
    width: 100%;
    margin-top: 5px;
}

.checkbox-group .form-check {
    margin-right: 10px;
    width: auto;
}

/* Bottone collassabile stile professionale */
.slider-label button {
    font-size: 0.8rem;
    padding: 2px 8px;
}

/* Personalizzazione delle checkbox visibili */
.form-check-input {
    width: 15px;
    height: 15px;
    border: 1px solid #c1121f;
    background-color: #fdf0d5;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Quando la checkbox è selezionata, cambia il colore di sfondo */
.form-check-input:checked {
    background-color: #780000;
    border-color: #780000;
}

/* Cambia il colore del segno di spunta quando selezionato */
.form-check-input:checked::after {
    position: absolute;
    font-size: 14px;
    color: white;
}

/* Aggiungere un bordo con un effetto hover */
.form-check-input:hover {
    border-color: #c1121f;
}

/* Stile del label associato alla checkbox */
.form-check-label {
    position: relative;
    cursor: pointer;
}

/* Aggiungere uno pseudo-elemento per creare un simbolo personalizzato prima del label */
.form-check-input:checked + .form-check-label::before {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 16px;
    color: #c1121f;
    font-weight: bold;
}

/* Rimuovi il bordo celeste di focus dalla checkbox */
.form-check-input:focus {
    outline: none;
    box-shadow: none; /* Rimuove anche l'effetto di ombra, se presente */
}

/* ========== Slider ========== */
.slider-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 5px; /* Distanza tra gli elementi */
}

/* Label degli slider */
.slider-label {
    font-size: 14px;
    color: #003049;
    min-width: 70px; /* aumentato da 50px */
    text-align: left;
}

/* Valori accanto agli slider */
.slider-value {
    font-size: 14px;
    color: #003049;
    min-width: 40px;
    text-align: center;
}

/* Track slider */
.slider-wrapper {
    position: relative;
    flex-grow: 1;
    height: 4px;
    background: #003049;
    border-radius: 2px;
    max-width: 150px;
    display: flex;
    align-items: center;
}

.toggle-button {
    border: 1px solid #003049;
    background-color: transparent;
    color: #003049;
    width: 100%;
    height: auto;
    padding: 5px 5px;
}

/* Slider */
.slider {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    width: 100%;
    height: 2px;
    background: transparent;
    outline: none;
    z-index: 2;
    pointer-events: none;
}

/* Track dello slider */
.slider::-webkit-slider-runnable-track {
    background: #003049;
    height: 2px;
    border-radius: 2px;
}

.slider::-moz-range-track {
    background: #003049;
    height: 2px;
    border-radius: 2px;
}

/* Thumb degli slider */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #003049;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    margin-top: -5px;
}

.slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #003049;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
}

/* reset button */
.reset-button {
    color: #c1121f;
    border: solid 1px #c1121f;
    background: transparent;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.reset-button:hover {
    background-color: #780000;
    color: #ffffff;
}

.reset-button:focus {
    outline: none;
    box-shadow: none;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.btn-clear-input {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #999;
    font-size: 1.5rem;
    z-index: 2;
    padding: 0;
    line-height: 1;
}

.btn-clear-input:hover {
    color: #003049;
}

/* Video Container */
.video-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    justify-content: center;
    align-items: start;
    background-color: #fdf0d5;
    padding: 2rem 3rem;
}

.video-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    position: relative;
}

/* Effetto hover sulla card completa */
.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    filter: brightness(1.05);
}

.card {
    background: none;
    border: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    border-radius: 0;
}

.video-card:hover .card {
    box-shadow: 0 12px 40px rgba(0, 48, 73, 0.25);
}

.video-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    filter: brightness(0.95) saturate(0.9);
}

/* Effetto parallax e zoom sulla thumbnail */
.video-card:hover .video-thumbnail {
    transform: scale(1.1) rotate(0.5deg);
    filter: brightness(1.1) saturate(1.1) contrast(1.05);
}

/* Overlay con gradiente dinamico */
.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    backdrop-filter: blur(0px);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

/* Animazione overlay con blur progressivo */
.video-link:hover .overlay {
    opacity: 1;
    backdrop-filter: blur(3px);
    pointer-events: auto;
}

/* Play icon con animazioni multiple */
.play-icon {
    font-size: 3.5rem;
    color: white;
    opacity: 0;
    transform: scale(0.3) rotate(-45deg);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.video-link:hover .play-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    animation: pulse 2s infinite ease-in-out;
}

/* Animazione pulsante per il play icon */
@keyframes pulse {
    0%,
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    }
    50% {
        transform: scale(1.1) rotate(2deg);
        filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.5));
    }
}

/* Card body con animazioni */
.card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 10px;
    flex-direction: row;
    gap: 1rem;
    background-color: #fdf0d5;
    color: #003049;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    height: 85px;
}

/* Effetto hover sul body */
.video-card:hover .card-body {
    padding: 18px 12px;
    background: linear-gradient(135deg, #fdf0d5 0%, #f8e8c8 100%);
}

.video-card:hover .card-body::before {
    width: 100%;
}

.card-title {
    flex: 1;
    font-size: 1.4rem;
    font-weight: bold;
    color: #003049;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    transition: all 0.4s ease;
    position: relative;
}

.video-card:hover .card-title {
    color: #001a2e;
    transform: translateX(3px);
    letter-spacing: 0.5px;
}

.card-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    font-size: 0.9rem;
    text-align: right;
    color: rgba(0, 48, 73, 0.75);
    transition: all 0.4s ease;
}

.video-card:hover .card-meta {
    color: rgba(0, 48, 73, 0.9);
    transform: translateX(-3px);
}

.meta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.video-card:hover .meta-row {
    transform: scale(1.02);
}

.video-card:hover::after {
    width: 100%;
}

/* Animazione di entrata staggered per le cards */
.video-card {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.video-card:nth-child(1) {
    animation-delay: 0.1s;
}
.video-card:nth-child(2) {
    animation-delay: 0.2s;
}
.video-card:nth-child(3) {
    animation-delay: 0.3s;
}
.video-card:nth-child(4) {
    animation-delay: 0.4s;
}
.video-card:nth-child(5) {
    animation-delay: 0.5s;
}
.video-card:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.no-videos {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(0, 48, 73, 0.7);
    margin-top: 20px;
    padding: 2rem;
    background: linear-gradient(
        135deg,
        rgba(253, 240, 213, 0.8),
        rgba(248, 232, 200, 0.9)
    );
    border: 1px solid rgba(0, 48, 73, 0.1);
}

/* Responsive improvements */
@media (max-width: 1200px) {
    .video-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 1.5rem 2rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-meta {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .video-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 1rem 1.5rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .card-meta {
        font-size: 0.8rem;
    }

    .play-icon {
        font-size: 3rem;
    }

    .video-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

@media (max-width: 576px) {
    .card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .card-title {
        font-size: 1.1rem;
        text-align: left;
    }

    .card-meta {
        align-items: flex-start;
        text-align: left;
        font-size: 0.75rem;
    }

    .meta-row {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .video-container {
        padding: 1rem;
        gap: 15px;
    }

    .video-card:hover {
        transform: translateY(-2px) scale(1.005);
    }
}

/* ========== Paginazione ========== */
.pagination-container {
    display: flex;
    justify-content: center;
    background-color: #fdf0d5;
    padding: 2rem 0;
}

.pagination {
    display: flex;
    list-style: none;
    padding-left: 0;
    gap: 0.25rem;
}

.pagination li a,
.pagination li span {
    color: #003049;
    padding: 0.5rem 0.75rem;
    border: 1px solid #780000;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination li a:hover {
    background-color: #669bbc;
    color: white;
}

.pagination .active span {
    background-color: #780000;
    color: white;
    border-color: #780000;
    pointer-events: none;
}

.pagination .disabled span,
.pagination .disabled a {
    color: #003049;
    background-color: #fdf0d5;
    border-color: #c1121f;
    pointer-events: none;
}

/* ========== Stile della mappa ========== */
.map-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fdf0d5;
    padding: 2rem;
    box-sizing: border-box;
}

#map {
    width: 100%;
    height: 75vh; /* Mappa più alta */
    border: 2px solid #14213d;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

#map:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

#videoContainer,
#map {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#videoContainer.hidden,
#map.hidden {
    opacity: 0;
    visibility: hidden;
}

.location-title {
    background-color: #fdf0d5;
    font-size: 1.5rem;
    color: #2c3e50;
}
