/* Estilos Gerais */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffbe0b;
    --dark-color: #292f36;
    --light-color: #f7fff7;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);

    min-height: 100vh;
    width: 100vw;
    position: relative;
    touch-action: manipulation;
}

/* Botões */
.btn {
    cursor: pointer;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #3dbdb3;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--dark-color);
}

.btn-icon:hover {
    background-color: white;
    transform: scale(1.1);
}

/* Seções */
section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* height: 100%; */
    display: none;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

section.active {
    display: flex;
    opacity: 1;
    z-index: 10;
}

/* Tela de Abertura */
#splash-screen {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
    padding: 20px;
}

.logo-container {
    margin-bottom: 50px;
    animation: fadeInDown 1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.senac-logo {
    max-width: 250px;
    margin-bottom: 20px;
}

.senac-logo img {
    width: 100%;
    height: auto;
}

.splash-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeInUp 1s ease 0.5s both;
}

/* Galeria em Modo Mosaico */
#gallery-view {
    flex-direction: column;
    background-color: var(--light-color);
}

header {
    background-color: var(--dark-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.gallery-controls {
    display: flex;
    gap: 10px;
}

.gallery-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    overflow-y: auto;
    width: 100%;
    height: calc(100% - 120px); /* Ajuste para considerar o header e o footer */
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: transform var(--transition-speed) ease;
    margin-bottom: 15px;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Visualização em Tela Cheia */
#fullscreen-view {
    background-color: rgba(0, 0, 0, 0.9);
    flex-direction: column;
}

.fullscreen-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
}

.fullscreen-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.current-image {
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-image img {
    max-height: 100%;
    max-width: 90%;
    object-fit: contain;
    border-radius: 5px;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
}

.nav-arrow:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.left-arrow {
    left: 20px;
}

.right-arrow {
    right: 20px;
}

/* Modo Slideshow */
#slideshow-view {
    background-color: black;
    position: relative;
}

.slideshow-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 20;
}

.slideshow-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-container img {
    max-height: 90%;
    max-width: 90%;
    object-fit: contain;
    border-radius: 5px;
    opacity: 0;
    position: absolute;
    transition: opacity 1s ease;
}

.slideshow-container img.active {
    opacity: 1;
}

.nav-controls {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 15;
    pointer-events: none; /* Para evitar que o container bloqueie cliques */
}

.left-arrow-slideshow, .right-arrow-slideshow {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    pointer-events: auto; /* Permitir cliques nos botões */
}

.left-arrow-slideshow {
    left: 20px;
    position: absolute;
}

.right-arrow-slideshow {
    right: 20px;
    position: absolute;
}

.left-arrow-slideshow:hover, .right-arrow-slideshow:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Legenda institucional */
.institutional-caption {
    position: absolute;
    left: 0;
    bottom: 35px;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: left;
    padding: 15px;
    font-size: 0.9rem;
    font-weight: 300;
    z-index: 15;
    max-width: 300px;
    border-radius: 0 10px 10px 0;
}

.institutional-caption span {
    display: block;
    padding-right: 10px;
}

/* Rodapé */
footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    z-index: 5;
}

/* Animações */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsividade para tela vertical (totem) */
@media (max-width: 768px) {
    .logo-container h1 {
        font-size: 2.5rem;
    }
    
    .senac-logo {
        max-width: 200px;
    }
    
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .institutional-caption {
        font-size: 0.8rem;
        padding: 10px;
        max-width: 250px;
    }
}

/* Orientação específica para totem vertical */
@media (orientation: portrait) {
    .gallery-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* .splash-buttons {
        width: 80%;
    } */
    
    /* .btn {
        width: 100%;
    } */
}
