/* stile.css - Versione completa con event-card ridotte del 30% */

/* Reset e Layout di Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 17.5px;
    color: var(--bs-body-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Logo */
.img_logo {
    max-width: 100px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Tutto il contenuto principale della pagina */
.container,
.content,
main {
    flex: 1 0 auto;
}

/* Stili Navbar */
.navbar {
    background-color: transparent;
}

.navbar-brand {
    color: #ffc107;
}

.navbar-nav .nav-link {
    color: #ffffff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffc107;
}

/* Sezione Hero */
.hero-section {
    height: 100vh;
    background: url('../img/hero.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* Stili Bottoni */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 50px;
    margin: 10px;
}

.btn-primary {
    background-color: #FBDA00;
    border: none;
    color: #111;
}

.btn-primary:hover {
    background-color: #ffd54f;
    color: #111;
}

/* Sezione Eventi */
.event-section {
    width: 100%;
    padding: 2rem 0;
    background: #111;
    overflow: hidden;
}

.event-section.full-width {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background-color: #111;
}

/* Contenitore Eventi (se non usi Swiper, altrimenti ignoralo) */
.event-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 1rem;
    margin: 0 auto;
    max-width: calc(300px * 5 + 1rem * 4);
    scrollbar-width: none;
}

.event-container::-webkit-scrollbar {
    display: none;
}

/* Stili Card Evento (versione non-Swiper) */
.event-card {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 350px; /* Larghezza fissa delle card */
    height: 400px; /* Altezza fissa per tutte le card, importante per la coerenza dello slider */
    text-decoration: none;
    color: #fff;
    background: linear-gradient(145deg, #2a2a2a, #353535, #505050, #353535, #2a2a2a);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column; /* Organizza i contenuti in colonna */
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

.card-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.card-title-dark {
    color: #000;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.card-text {
    color: #e0e0e0;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-top: 1rem;
    opacity: 0.9;
}

/* Badge Nuovo Evento */
.new-event-badge {
    width: auto;
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: #d4af37;
    color: #fff;
    font-size: 0.9rem;
    padding: 5px 15px;
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    z-index: 2;
    text-align: center;
}

/* Badge Evento in Corso */
.running-event-badge {
    width: auto;
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: #8AAA7B;
    color: #fff;
    font-size: 0.9rem;
    padding: 5px 15px;
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    z-index: 2;
    text-align: center;
}

.details-link {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.9rem;
    color: #ffc107;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

/* ===== SWIPER SLIDE STYLES - DIMENSIONI RIDOTTE DEL 30% ===== */

/* Link container che avvolge tutta la card */
.event-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

/* Contenitore principale della card nello Swiper - DIMENSIONI RIDOTTE DEL 30% */
.swiper-slide .event-card {
   position: relative;
    width: 100%;
    /* Larghezza massima ridotta per permettere 5 card: 280px → 240px */
    max-width: 240px; 
    height: clamp(17.5rem, 21vh, 22.4rem);
    max-height: 22.4rem;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
}

.swiper-slide:hover .event-card {
    transform: scale(1.02);
}

/* Contenitore immagine - mantiene le stesse proporzioni (75% dell'altezza) */
.event-image-container {
    position: relative;
    width: 100%;
    height: 75%; /* Mantiene la proporzione 75% dell'altezza totale */
    overflow: hidden;
}

.event-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Al hover ingrandisce ancora di più */
.swiper-slide:hover .event-image-container img {
    transform: scale(1.15);
}

/* Overlay sfumato per migliorare la leggibilità del testo */
.event-card::after {
    content: '';
    position: absolute;
    top: 75%; /* Inizia la sfumatura al termine dell'immagine */
    left: 0;
    right: 0;
    height: 20%; /* Copre l'area delle informazioni */
    background: transparent;
    pointer-events: none;
    z-index: 1; /* Assicura che la sfumatura sia sopra l'immagine ma sotto il testo */
}

/* Contenitore informazioni - mantiene le stesse proporzioni (25% dell'altezza) */
.event-info {
    position: relative;
    width: 100%;
    height: 25%; /* Mantiene la proporzione 25% dell'altezza totale */
    /* Padding responsivo ridotto del 30% */
    padding: clamp(0.525rem, 2.8%, 1.05rem) clamp(0.7rem, 4.2%, 1.4rem);
    color: #fff;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Override per il padding delle info - versione ridotta */
.swiper-slide .event-card .event-info {
    padding: clamp(0.525rem, 2.8%, 1.05rem) 0 !important;
}

/* Data evento - font size responsivo ridotto del 30% */
.event-date {
    font-size: clamp(0.525rem, 0.77vw, 0.7rem); /* Ridotto del 30% */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.0625rem; /* 1px convertito in rem */
    margin-bottom: 0.4em;
    color: #FAC10B;
}

/* Nome evento - font size responsivo ridotto del 30% */
.event-name {
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.15em 0;
    text-transform: uppercase;
    letter-spacing: 0.03125rem; /* 0.5px convertito in rem */
    line-height: 1.1;
    font-size: clamp(0.7rem, 1.54vw, 1.05rem); /* Ridotto del 30% */
}

/* Slogan evento - font size responsivo ridotto del 30% */
.event-slogan {
    font-size: clamp(0.48rem, 0.84vw, 0.61rem); /* Ridotto del 30% */
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 300;
}

/* Margini laterali per tablet (768px e superiori) */
@media (min-width: 768px) {
    .swiper-slide .event-card {
        /* Altezza ottimizzata per tablet ridotta del 30% */
        height: clamp(19.6rem, 24.5vh, 22.4rem); /* 28rem, 35vh, 32rem ridotti del 30% */
        max-height: 22.4rem;
        margin-left: auto;
        margin-right: auto;
        max-width: 260px;
    }
     .swiper-slide {
        padding: 0 clamp(0.3rem, 1vw, 0.6rem);
    }
}

/* Margini laterali per desktop (1024px e superiori) */
@media (min-width: 1024px) {
   .swiper-slide .event-card {
        height: clamp(21rem, 26.6vh, 22.4rem);
        max-height: 22.4rem;
        /* Larghezza ridotta per desktop: 266px → 220px */
        max-width: 220px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Desktop large (1400px e superiori) */
@media (min-width: 1400px) {
    .swiper-slide .event-card {
        height: 22.4rem;
        max-height: 22.4rem;
        /* Larghezza fissa ridotta: 266px → 220px */
        max-width: 220px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Media query per dispositivi mobile - dimensioni ridotte del 30% */
@media (max-width: 767px) {
     .swiper-slide .event-card {
        /* Mobile: mantieni dimensioni originali ridotte del 30% */
        height: clamp(15.4rem, 35vh, 19.6rem);
        max-height: 19.6rem;
        max-width: 245px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .swiper-slide {
        /* Mobile: padding minimo */
        padding: 0 clamp(0.2rem, 0.5vw, 0.4rem);
    }
    
    .event-info {
        /* Padding ridotto per mobile - ridotto del 30% */
        padding: clamp(0.35rem, 2.1%, 0.7rem) clamp(0.525rem, 3.5%, 1.05rem);
    }
}

/* Media query per dispositivi molto piccoli */
@media (max-width: 480px) {
    .swiper-slide .event-card {
        /* Dimensioni ridotte del 30%: 20rem, 45vh, 26rem → 14rem, 31.5vh, 18.2rem */
        height: clamp(14rem, 31.5vh, 18.2rem);
        max-height: 18.2rem; /* 26rem ridotto del 30% */
        max-width: 224px; /* 320px ridotto del 30% */
        margin-left: auto;
        margin-right: auto;
    }
    
    .event-info {
        /* Padding ridotto del 30% */
        padding: clamp(0.26rem, 1.75%, 0.61rem) clamp(0.35rem, 2.8%, 0.875rem);
    }
}

/* Stili aggiuntivi responsivi per swiper controls */
.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: clamp(2.5rem, 5vw, 3.125rem); /* 40px a 50px responsive */
    height: clamp(2.5rem, 5vw, 3.125rem);
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: clamp(1rem, 2vw, 1.25rem); /* 16px a 20px responsive */
}

/* Pagination responsiva */
.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
    width: clamp(0.5rem, 1vw, 0.625rem); /* 8px a 10px responsive */
    height: clamp(0.5rem, 1vw, 0.625rem);
    margin: 0 clamp(0.25rem, 0.5vw, 0.5rem) !important; /* Spaziatura responsive */
}

/* Miglioramento spaziatura Swiper per card centrate */
.swiper-slide {
    /* Assicura spaziatura uniforme tra le slide */
    padding: 0 clamp(0.25rem, 0.8vw, 0.5rem);
}

/* Per schermi molto grandi, aggiungi più spazio */
@media (min-width: 1600px) {
    .swiper-slide {
        /* Padding ulteriormente ridotto per schermi grandi */
        padding: 0 clamp(0.5rem, 1vw, 0.75rem);
    }
}

/* Colore del bullet attivo */
.swiper-pagination-bullet-active {
    background-color: rgb(255,187,79); /* colore attivo */
}

/* Colore del bullet attivo */
.back_white {
    background-color: white; /* colore attivo */
    opacity: 1;
}

/* Sezione Chi Siamo */
.about-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 5rem 0;
}

.about-section img {
    max-width: 40%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Sfumature Personalizzate */
.bg-dark-gradient {
    background: linear-gradient(to right, #1c1c1c, #000);
}

.bg-light-gradient {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
}

.bg-contatti-gradient {
    background: linear-gradient(to top, #0d1b2a, #1b263b);
}

/* Footer */
.footer {
    background-color: #111;
    color: #aaa;
    padding: 10px 0;
    text-align: center;
    font-size: 0.875rem;
    margin-top: auto;
    line-height: 1.5;
    flex-shrink: 0;
    width: 100%;
}

.footer a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.footer a:hover {
    color: #e1c16e;
}

/* Stili Responsive */
/* Personalizzazione scroll orizzontale */
.event-container::-webkit-scrollbar {
    height: 8px;
    background: #2a2a2a;
}

.event-container::-webkit-scrollbar-thumb {
    background: #ffc107;
    border-radius: 4px;
}

.swiper-pagination {
    position: relative !important;
    margin-top: 20px !important;
    padding-bottom: 20px;
}

.swiper-pagination-bullet {
    margin: 0 8px !important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #F5F6F7;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #F5F6F7;
}

.btn-area-riservata {
    background-color: #8aaa7b;
    color: #111;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.brush-container {
    position: relative;
    width: 100%;
    height: 60px;
    margin: -40px 0 40px;
}

.pennellata {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: white;
    stroke-width: 8px;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: draw 1.5s ease forwards;
    transform: scale(1.2);
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@media (max-width: 767.98px) {
    .main-sidebar {
        transform: translate(-100%, 0);
        transition: all 0.3s ease-in-out;
    }

    .sidebar-open .main-sidebar {
        transform: translate(0, 0);
    }
}