/* Stile comune per tutte le pagine del Hub Personaggi */

/* Reset e styling di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Header con titolo e pulsante home */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.home-button {
    padding: 8px 15px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.home-button:hover {
    background-color: #333;
    transform: scale(1.05);
}

/* Contenitore a tutto schermo */
.gallery-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #f8f9fa;
    overflow: hidden;
    padding-top: 60px; /* Spazio per l'header */
}

/* Area immagine a tutto schermo */
.image-area {
    position: relative;
    width: 100%;
    height: calc(100% - 60px);
}

.image-area a {
    display: block;
    width: 100%;
    height: 100%;
}

.fullscreen-image {
    width: 100%;
    height: calc(100vh - 60px);
    object-fit: contain;
    position: fixed;
    top: 60px;
    left: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
}

.fullscreen-image.active,
.image-area img.active {
    opacity: 1;
}

/* Effetto zoom al passaggio del mouse */
.image-area a:hover img.active {
    transform: translate(-50%, -50%) scale(1.02);
}

.image-area img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    opacity: 0;
}

/* Indicatore di caricamento */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    color: #333;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 50;
}

/* Controlli di navigazione */
.nav-controls,
.nav-arrows {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.control-button,
.arrow {
    background-color: #000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.control-button:hover,
.arrow:hover {
    background-color: #333;
    transform: scale(1.1);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
}

/* Indicatori di pagina */
.page-indicators {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 20;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
}

.indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: #000;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Animazioni */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.header {
    animation: slideIn 0.5s ease-out;
}

/* Responsive support */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.1rem;
    }
    
    .home-button {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .control-button,
    .arrow {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 8px 15px;
    }
    
    .control-button,
    .arrow {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        margin: 0 0.3rem;
    }
    
    .nav-controls,
    .nav-arrows {
        gap: 10px;
    }
}