

/* ================================== */
/* ==== ESTILOS DA VISUALIZAÇÃO MOBILE (PADRÃO) ==== */
/* ================================== */

/* Esconde a visualização de desktop por padrão */
.flipbook-container {
    display: none;
}

/* Estiliza a visualização de scroll mobile */
.mobile-scroll-view {
    display: block; /* Garante que ela seja visível */
}

.mobile-scroll-view .img-fluid {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.port_list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px; /* Espaço entre os cards */
    }

    .port_list li {
        background: #fff;
        border-radius: 12px;
        padding: 15px 20px;
        min-width: 150px;
        text-align: center;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .port_list li:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    }

    /* Se for link, herda estilo */
    .port_list li a {
        text-decoration: none;
        color: #333;
        font-weight: bold;
        display: block;
    }

/* ================================== */
/* ==== ESTILOS DA VISUALIZAÇÃO DESKTOP (TELAS GRANDES) ==== */
/* ================================== */

@media (min-width: 768px) {
    /* Esconde a visualização mobile em telas grandes */
    .mobile-scroll-view {
        display: none;
    }

    /* Mostra e estiliza a visualização de desktop (flipbook) */
    .flipbook-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: calc(100vh - 250px); /* Desconta a altura da navbar */
        overflow: hidden;
    }

    .book {
        position: relative;
        transition: transform 0.5s;
        margin: 0 auto;
        max-width: 50vw;
        max-height: 40vh;
        overflow: visible;
        margin-top: 20px;
    }

    /* Cada página fica posicionada absoluta e se adapta ao conteúdo */
    .paper {
        position: absolute;
        top: 0;
        left: 0;
        perspective: 1500px;
        /* largura e altura dinâmicas no JS, mas com limite via max */
        max-width: 100%;
        max-height: 100%;
    }

    /* Frente e verso da página */
    .front,
    .back {
        background-color: white;
        position: absolute;
        top: 0;
        left: 0;
        transform-origin: left;
        transition: transform 0.5s;
        max-width: 100%;
        max-height: 100%;
    }

    .front-content,
    .back-content {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }

    .front-content img {
        display: block;
        max-width: 100%;   /* escala proporcional */
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* Efeito de virar a página */
    .flipped .front,
    .flipped .back {
        transform: rotateY(-180deg);
    }

    /* Botões */
    button {
        border: none;
        background-color: transparent;
        cursor: pointer;
        margin: 5px;
        transition: transform 0.5s;
    }

    button:focus {
        outline: none;
    }

    button:hover i {
        color: #636363;
    }

    /* Ícones */
    i {
        font-size: 50px;
        color: gray;
    }

    /* Ordem das páginas empilhadas */
    #p1 { z-index: 3; }
    #p2 { z-index: 2; }
    #p3 { z-index: 1; }
    /* Se tiver mais páginas, ajuste dinamicamente via JS */

    /* Estilos para os contêineres dos botões */
    .prev-btn-container, .next-btn-container {
        position: fixed; /* Posição fixa em relação à tela */
        top: 50%; /* Centraliza verticalmente */
        transform: translateY(-50%); /* Ajuste fino para centralização vertical */
        z-index: 9999; /* Garante que fiquem acima de outros elementos */
    }

    .prev-btn-container {
        left: 20px; /* Distância da borda esquerda */
    }

    .next-btn-container {
        right: 20px; /* Distância da borda direita */
    }

    /* Estilos para os botões (opcional, mas recomendado) */
    #prev-btn, #next-btn {
        background: none;
        border: none;
        font-size: 3rem; /* Tamanho do ícone */
        color: white; /* Cor do ícone */
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    #prev-btn:hover, #next-btn:hover {
        transform: scale(1.1); /* Efeito de zoom ao passar o mouse */
    }
}
