/* =======================
   Variáveis de Cores
   ======================= */
:root {
    --primary: #000000;    /* Cor principal (preto) */
    --secondary: #FF6B00;  /* Cor secundária (laranja) */
    --light: #ffffff;      /* Cor clara (branco) */
    --dark: #222222;       /* Cor escura */
    --accent: #FF6B00;     /* Cor de destaque */
}

/* =======================
   Estilo Base do Body
   ======================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background-color: #ffffff; /* Cor de fundo padrão */
    color: #000000;            /* Cor do texto padrão */
    transition: background-color 0.3s, color 0.3s;
}

/* =======================
   Botão de Tema Noturno
   ======================= */
.dark-mode-toggle {
    background-color: transparent;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 12px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: background-color 0.4s, color 0.4s, transform 0.2s;
    z-index: 1050; /* Garantir que fique acima do menu */
}

.dark-mode-toggle:hover {
    transform: scale(1.05);
}

/* =======================
   Botão Hambúrguer Animado
   ======================= */
.navbar-toggler {
    display: flex;
                    margin-left: 60%;

    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1050;
}

.navbar-toggler span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Transformar hambúrguer em X quando ativo */
.navbar-toggler.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggler.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =======================
   Modo Noturno
   ======================= */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .text-center,
body.dark-mode .card-title,
body.dark-mode .card-text {
    color: #ffffff;
}

body.dark-mode .py-5 {
    background-color: #000000 !important;
}

/* =======================
   Navbar e Alinhamento de Botões
   ======================= */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 9px;
}

.navbar-buttons {
    display: flex;
    align-items: center;
    gap: 10px; /* Espaço entre o botão de tema e o hambúrguer */
}

/* =======================
   Logo
   ======================= */
.navbar-brand img {
    height: 50px;
}

/* =======================
   Seção Hero
   ======================= */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)),
        url('./book/banner.jpg') no-repeat center center;
    background-size: cover;
    height: 80vh;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--accent);
}

.hero-content {
    max-width: 600px;
}

/* =======================
   Botões Primários
   ======================= */
.btn-primary {
    background-color: var(--accent);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #E05E00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,107,0,0.3);
}

/* =======================
   Títulos de Seção
   ======================= */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 3px;
    background-color: var(--accent);
    bottom: -10px;
    left: 0;
    transform: skewX(-15deg);
}

/* =======================
   Cartões em Destaque
   ======================= */
.featured-card {
    padding: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.card-img-top {
    height: 300px;
    object-fit: cover;
}

/* Badge de novidade */
.badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--secondary);
}

/* =======================
   Catálogo
   ======================= */
.catalog-item {
    margin-bottom: 30px;
    transition: transform 0.3s;
}

.catalog-item:hover {
    transform: scale(1.05);
}

/* =======================
   Seções Sobre e Contato
   ======================= */
.about-section {
    background-color: var(--light);
    padding: 80px 0;
}

.contact-section {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)),
        url('https://storage.googleapis.com/workspace-0f70711f-8b4e-4d94-86f1-2a93ccde5887/image/1655759b-4422-4b3f-97a8-63331e122e6e.png') no-repeat center center;
    background-size: cover;
    color: white;
    padding: 80px 0;
}

/* =======================
   Formulários
   ======================= */
.form-control {
    border-radius: 0;
    padding: 12px;
    margin-bottom: 15px;
}

/* =======================
   Footer
   ======================= */
footer {
    background-color: var(--dark);
    color: white;
    padding: 40px 0;
}

.social-icons a {
    color: white;
    font-size: 24px;
    margin-right: 15px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--secondary);
}

/* =======================
   Cards de Autor
   ======================= */
.author-card {
    padding: 25px;
    transition: all 0.3s;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    margin: 0 15px;
}

.author-card:hover {
    transform: translateY(-5px);
}

.author-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 3px solid var(--accent);
    margin-bottom: 20px;
}

/* =======================
   Botão Voltar ao Topo
   ======================= */
.back-to-top {
    position: fixed;
    bottom: 120px;
    right: 20px;
    background-color: var(--secondary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 9999999;
    cursor: pointer;
    font-size: 24px; /* tamanho da seta */
}

/* Animação da seta */
.back-to-top i {
    display: inline-block;
    animation: bounce 1s infinite;
}

/* Animação "bounce" */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}


.back-to-top.active {
    opacity: 1;
}

/* =======================
   Responsividade
   ======================= */
@media (max-width: 768px) {
    .hero-section {
        height: 60vh;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .section-title {
        margin-bottom: 20px;
    }
}
