/*
Theme Name: Fieeditorial
Theme URI: 
Author: Seu Nome
Author URI: 
Description: Um tema WordPress personalizado focado em livros e coleções.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fieeditorial
*/

/* Variáveis de Cor / Design System */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #4b5563;
    --bg-color: #f9fafb;
    --text-color: #111827;
    --border-color: #e5e7eb;
    --white: #ffffff;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   HEADER & FOOTER
   ========================================= */
header.site-header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-branding h1 {
    margin: 0 0 5px;
    font-size: 2rem;
}

.site-branding h1 a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
}

.site-branding .custom-logo {
    max-height: 80px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.site-branding p {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1rem;
}

/* Navegação Principal */
.main-navigation ul.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.main-navigation ul.nav-list li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s;
}

.main-navigation ul.nav-list li a:hover,
.main-navigation ul.nav-list li.current-menu-item a {
    color: var(--primary-color);
}

footer.site-footer {
    background: #1f2937;
    color: var(--white);
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

/* =========================================
   COMPONENTES GERIAS
   ========================================= */
.page-header {
    margin: 40px 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.taxonomy-description {
    color: var(--secondary-color);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   LIVROS (Archive & Taxonomia)
   ========================================= */
.livros-grid,
.livros-grid-front {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* ========================================= */
/* EFEITOS UI/UX: MICRO-INTERAÇÕES & ACESSIBILIDADE */
/* ========================================= */
.btn-primary:hover,
.btn-secondary:hover,
.btn-amazon:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-amazon:focus-visible,
.livro-card a:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 4px;
}

.livro-card,
.livro-card-reduzido {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.livro-card:hover,
.livro-card-reduzido:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.livro-capa {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.livro-card:hover .livro-capa {
    transform: scale(1.03);
}

.livro-capa-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    border-radius: 4px;
    margin-bottom: 15px;
}

.livro-title {
    font-size: 1.2rem;
    margin: 0 0 10px;
    line-height: 1.4;
}

.livro-title a {
    color: var(--text-color);
    text-decoration: none;
}

.livro-title a:hover {
    color: var(--primary-color);
}

.livro-autor {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0;
}

/* =========================================
   SINGLE LIVRO
   ========================================= */
.single-livro-container {
    padding: 60px 20px;
}

.livro-detalhado {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .livro-detalhado {
        grid-template-columns: 300px 1fr;
    }
}

.livro-capa-grande {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 4px 8px 16px rgba(0, 0, 0, 0.15);
}

.livro-capa-placeholder-grande {
    width: 100%;
    aspect-ratio: 2/3;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    border-radius: 6px;
    font-size: 1.2rem;
}

.livro-titulo-principal {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.livro-autor-destaque {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.livro-taxonomias {
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.livro-taxonomias a {
    display: inline-block;
    background: var(--bg-color);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
}

.livro-taxonomias a:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.livro-sinopse h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* =========================================
   FRONT PAGE (Página Inicial)
   ========================================= */
.hero-section {
    background: var(--white);
    padding: 80px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 60px;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 40px;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.destaques-section {
    margin-bottom: 60px;
}

.ver-todos-container {
    text-align: center;
    margin-top: 30px;
}

.colecoes-section {
    background: var(--white);
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.colecoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.colecao-card {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.colecao-card h3 a {
    color: var(--text-color);
    text-decoration: none;
}

/* =========================================
   BLOG
   ========================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.blog-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.blog-capa {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-info {
    padding: 25px;
}

.blog-title {
    font-size: 1.4rem;
    margin: 0 0 10px;
}

.blog-title a {
    color: var(--text-color);
    text-decoration: none;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.blog-excerpt {
    margin-bottom: 20px;
}

.post-detalhado {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.post-imagem-destacada img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* =========================================
   PÁGINA INICIAL AVANÇADA (Home)
   ========================================= */

/* Hero Section */
.hero-vitrine {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: var(--white);
    padding: 80px 20px;
    margin-bottom: 60px;
}

.hero-vitrine-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.hero-imagem {
    text-align: center;
}

@media (min-width: 768px) {
    .hero-vitrine-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.badge-lancamento {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.hero-titulo-livro {
    font-size: 3rem;
    margin: 0 0 5px;
    font-family: 'Merriweather', serif;
    line-height: 1.1;
}

.hero-autor-livro {
    font-size: 1.25rem;
    color: #9ca3af;
    margin: 0 0 20px 0;
}

.hero-sinopse-curta {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #e5e7eb;
    margin-bottom: 30px;
}

.hero-botoes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-outline {
    display: inline-block;
    background: transparent;
    color: var(--white);
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--white);
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--white);
    color: #111827;
}

.capa-3d-effect {
    max-width: 100%;
    max-height: 450px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    transform: perspective(800px) rotateY(-15deg);
    box-shadow: -20px 20px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease;
}

.capa-3d-effect:hover {
    transform: perspective(800px) rotateY(-5deg) scale(1.05);
}

/* Manifesto Section */
.manifesto-section {
    max-width: 800px;
    margin: 0 auto 80px;
    text-align: center;
    padding: 0 20px;
}

.manifesto-titulo {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.manifesto-texto {
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 20px;
}

.manifesto-assinatura {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Destaques (Header flex) */
.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-header-flex .section-title {
    margin: 0;
    text-align: left;
}

.link-veja-mais {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.link-veja-mais:hover {
    text-decoration: underline;
}

/* Autores Section */
.bg-cinza-claro {
    background: #f3f4f6;
    padding: 80px 0;
    margin-top: 60px;
}

.text-center {
    text-align: center;
}

.autores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.autor-perfil {
    text-align: center;
}

.autor-foto-circular {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autor-nome {
    font-size: 1.25rem;
    margin: 0 0 10px;
}

.autor-bio {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Newsletter Section */
.newsletter-clube-section {
    background: #111827;
    color: var(--white);
    padding: 80px 0;
}

.newsletter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 768px) {
    .newsletter-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.newsletter-info h2 {
    font-family: 'Merriweather', serif;
    font-size: 2.2rem;
    margin: 0 0 15px;
}

.newsletter-info p {
    color: #9ca3af;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-dark {
    background: #1f2937;
    border: 1px solid #374151;
    color: var(--white);
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.input-dark::placeholder {
    color: #6b7280;
}

.btn-block {
    width: 100%;
    font-size: 1.1rem;
    padding: 15px;
}

.spam-aviso {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
    margin-top: 15px;
}

/* Rodapé Ajustes */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: left;
    margin-bottom: 40px;
}

.footer-col h3,
.footer-col h4 {
    margin-top: 0;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    color: #6b7280;
    font-size: 0.9rem;
}

/* =========================================
   BOTÕES EXTERNOS DE COMPRA
   ========================================= */
.btn-amazon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f3a847;
    /* Laranja da Amazon */
    color: #111;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: 1px solid #a88734;
}

.btn-amazon:hover {
    background-color: #f0c14b;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.icon-amazon {
    margin-right: 10px;
    font-size: 1.3rem;
}

/* Auth Placeholder */
.autor-foto-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #9ca3af;
    margin-bottom: 20px;
    border: 4px solid var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* =========================================
   HERO SLIDER E PESQUISA
   ========================================= */
.search-field:focus {
    border-color: var(--primary-color) !important;
}

.search-submit:hover {
    background-color: var(--primary-hover) !important;
}

.hero-slide {
    display: none;
    animation: fadeEffect 0.6s ease-in-out;
}

.hero-slide.active-slide {
    display: block;
}

@keyframes fadeEffect {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 15px 20px;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 10;
}

.slider-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

.slider-control.prev {
    left: 20px;
}

.slider-control.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dots .dot.active,
.slider-dots .dot:hover {
    background-color: var(--white);
}

/* =========================================
   RODAPÉ AVANÇADO (FOOTER WIDGETS)
   ========================================= */
.site-footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 60px 0 20px 0;
    margin-top: 80px;
    font-size: 0.95rem;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget-column .widget-title {
    color: var(--white);
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-widget-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget-column ul li {
    margin-bottom: 10px;
}

.footer-widget-column ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-widget-column ul li a:hover {
    color: var(--white);
}

.site-info-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
}

.site-info-bottom p {
    margin: 0;
}

.footer-social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* =========================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ========================================= */

@media (max-width: 768px) {

    /* Header & Navegação */
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .site-branding p {
        display: none;
        /* Esconde descrição do site no mobile para não ocupar muito espaço */
    }

    .menu-toggle {
        display: block !important;
    }

    .main-navigation {
        display: none;
        width: 100%;
        margin-top: 15px;
        order: 3;
        /* Joga a nav para debaixo de tudo (logo e botão hamburger) */
    }

    .main-navigation.toggled-on {
        display: block;
        animation: fadeEffect 0.3s ease-in-out;
    }

    .main-navigation ul.nav-list {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    .main-navigation ul.nav-list li a {
        display: block;
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.1rem;
    }

    /* Hero Section (Slider Lançamentos Mobile) */
    .hero-vitrine {
        padding: 40px 15px 60px 15px;
        text-align: center;
    }

    .hero-vitrine-grid {
        display: flex;
        flex-direction: column;
    }

    .hero-texto {
        display: contents;
        /* Desagrupa o Container "texto" para misturá-lo com a imagem usando flex-order */
    }

    .badge-lancamento {
        order: 1;
        align-self: center;
        margin-bottom: 10px;
    }

    .hero-titulo-livro {
        order: 2;
        font-size: 2.2rem;
        margin-bottom: 5px;
    }

    .hero-autor-livro {
        order: 3;
        margin-bottom: 15px;
    }

    .hero-imagem {
        order: 4;
        margin: 15px 0 25px 0;
        /* Espaço generoso entre titulo e sinopse */
    }

    .hero-sinopse-curta {
        order: 5;
        margin-bottom: 25px;
    }

    .hero-botoes {
        order: 6;
        justify-content: center;
    }

    /* Manifesto */
    .manifesto-titulo {
        font-size: 1.6rem;
    }

    .manifesto-texto {
        font-size: 1.15rem;
    }

    /* Single Livro */
    .livro-detalhado {
        grid-template-columns: 1fr;
        /* Quebra as colunas para 1 só no celular */
        gap: 30px;
    }

    .livro-titulos h1 {
        font-size: 2rem;
    }

    .livro-capa-grande,
    .livro-capa-placeholder-grande {
        max-width: 250px;
    }

    /* Biografia de Autor na página do Livro */
    .bloco-biografia-autor {
        flex-direction: column;
        text-align: center;
    }

    /* Slider Controls Mobile */
    .slider-control {
        padding: 10px 15px;
        font-size: 18px;
    }

    .slider-control.prev {
        left: 5px;
    }

    .slider-control.next {
        right: 5px;
    }
}

@media (max-width: 480px) {

    /* Pequenos ajustes para telas bem pequenas */
    .livros-grid,
    .livros-grid-front,
    .autores-grid {
        grid-template-columns: 1fr;
        /* Os cards ficam um embaixo do outro ocupando todo o espaço */
    }

    .newsletter-info h2 {
        font-size: 1.8rem;
    }
}