/**
 * Hero Slider - Stili Frontend
 */

.hero-slider {
    position: relative;
    width: 100%;
    height: 700px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Transizioni specifiche */
.hero-slide.hero-slide-transition {
    transform: translateX(100%);
}

.hero-slide.hero-slide-transition.active {
    transform: translateX(0);
}

.hero-slide.hero-slide-transition.prev {
    transform: translateX(-100%);
}

.hero-slide.hero-fade-transition {
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.hero-zoom-transition {
    transform: scale(0.8);
    transition: all 0.8s ease-in-out;
}

.hero-slide.hero-zoom-transition.active {
    transform: scale(1);
}

/* Contenuto slide */
.hero-slide-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    gap: 40px;
}

.hero-slide-content.text-left {
    justify-content: flex-start;
    text-align: left;
}

.hero-slide-content.text-center {
    justify-content: center;
    text-align: center;
    flex-direction: column;
}

.hero-slide-content.text-right {
    justify-content: flex-end;
    text-align: right;
}

.hero-slide-image {
    flex: 0 0 auto;
    max-width: 50%;
}

.hero-slide-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-slide-text {
    flex: 1;
    padding: 0 20px;
}

.hero-slide-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-slide-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0 0 30px 0;
    opacity: 0.9;
}

.hero-slide-description p {
    margin: 0 0 15px 0;
}

.hero-slide-button {
    margin-top: 20px;
}

.hero-btn-slide {
    display: inline-block;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-btn-slide:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: inherit;
    text-decoration: none;
}

/* Navigazione */
.hero-slider-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

.hero-slider-prev,
.hero-slider-next {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider-prev:hover,
.hero-slider-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-slider-prev:active,
.hero-slider-next:active {
    transform: scale(0.95);
}

/* Indicatori */
.hero-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.hero-dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slider {
        height: 500px;
    }
    
    .hero-slide {
        padding: 20px;
    }
    
    .hero-slide-content {
        flex-direction: column;
        gap: 20px;
        text-align: center !important;
    }
    
    .hero-slide-content.text-left,
    .hero-slide-content.text-right {
        justify-content: center;
    }
    
    .hero-slide-image {
        max-width: 80%;
    }
    
    .hero-slide-title {
        font-size: 2rem;
    }
    
    .hero-slide-description {
        font-size: 1rem;
    }
    
    .hero-slider-navigation {
        padding: 0 10px;
    }
    
    .hero-slider-prev,
    .hero-slider-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 400px;
    }
    
    .hero-slide-title {
        font-size: 1.5rem;
    }
    
    .hero-slide-description {
        font-size: 0.9rem;
    }
    
    .hero-btn-slide {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

/* Animazioni di caricamento */
.hero-slider-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 700px;
    background: #f5f5f5;
    border-radius: 8px;
}

.hero-slider-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: heroSpin 1s linear infinite;
}

@keyframes heroSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messaggio slide vuote */
.hero-slider-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 700px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 1.1rem;
    text-align: center;
}

/* Accessibilità */
.hero-slider-prev:focus,
.hero-slider-next:focus,
.hero-dot:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Animazioni personalizzate per transizioni random */
@keyframes heroSlideInFromRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes heroSlideInFromLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes heroSlideInFromTop {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes heroSlideInFromBottom {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes heroZoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes heroRotateIn {
    from { transform: rotate(-180deg) scale(0.5); opacity: 0; }
    to { transform: rotate(0deg) scale(1); opacity: 1; }
}

@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-slide.hero-random-animation {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-timing-function: ease-out;
}