/*!
 * Don Geppi Restaurant - Swiper Gallery
 * Copyright (c) 2025 Manolo De Angelis - Mdaweb
 * All rights reserved.
 */

/* Swiper Immagini Leggerissimo con Fullscreen - CSS */
.swiper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

.swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    /* Rimuoviamo display flex e transition per usare posizionamento assoluto */
}

.swiper-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateX(0);
}

/* Slide attiva normale */
.swiper-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 10;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.05, 0.94);
}

/* Slide che era attiva - resta ferma sotto */
.swiper-slide.was-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 1;
}

/* Slide pronta per entrare da sinistra */
.swiper-slide.entering-from-left {
    opacity: 1;
    visibility: visible;
    transform: translateX(-100%);
    z-index: 20;
}

/* Slide pronta per entrare da destra */
.swiper-slide.entering-from-right {
    opacity: 1;
    visibility: visible;
    transform: translateX(100%);
    z-index: 20;
}

/* Animazione di entrata */
.swiper-slide.entering-from-left.active,
.swiper-slide.entering-from-right.active {
    transform: translateX(0);
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ============================================
   SWIPER ARROW BUTTONS (BASATI SU BOTTONI.CSS MA SENZA ANIMAZIONI)
   ============================================ */

/* Base per bottoni swiper normali (senza testo) */
.swiper-arrow-button {
    position: absolute;
    bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #5c5c5c;
    background: rgba(255,255,255,0.9);
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 30;
    backdrop-filter: blur(10px);
    border: none;
    padding: 0;
    transition: background 0.3s ease; /* Solo transizione background */
}

.swiper-arrow-button:hover {
    background: rgba(255,255,255,1);
}

/* Icona freccia per swiper normale */
.swiper-arrow-button .arrow-icon {
    position: relative;
    width: 3rem;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Linea della freccia */
.swiper-arrow-button .arrow-icon:before {
    content: "";
    position: absolute;
    background-color: #5c5c5c;
}

/* Punta della freccia */
.swiper-arrow-button .arrow-icon:after {
    content: "";
    position: absolute;
    border-style: solid;
}

/* FRECCIA SINISTRA (PREV) */
.swiper-arrow-button.arrow-left {
    right: 75px;
}

.swiper-arrow-button.arrow-left .arrow-icon:before {
    width: 1.2rem;
    height: 1px;
}

.swiper-arrow-button.arrow-left .arrow-icon:after {
    border-width: 2.5px 9px 2.5px 0;
    border-color: transparent #5c5c5c transparent transparent;
    left: 8px; /* Punta all'estremità sinistra */
}

/* FRECCIA DESTRA (NEXT) */
.swiper-arrow-button.arrow-right {
    right: 20px;
}

.swiper-arrow-button.arrow-right .arrow-icon:before {
    width: 1.2rem;
    height: 1px;
}

.swiper-arrow-button.arrow-right .arrow-icon:after {
    border-width: 2.5px 0 2.5px 9px;
    border-color: transparent transparent transparent #5c5c5c;
    right: 8px; /* Punta all'estremità destra */
}

/* Il testo viene nascosto nello swiper normale */
.swiper-arrow-button .button-text {
    display: none;
}

/* Dots */
.swiper-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 30;
}

.swiper-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.swiper-dot.active {
    background: white;
    transform: scale(1.2);
}

.swiper-counter {
    display: none;
}

/* Touch feedback */
.swiper-slide.dragging {
    cursor: grabbing;
}

.swiper-wrapper {
    cursor: grab;
}

.swiper-wrapper:active {
    cursor: grabbing;
}

/* ========== FULLSCREEN OVERLAY ========== */
.swiper-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.swiper-fullscreen-overlay.active {
    display: block;
    opacity: 1;
}

.swiper-fullscreen-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.swiper-fullscreen-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    border-radius: 0px;
}

.swiper-fullscreen-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transform: translateX(0);
}

/* Slide attiva - visibile e al centro */
.swiper-fullscreen-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 10;
    transition: transform 1.8s cubic-bezier(0.25, 0.46, 0.05, 0.94);
}

/* Slide che era attiva - resta ferma sotto */
.swiper-fullscreen-slide.was-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 1;
}

/* Slide pronta per entrare da sinistra */
.swiper-fullscreen-slide.entering-from-left {
    opacity: 1;
    visibility: visible;
    transform: translateX(-100%);
    z-index: 20;
}

/* Slide pronta per entrare da destra */
.swiper-fullscreen-slide.entering-from-right {
    opacity: 1;
    visibility: visible;
    transform: translateX(100%);
    z-index: 20;
}

/* Animazione di entrata */
.swiper-fullscreen-slide.entering-from-left.active,
.swiper-fullscreen-slide.entering-from-right.active {
    transform: translateX(0);
}

.swiper-fullscreen-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    cursor: default;
}

/* Close button */
.swiper-fullscreen-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #fff;
    border: 0;
    cursor: pointer;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.swiper-fullscreen-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(180deg) scale(1.1);
}

.swiper-fullscreen-close svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

/* ============================================
   FULLSCREEN ARROW BUTTONS (CON TESTO)
   ============================================ */

.swiper-fullscreen-arrow {
    position: absolute;
    bottom: 40px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #fff; /* Testo bianco */
    background: rgba(255, 255, 255, 0.4); /* Sfondo bianco al 40% */
    cursor: pointer;
    z-index: 100000;
    padding: 15px 25px;
    transition: background 0.3s ease;
    font-family: 'Julius Sans One', sans-serif;

}

.swiper-fullscreen-arrow:hover {
    background: rgba(255, 255, 255, 0.6); /* Più opaco al hover */
}

/* Testo nel fullscreen */
.swiper-fullscreen-arrow .button-text {
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 400;
    color: #000; /* Testo bianco */
}

.swiper-fullscreen-arrow:hover .button-text {
    font-weight: 700;
}

/* Icona freccia fullscreen */
.swiper-fullscreen-arrow .arrow-icon {
    position: relative;
    width: 2.5rem; /* Ridotto per bilanciare con il testo */
    height: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-fullscreen-arrow .arrow-icon:before {
    content: "";
    position: absolute;
    background-color: #000; /* Linea bianca */
}

.swiper-fullscreen-arrow .arrow-icon:after {
    content: "";
    position: absolute;
    border-style: solid;
}

/* FRECCIA SINISTRA FULLSCREEN (PREV) - Centrata */
.swiper-fullscreen-arrow.arrow-left {
    left: 50%;
    transform: translateX(calc(-100% - 30px)); /* Posiziona a sinistra del centro */
    flex-direction: row; /* Freccia a sinistra, testo a destra */
}

.swiper-fullscreen-arrow.arrow-left .button-text {
    margin-left: 12px; /* Spazio tra freccia e testo */
    margin-right: 0;
}

.swiper-fullscreen-arrow.arrow-left .arrow-icon:before {
    width: 1.2rem;
    height: 1px;
}

.swiper-fullscreen-arrow.arrow-left .arrow-icon:after {
    border-width: 3px 7px 3px 0;
    border-color: transparent #000 transparent transparent; /* Punta bianca */
    left: 3px;
}

/* FRECCIA DESTRA FULLSCREEN (NEXT) - Centrata */
.swiper-fullscreen-arrow.arrow-right {
    right: 42%;
    transform: translateX(calc(-20% + 0px)); /* Posiziona a destra del centro */
    flex-direction: row-reverse; /* Freccia a destra, testo a sinistra */
}

.swiper-fullscreen-arrow.arrow-right .button-text {
    margin-right: 12px; /* Spazio tra testo e freccia */
    margin-left: 0;
}

.swiper-fullscreen-arrow.arrow-right .arrow-icon:before {
    width: 1.2rem;
    height: 1px;
}

.swiper-fullscreen-arrow.arrow-right .arrow-icon:after {
    border-width: 3px 0 3px 7px;
    border-color: transparent transparent transparent #000; /* Punta bianca */
    right: 3px;
}

/* Dots for fullscreen - NASCOSTI */
.swiper-fullscreen-dots {
    display: none !important;
}

/* Counter for fullscreen - NASCOSTO */
.swiper-fullscreen-counter {
    display: none !important;
}

/* Prevent body scroll when fullscreen is open */
body.swiper-fullscreen-open {
    overflow: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .swiper-arrow-button {
        width: 40px;
        height: 40px;
    }
    
    .swiper-arrow-button.arrow-left { 
        right: 60px; 
    }
    
    .swiper-arrow-button.arrow-right { 
        right: 10px; 
    }
    
    /* Fullscreen adjustments for tablet */
    .swiper-fullscreen-container {
        padding: 15px;
    }
    
    .swiper-fullscreen-wrapper {
        border-radius: 6px;
    }
    
    .swiper-fullscreen-close {
        width: 44px;
        height: 44px;
        top: 20px;
        right: 20px;
    }
    
    .swiper-fullscreen-arrow {
        padding: 10px 15px;
        bottom: 30px;
        background: rgba(255, 255, 255, 0.4); /* Mantieni sfondo bianco trasparente */
    }
    
    /* Posizioni centrate anche su tablet */
    .swiper-fullscreen-arrow.arrow-left {
        left: 50%;
        transform: translateX(calc(-100% - 20px));
    }
    
    .swiper-fullscreen-arrow.arrow-right {
        right: 50%;
        transform: translateX(calc(100% + 20px));
    }
    
    /* Nascondi testo su tablet */
    .swiper-fullscreen-arrow .button-text {
        display: none;
    }
}

/* Mobile */
@media (max-width: 480px) {
    /* Colore nero per icone su mobile dello swiper normale */
    .swiper-arrow-button .arrow-icon:before {
        background-color: #000;
    }
    
    .swiper-arrow-button.arrow-left .arrow-icon:after {
        border-color: transparent #000 transparent transparent;
        left: 8px;
    }
    
    .swiper-arrow-button.arrow-right .arrow-icon:after {
        border-color: transparent transparent transparent #000;
        right: 8px;
    }
    
    /* Fullscreen adjustments for mobile */
    .swiper-fullscreen-container {
        padding: 10px;
    }
    
    .swiper-fullscreen-slide {
        position: absolute;
        top: 35px;
        left: 0;
        width: 100%;
        height: 80%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;	
    }
    
    .swiper-fullscreen-wrapper {
        border-radius: 4px;
    }
    
    .swiper-fullscreen-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }
    
    .swiper-fullscreen-close svg {
        width: 20px;
        height: 20px;
    }
    
    /* Frecce fullscreen su mobile - mantieni bianche con sfondo trasparente */
    .swiper-fullscreen-arrow {
        padding: 8px;
        bottom: 20px;
        background: rgba(255, 255, 255, 0.4); /* Sfondo bianco trasparente anche su mobile */
        border-radius: 50%; /* Tondo su mobile */
    }
    
    /* Posizioni centrate su mobile */
    .swiper-fullscreen-arrow.arrow-left {
        left: 50%;
        transform: translateX(calc(-100% - 15px));
    }
    
    .swiper-fullscreen-arrow.arrow-right {
        right: 52%;
        transform: translateX(calc(100% + 10px));
    }
    
    /* Nascondi testo su mobile */
    .swiper-fullscreen-arrow .button-text {
        display: none;
    }
    
    /* Riduci dimensione icone su mobile */
    .swiper-fullscreen-arrow .arrow-icon {
        width: 2.5rem;
        height: 2.5rem;
		border: 1px solid #ccc;
		background-color: #f0f0f0;
    }
    
    .swiper-fullscreen-arrow .arrow-icon:before {
        width: 1rem;
        height: 1px !important;
        background-color: #000; /* Bianco su mobile nel fullscreen */
    }
    
    .swiper-fullscreen-arrow.arrow-left .arrow-icon:after {
        left: 9px;
        border-width: 3px 6px 3px 0;
        border-color: transparent #000 transparent transparent; /* Bianco */
    }
    
    .swiper-fullscreen-arrow.arrow-right .arrow-icon:after {
        right: 9px;
        border-width: 3px 0 3px 6px;
        border-color: transparent transparent transparent #000; /* Bianco */
    }
}

/* Animation for fullscreen entrance */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.swiper-fullscreen-overlay.active .swiper-fullscreen-container {
    animation: fadeInScale 0.3s ease;
}