/* =========================================
   VARIAVEIS E GERAL
   ========================================= */
:root {
    /* Paleta de Cores Premium */
    --wine-dark: #4a0e12;      /* Vinho Profundo */
    --wine-light: #7a1c22;     /* Vinho Avermelhado */
    --gold: #d4af37;           /* Dourado Clássico */
    --gold-light: #f3e5ab;     /* Dourado Pálido */
    --text-main: #2c2c2c;      /* Cinza Chumbo */
    --text-light: #666;        /* Cinza Médio */
    --bg-offwhite: #fdfbf7;    /* Papel Antigo Suave */
    --white: #ffffff;
    
    /* Tipografia */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-offwhite);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed; top: 0; width: 100%; padding: 1rem 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05); transition: all 0.3s ease;
}
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.logo {
    font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700;
    color: var(--wine-dark); text-decoration: none; letter-spacing: 1px;
}
.nav-links { list-style: none; display: flex; gap: 2rem; align-items: center; }
.nav-links a {
    text-decoration: none; color: var(--text-main); font-weight: 400; font-size: 0.95rem;
    transition: color 0.3s; text-transform: uppercase; letter-spacing: 1px;
}
.nav-links a:hover { color: var(--wine-light); }
.social-icon { color: var(--wine-light) !important; font-size: 1.2rem; }

/* Menu Mobile (Hambúrguer) */
.hamburger {
    display: none; cursor: pointer; flex-direction: column; gap: 5px; z-index: 1001;
}
.bar {
    width: 25px; height: 3px; background-color: var(--wine-dark);
    transition: all 0.3s ease; border-radius: 2px;
}
.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 90vh; display: flex; align-items: center;
    background: linear-gradient(135deg, #fdfbf7 50%, #f4eee0 100%);
    position: relative; padding-top: 80px;
}
.hero-content {
    max-width: 1200px; margin: 0 auto; display: flex; align-items: center;
    justify-content: space-between; padding: 0 20px; width: 100%; gap: 2rem;
}
.hero-text { flex: 1; max-width: 600px; }
.tagline {
    color: var(--gold); font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; font-size: 0.85rem; display: block; margin-bottom: 1rem;
}
.hero-text h1 {
    font-family: var(--font-serif); font-size: 3.5rem; line-height: 1.1;
    color: var(--wine-dark); margin-bottom: 1.5rem;
}
.hero-text p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; }

.btn {
    padding: 1rem 2rem; border-radius: 50px; text-decoration: none; font-weight: 700;
    transition: all 0.3s ease; letter-spacing: 0.5px; border: none; cursor: pointer; display: inline-block;
}
.btn-primary {
    background: var(--wine-light); color: #fff; box-shadow: 0 10px 20px rgba(122, 28, 34, 0.2);
}
.btn-primary:hover { background: var(--wine-dark); transform: translateY(-2px); }
.btn-outline {
    border: 2px solid var(--wine-light); color: var(--wine-light); background: transparent;
}
.btn-outline:hover { background: var(--wine-light); color: #fff; }

/* FOTO DO AUTOR (Clean & Colorida) */
.hero-img-wrapper {
    flex: 1; display: flex; justify-content: center; position: relative; z-index: 10;
}
.author-photo {
    width: 350px; height: 350px; object-fit: cover;
    border-radius: 50%; /* Círculo */
    border: none; /* Sem bordas */
    /* Sombra elegante e difusa */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 30px 60px rgba(74, 14, 18, 0.2);
    /* Colorida Sempre */
    filter: none; opacity: 1;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.author-photo:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 45px 80px rgba(74, 14, 18, 0.3);
}

/* =========================================
   LIVROS GRID
   ========================================= */
.books-section { padding-bottom: 4rem; }
.section-header { text-align: center; margin-bottom: 4rem; margin-top: 4rem; }
.section-header h2 { font-family: var(--font-serif); font-size: 2.5rem; color: var(--wine-dark); }
.separator { width: 60px; height: 3px; background: var(--gold); margin: 1rem auto; }

.books-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem; max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.book-card {
    background: #fff; border-radius: 15px; padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}
.book-card:hover { transform: translateY(-10px); }

.book-cover-3d {
    height: 300px; margin-bottom: 1.5rem; display: flex; justify-content: center;
    filter: drop-shadow(10px 10px 15px rgba(0,0,0,0.2));
}
.book-cover-3d img { height: 100%; width: auto; max-width: 100%; border-radius: 2px 5px 5px 2px; }

.book-details h3 { font-family: var(--font-serif); color: var(--wine-dark); margin-bottom: 0.2rem; }
.book-subtitle {
    display: block; font-size: 0.9rem; color: var(--text-light); font-style: italic;
    margin-bottom: 1rem; font-family: var(--font-serif);
}
.book-details p { font-size: 0.95rem; color: var(--text-light); margin-bottom: 1.5rem; }

.book-actions {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid #eee; padding-top: 1rem;
}
.btn-text {
    background: none; border: none; cursor: pointer; font-family: var(--font-sans);
    font-weight: 700; color: var(--wine-light); font-size: 0.9rem;
}
.btn-shop {
    background: var(--gold); color: #fff; padding: 0.5rem 1.2rem;
    border-radius: 4px; text-decoration: none; font-size: 0.85rem; font-weight: 700;
    transition: background 0.3s;
}
.btn-shop:hover { background: #bfa348; }

/* PLACEHOLDER (Para livros futuros) */
.book-placeholder {
    width: 200px; height: 100%; background-color: #f9f9f9;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1rem; border: 2px dashed var(--gold); border-radius: 5px;
    text-align: center; transition: all 0.3s ease;
}
.book-placeholder i { font-size: 2.5rem; color: var(--gold); opacity: 0.6; }
.book-placeholder span {
    font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem;
    color: var(--wine-light); text-transform: uppercase; letter-spacing: 1px;
}
.book-card:hover .book-placeholder {
    background-color: #fff8e1; border-color: var(--wine-light);
}

/* =========================================
   FOOTER & MODAL
   ========================================= */
footer {
    background: var(--wine-dark); color: #fff; padding: 3rem 0; text-align: center; margin-top: 5rem;
}
.footer-logo { font-family: var(--font-serif); font-size: 1.8rem; margin-bottom: 1rem; color: var(--gold); }
.footer-social a { color: var(--gold); text-decoration: none; margin-top: 1rem; display: inline-block; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 2000; backdrop-filter: blur(5px); }
.modal-content {
    background: #fff; margin: 5% auto; width: 90%; max-width: 700px;
    border-radius: 8px; position: relative; max-height: 85vh; overflow-y: auto;
}
.modal-header { background: var(--bg-offwhite); padding: 1.5rem; border-bottom: 1px solid #eee; }
.modal-body { padding: 2rem; font-family: var(--font-serif); font-size: 1.1rem; line-height: 1.8; color: #333; }
.close { position: absolute; right: 20px; top: 15px; font-size: 2rem; cursor: pointer; color: var(--text-light); }

.hidden-element { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.show-element { opacity: 1; transform: translateY(0); }

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        position: fixed; right: -100%; top: 0; height: 100vh; width: 75%; background: #fff;
        flex-direction: column; justify-content: center; box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease; z-index: 1000;
    }
    .nav-links.active { right: 0; }
    .nav-links li { margin: 1.5rem 0; }
    .nav-links a { font-size: 1.2rem; font-weight: 700; color: var(--wine-dark); }

    .hero { padding-top: 100px; padding-bottom: 3rem; }
    .hero-content { flex-direction: column-reverse; text-align: center; gap: 2rem; }
    .hero-text h1 { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; width: 100%; }
    .btn { width: 100%; display: block; text-align: center; }

    .author-photo {
        width: 260px; height: 260px; margin-bottom: 1rem;
        /* Mobile: Colorida, redonda, sem borda */
    }

    .books-grid { grid-template-columns: 1fr; gap: 2rem; }
    .book-cover-3d { height: 250px; }
    .book-actions { flex-direction: column; gap: 1rem; }
    .book-actions button, .book-actions a { width: 100%; text-align: center; padding: 0.8rem; }
    .btn-text { border: 1px solid var(--wine-light); border-radius: 4px; padding: 0.6rem; }
    .close { font-size: 2.5rem; background: rgba(255,255,255,0.9); width: 40px; height: 40px; text-align: center; line-height: 40px; border-radius: 50%; }
}
