/* Importação de fontes */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

/* Reset básico */
* {
    font-family: 'Roboto', sans-serif;
    scrollbar-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #d4cab0;
    color: black;
    line-height: 1.6;
}

.container {
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    height: 130px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    height: auto;
}

.logo img {
    height: 60px;
    /* altera para o tamanho ideal */
    max-width: 100%;
    width: auto;
    object-fit: contain;
}


.search-bar {
    display: flex;
    flex-grow: 1;
    max-width: 400px;
    background-color: #fff;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    overflow: hidden;
}

.search-bar input {
    border: none;
    padding: 8px 15px;
    flex-grow: 1;
    outline: none;
    font-size: 0.9em;
}

.search-bar button {
    background-color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button:hover {
    color: yellow;
}

.icones {
    display: flex;
    gap: 15px;
}

.icones a {
    text-decoration: none;
    display: flex;
    align-items: center;
    color: black;
}

.icones a:hover {
    color: yellow;
}

/* Main Navigation */
.main-nav {
    background-color: #4c372a;
    padding: 10px 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #d4cab0;
    font-size: x-large;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.main-nav a.active {
    color: yellow;
    border-bottom: 2px solid yellow;
}

.main-nav a:hover {
    color: yellow;
}

.banner img {
    width: 100%
}

/* Sections */
.section {
    margin: 30px 0;
    padding: 20px;
    background-color: #a79d85;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgb(0, 0, 0);
}

.section-title {
    display: flex;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid black;
    padding-bottom: 10px;
}

/* Book Lists (Carrossels) */
.book-list {
    display: flex;
    align-items: center;
    overflow-x: auto;
    /* Para permitir scroll em telas menores */
    -webkit-overflow-scrolling: touch;
    /* Melhor rolagem em iOS */
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar for IE and Edge */
    gap: 30px;
    /* Espaçamento entre os livros */
    padding-bottom: 10px;
    /* Para evitar que a sombra das setas corte a imagem */
}

.book-list::-webkit-scrollbar {
    /* Hide scrollbar for Chrome, Safari and Opera */
    display: none;
}

.book-card {
    flex: 0 0 auto;
    /* Não cresce, não encolhe, mantém o tamanho base */
    width: 150px;
    /* Largura padrão da capa */
    height: 200px;
    /* Altura padrão da capa */
    border-radius: 5px;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.book-card:hover {
    transform: translateY(-5px);
}

.book-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Garante que a imagem preencha o espaço sem distorcer */
    display: block;
}

.arrow {
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    font-size: 2em;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    position: sticky;
    /* Sticky para tentar manter as setas visíveis ao rolar */
    left: 0;
    right: 0;
    top: 50%;
    /* Centraliza verticalmente */
    transform: translateY(-50%);
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    line-height: 1;
    /* Alinha o texto */
    flex-shrink: 0;
    /* Impede que a seta encolha */
}

.arrow:hover {
    background-color: rgb(0, 0, 0);
}

.left-arrow {
    margin-right: -20px;
    /* Sobrepõe um pouco para a seta ficar sobre o conteúdo */
    left: 0;
}

.right-arrow {
    margin-left: -20px;
    /* Sobrepõe um pouco para a seta ficar sobre o conteúdo */
    right: 0;
}

/* Book Grid (Favoritos da Comunidade) */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    /* 150px é o min-width para as colunas */
    gap: 15px;
}

.book-placeholder {
    width: 100px;
    height: 150px;
    background-color: red;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Estilos para o Modal (Pop-up) */
.modal {
    display: none;
    /* Oculta o modal por padrão */
    position: fixed;
    /* Fixa o modal na tela */
    z-index: 1000;
    /* Garante que fique acima de outros elementos */
    left: 0;
    top: 0;
    width: 100%;
    /* Largura total */
    height: 100%;
    /* Altura total */
    overflow: auto;
    /* Adiciona scroll se o conteúdo for muito grande */
    background-color: rgba(0, 0, 0, 0.6);
    /* Fundo escuro transparente (overlay) */
    justify-content: center;
    /* Centraliza horizontalmente */
    align-items: center;
    /* Centraliza verticalmente */
    padding: 20px;
    /* Espaçamento interno para evitar que o modal toque as bordas */
}

.conteudo-livros {
    background-color: #fefefe;
    margin: auto;
    /* Ajuda na centralização */
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    /* Largura padrão */
    max-width: 800px;
    /* Largura máxima para telas grandes */
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    border-radius: 8px;
    position: relative;
    /* Para posicionar o botão de fechar */
    display: flex;
    /* Para layout do corpo do modal */
    flex-direction: column;
    /* Conteúdo em coluna por padrão */
}

.btn-fechar {
    color: #aaa;
    float: right;
    font-size: 36px;
    font-weight: bold;
    position: absolute;
    /* Posição absoluta dentro do conteudo-livros */
    top: 10px;
    right: 20px;
    cursor: pointer;
    z-index: 1001;
    /* Acima do conteúdo */
}

.btn-fechar:hover,
.btn-fechar:focus {
    color: #333;
    text-decoration: none;
}

.btn-read-book {
    background-color: #007bff; /* Cor verde, ou escolha sua cor preferida */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: inline-block; /* Garante que se comporte como um botão */
}

.btn-read-book:hover:not(.disabled-button) {
    background-color: #0066d3;
}

/* Estilo para o estado desabilitado do botão "Ler Livro" */
.btn-read-book.disabled-button {
    background-color: #cccccc; /* Cor cinza para desabilitado */
    cursor: not-allowed;
    opacity: 0.6;
}

/* Estilo para a mensagem de "indisponível" */
.unavailable-message {
    color: #888;
    font-size: 0.85rem;
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
}

.modal-body {
    display: flex;
    /* Para organizar imagem e informações lado a lado */
    gap: 25px;
    /* Espaço entre a imagem e o texto */
    align-items: center;
    /* Centraliza a imagem e o texto */
    text-align: center;
    flex-wrap: wrap;
    /* Permite que os itens quebrem a linha em telas menores */
    margin-top: 20px;
    /* Espaço abaixo do título/botão de fechar */
}

.modal-btn {
    display: flex;
    /* Usa flexbox para organizar os botões */
    justify-content: center;
    /* Centraliza os botões horizontalmente */
    gap: 15px;
    /* Espaçamento entre os botões */
    margin-top: 20px;
    /* Espaço acima dos botões */
    padding-right: 135px;
    flex-wrap: wrap;
    /* Permite que os botões quebrem a linha em telas menores */
}

/* Estilo para o botão primário (já deve ter algo parecido) */
.btn-primary {
    display: inline-block;
    /* Garante que o padding e margin funcionem como esperado */
    background-color: #4CAF50;
    /* Verde */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    margin-left: 15%;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #45a049;
}

/* Estilo para o novo botão secundário (remover) */
.btn-secondary {
    display: inline-block;
    background-color: #f44336;
    /* Vermelho */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    /* Em caso de ser um link, embora seja um botão */
    cursor: pointer;
    margin-left: 15%;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #da190b;
}

#link-google {
    background-color: #007bff;
}

/* Ajuste se necessário para o botão de preview, para que ele se comporte como os outros */
.btn-preview {
    display: inline-block;
    background-color: var(green, #007bff);
    /* Exemplo de cor azul, use a sua */
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-preview:hover {
    background-color: var(green, #0056b3);
}

/* Promoções e filtros */
.promotions-content {
    display: flex;
    gap: 30px;
    /* Espaçamento entre a sidebar e a grade de livros */
    padding: 20px 0;
    align-items: flex-start;
    /* Alinha o topo da sidebar com o topo do grid */
}

.filter-sidebar {
    flex: 0 0 250px;
    /* Largura fixa para a sidebar */
    padding: 20px;
    background-color: var(--card-bg-color, #f9f9f9);
    /* Cor de fundo da sidebar */
    border-radius: 8px;
}

.filter-sidebar h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.filter-group label {
    display: block;
    /* Cada checkbox em uma nova linha */
    margin-bottom: 8px;
    font-size: 0.95em;
    cursor: pointer;
}

.filter-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
    /* Um pouco maior para facilitar o clique */
    cursor: pointer;
}

/* Estilo para a grade de promoções */
.promotions-list {
    flex-grow: 1;
    /* Ocupa o restante do espaço disponível */
    min-height: 300px;
    /* Altura mínima para a seção */
}

/* Responsividade para a seção de promoções */
@media (max-width: 900px) {
    .promotions-content {
        flex-direction: column;
        /* Coloca sidebar e grid em coluna em telas menores */
        align-items: center;
        /* Centraliza itens */
    }

    .filter-sidebar {
        flex: 0 0 auto;
        /* Remove largura fixa */
        width: 90%;
        /* Ocupa mais largura */
        max-width: 400px;
        /* Limita a largura máxima */
        margin-bottom: 20px;
    }
}

.modal-body img {
    max-width: 200px;
    /* Tamanho da imagem da capa no modal */
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    /* Impede que a imagem encolha demais */
    display: block;
    /* Faz a imagem se comportar como um bloco */
    margin: 0 auto;
    /* Centraliza o bloco horizontalmente */
}

.modal-info {
    flex-grow: 1;
    /* Permite que o bloco de informações ocupe o espaço restante */
    min-width: 250px;
    /* Largura mínima para o bloco de informações */
}

.modal-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.modal-info p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.modal-info p strong {
    color: rgb(31, 30, 30);
}

.modal-info .btn-preview {
    display: inline-block;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

/* Animação para o modal
@keyframes animatemodal {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
} */

/* Media Queries para responsividade do modal */
@media screen and (max-width: 768px) {
    .conteudo-livros {
        width: 95%;
        padding: 20px;
    }

    .modal-body {
        flex-direction: column;
        /* Empilha a imagem e o texto em telas menores */
        align-items: center;
        /* Centraliza a imagem e o texto */
        text-align: center;
        gap: 15px;
    }

    .modal-body img {
        max-width: 150px;
        /* Reduz o tamanho da imagem em telas menores */
    }
}

/* Responsividade Básica */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        align-items: center;
        justify-content: center;
    }

    .header {
        height: 300px;
    }

    .search-bar {
        width: 100%;
        max-width: none;
    }

    .icones {
        width: 100%;
        justify-content: space-around;
    }

    .main-nav ul {
        justify-content: space-around;
        gap: 10px;
    }

    .main-nav a {
        font-size: 0.9em;
    }

    .section-title {
        font-size: 1.3em;
    }

    .book-list {
        padding-bottom: 0;
        /* Remove padding para não cortar a seta */
        margin: 0 -15px;
        /* Ajusta margem para estender para as bordas */
        padding: 0 15px;
        /* Adiciona padding interno */
    }

    .arrow {
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.8;
        /* Torna as setas um pouco transparentes em telas menores */
    }

    .left-arrow {
        left: 5px;
        margin-right: 0;
    }

    .right-arrow {
        right: 5px;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5em;
    }

    .header {
        height: 300px;
    }

    .icones {
        font-size: 0.9em;
    }

    .book-card,
    .book-placeholder {
        width: 80px;
        height: 120px;
    }

    .book-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-title {
        text-align: center;
    }

    .conteudo-livros {
        width: 100%;
        padding: 20px;
    }

    .modal-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .modal-body img {
        max-width: 150px;
        /* Reduz o tamanho da imagem em telas menores */
    }
    .btn-read-book{
        width: 90%;
    }

    .promotions-content {
        flex-direction: column;
        /* Coloca sidebar e grid em coluna em telas menores */
        align-items: center;
        /* Centraliza itens */
    }

    .login-container h1 {
        text-align: center;
    }
}

.hidden {
    display: none !important;
    /* Use !important para garantir que sobrescreva outros estilos */
}



.avatar-grid img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}



/* Estilos para a página de perfil */
.profile-container {
    display: flex;
    height: 100vh;
    font-family: 'Roboto', sans-serif;
    background-color: #f7f3e9;
    color: #3b2f1d;
}

.profile-sidebar {
    background-color: #c6b48b;
    padding: 25px 15px;
    width: 230px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-right: 2px solid #a18a62;
    box-shadow: 4px 0 6px rgba(0, 0, 0, 0.05);
}

.profile-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
    border: 3px solid #8a785c;
}

.profile-section {
    display: none;
}

.profile-section.active {
    display: block;
}

/* Estilos para formulário de perfil */
.profile-form input,
.profile-form textarea {
    display: block;
    margin-bottom: 20px;
    padding: 12px;
    font-size: 16px;
    width: 100%;
    max-width: 450px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fffef9;
    box-sizing: border-box;
}

.profile-form button {
    padding: 10px 20px;
    background-color: #4a3924;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.profile-form button:hover {
    background-color: #5e4429;
}

/* Estilos para botões da sidebar */
.sidebar-button {
    background: none;
    border: none;
    font-size: 15px;
    text-align: left;
    font-weight: bold;
    cursor: pointer;
    color: #4a3924;
    padding: 8px 5px;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-button:hover {
    background-color: #e9dec4;
    transform: translateX(3px);
    border-radius: 6px;
}

.back-button {
    margin-top: auto;
    color: #a00;
    font-weight: bold;
}

/* Estilos para a página de login */





/* Estilos para o logo na página principal */
.main-logo {
    height: 140px;
    width: 160px;
}

#google-preview iframe {
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  margin-top: 16px;
  background-color: white;
  transition: all 0.3s ease-in-out;
}

#google-preview iframe:hover {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

#google-preview {
  padding: 12px;
  background-color: #f8f8f8;
  border-radius: 12px;
}
