/* 
   ÁFRICA NA HISTÓRIA - JW STYLE MINIMALISM
*/

:root {
    --jw-blue: #4A6DA7; /* Tom de azul clássico institucional */
    --brand-teal: #43A5B1;
    --brand-teal-dark: #368a94;
    --brand-yellow: #FDB913;
    --bg-gray: #F4F4F4;
    --bg-soft: #f8f9fa;
    --text-dark: #333333;
    --text-muted: #666666;
    --white: #FFFFFF;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-teal { color: var(--brand-teal) !important; }
.bg-teal { background-color: var(--brand-teal) !important; }

.btn-teal {
    background-color: var(--brand-teal);
    border-color: var(--brand-teal);
    color: #fff;
    transition: var(--transition);
}

.btn-teal:hover {
    background-color: var(--brand-teal-dark);
    border-color: var(--brand-teal-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 165, 177, 0.3);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header & Nav */
.nav-link-jw {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.2s;
}

.nav-link-jw:hover {
    color: var(--brand-teal);
}

/* Sections */
section {
    padding: 60px 0;
}

.bg-gray-section {
    background-color: var(--bg-gray);
}

/* Banner Principal estilo JW */
.hero-jw {
    background: #000;
    color: #FFF;
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: center;
}

.hero-jw img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.hero-content-jw {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

/* Tags de Categoria (O segredo do JW) */
.category-tag {
    display: inline-block;
    padding: 2px 10px;
    background-color: var(--brand-teal);
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Cards de Artigos estilo JW (Flat & Clean) */
.post-card-jw {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 30px;
    transition: 0.3s;
}

.post-card-jw:hover {
    opacity: 0.8;
}

.post-img-jw {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--bg-gray);
    margin-bottom: 15px;
}

.post-title-jw {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt-jw {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Botões */
.btn-jw {
    background-color: var(--brand-teal);
    color: #FFF;
    font-weight: 700;
    padding: 10px 25px;
    border-radius: 4px;
    border: none;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn-jw:hover {
    background-color: var(--brand-dark);
}

/* Cards de Eras estilo JW */
.era-card-jw {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 10px;
    background: var(--white);
    border: 1px solid #eee;
    text-decoration: none;
    color: var(--text-dark);
    transition: 0.3s;
    height: 100%;
}

.era-card-jw img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: 0.3s;
}

.era-card-jw span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.era-card-jw:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.era-card-jw:hover img {
    transform: scale(1.1);
}

/* Cards Multimídia estilo JW */
.multimedia-card-jw {
    display: block;
    padding: 30px;
    background: var(--bg-gray);
    text-decoration: none;
    color: var(--text-dark);
    transition: 0.3s;
    height: 100%;
}

.multimedia-card-jw img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: 0.3s;
}

.multimedia-card-jw h6 {
    font-weight: 700;
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.multimedia-card-jw:hover {
    background: var(--brand-teal);
    color: #FFF;
}

.multimedia-card-jw:hover img {
    filter: brightness(0) invert(1);
    transform: translateY(-5px);
}

/* Footer estilo JW */
#main-footer {
    background: var(--bg-gray);
    border-top: 1px solid #e0e0e0;
    padding: 60px 0 30px;
}

.footer-links-jw li {
    margin-bottom: 12px;
}

.footer-links-jw a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: 0.2s;
}

.footer-links-jw a:hover {
    color: var(--brand-teal);
    text-decoration: underline;
}

/* Modal de Busca Custom */
.modal-content {
    border-radius: 8px;
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--brand-teal);
}

/* LIVE SEARCH SUGGESTIONS */
#live-search-results {
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 12px;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    border-radius: 8px;
    margin-bottom: 5px;
}

.search-suggestion-item:hover {
    background-color: var(--bg-soft);
    transform: translateX(5px);
}

.search-suggestion-img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    background-color: #eee;
}

.search-suggestion-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PREMIUM HEADER MOBILE */
@media (max-width: 991px) {
    header.header-glass {
        height: auto;
        min-height: 70px;
        display: flex;
        align-items: center;
    }
    
    .container-header-mobile {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        position: relative;
    }

    .header-logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0 !important;
        z-index: 5;
    }
    
    .logo-img {
        height: 48px !important;
        width: auto;
    }

    /* Ajuste do botão de busca mobile */
    .container-header-mobile .btn-light {
        position: relative;
        z-index: 10;
    }
}
/* Layout de Duas Colunas (Artigo + Sidebar) */
.article-body-jw {
    padding-right: 20px;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.adsense-placeholder {
    background-color: #fafafa;
}

.sidebar-item {
    transition: 0.2s;
}

.sidebar-item:hover h6 {
    color: var(--brand-teal);
}

.sidebar-item img {
    border-radius: 4px;
}

.x-small {
    font-size: 0.65rem;
}

.sidebar-menu-jw li {
    transition: 0.2s;
}

.sidebar-menu-jw li:hover {
    background-color: var(--bg-soft);
}

.sidebar-menu-jw li.active {
    background-color: var(--bg-soft);
    border-left: 4px solid var(--brand-teal);
}

.sidebar-menu-jw a {
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-menu-jw i {
    width: 20px;
    text-align: center;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #FFFFFF;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 0.7rem;
    font-weight: 500;
    transition: 0.2s;
}

.mobile-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
    color: var(--brand-teal);
}

@media (max-width: 991px) {
    body {
        padding-bottom: 70px; /* Evita que o conteúdo fique atrás da barra */
    }
}

.btn-teal {
    background-color: var(--brand-teal);
    border-color: var(--brand-teal);
    color: var(--white);
    transition: var(--transition);
}

.btn-teal:hover {
    background-color: #368a94;
    border-color: #368a94;
    color: var(--white);
    transform: translateY(-2px);
}

.play-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(67, 165, 177, 0.3);
}

.episode-card {
    transition: var(--transition);
    border-left: 0 solid var(--brand-teal) !important;
}

.episode-card:hover {
    transform: translateX(10px);
    border-left: 5px solid var(--brand-teal) !important;
}

.video-item-card {
    cursor: pointer;
    transition: var(--transition);
}

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

.video-overlay-play {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.video-item-card:hover .video-overlay-play {
    opacity: 1;
}

/* Estilos de Interatividade Refinada */
.interactive-card-jw {
    background: var(--white);
    padding: 50px 30px;
    border-radius: 12px;
    border: 1px solid #eef0f2;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.interactive-card-jw:hover {
    transform: translateY(-10px);
    border-color: var(--brand-teal);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important;
}

.icon-box-jw {
    width: 110px;
    height: 110px;
    background: #FFFFFF; /* Fundo branco para mesclar com as imagens */
    border: 1px solid #EEE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: var(--transition);
    padding: 15px;
}

.custom-icon-jw {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.interactive-card-jw:hover .icon-box-jw {
    background: var(--bg-soft);
    border-color: var(--brand-teal);
}

.interactive-card-jw:hover .custom-icon-jw {
    transform: scale(1.15) rotate(5deg);
}

.transition-all {
    transition: all 0.3s ease;
}

/* Estilos de Leitura do Artigo (Best Practices) */
.jw-typography {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    text-align: justify; /* Melhora a mancha de texto para leitura longa */
}

/* Drop Cap (Capitular) para o primeiro parágrafo */
.jw-typography > p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    float: left;
    line-height: 1;
    margin-right: 10px;
    color: var(--brand-teal);
    font-family: 'Georgia', serif;
}

.jw-typography h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brand-teal);
    border-left: 5px solid var(--brand-teal);
    padding-left: 15px;
    margin-top: 50px;
    margin-bottom: 25px;
}

.jw-typography h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #444;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* Blockquote Estilizado */
.jw-typography blockquote {
    border: none;
    background: #f9f9f9;
    padding: 30px;
    border-left: 10px solid var(--brand-teal);
    font-style: italic;
    font-size: 1.2rem;
    color: #555;
    margin: 40px 0;
    position: relative;
}

.jw-typography blockquote::before {
    content: "“";
    font-size: 5rem;
    color: rgba(67, 165, 177, 0.1);
    position: absolute;
    top: -10px;
    left: 10px;
}

/* Imagens Injetadas Inteligentes (Estilo Mini-Card) */
.injected-image-container {
    margin: 40px 0;
    background: #fdfdfd;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 15px;
    border-left: 4px solid var(--brand-teal) !important;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.injected-image-container:hover {
    background: #f9f9f9;
    transform: translateX(5px);
}

.injected-image-thumb {
    flex-shrink: 0;
    width: 150px;
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
}

.injected-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.injected-image-content {
    flex-grow: 1;
}

.injected-image-caption {
    background: transparent;
    padding: 0;
    border: none;
    font-size: 0.95rem;
    color: #333;
}

.injected-image-caption strong {
    color: var(--brand-teal);
    font-size: 0.75rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.injected-image-caption a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
}

.injected-image-caption p {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
}

@media (max-width: 576px) {
    .injected-image-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .injected-image-thumb {
        width: 100%;
        height: 150px;
    }
}

/* Destaque de Texto */
.text-highlight {
    background: linear-gradient(120deg, rgba(253, 185, 19, 0.2) 0%, rgba(253, 185, 19, 0.2) 100%);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Lista Refinada */
.jw-typography ul, .jw-typography ol {
    padding-left: 20px;
    margin-bottom: 30px;
}

.jw-typography li {
    margin-bottom: 12px;
}

.article-title-jw {
    font-size: 2.8rem;
    line-height: 1.15;
    overflow-wrap: break-word;
    word-wrap: break-word;
    font-weight: 800;
}

@media (max-width: 768px) {
    .jw-typography {
        font-size: 1.05rem;
        text-align: left;
    }
    .jw-typography > p:first-of-type::first-letter {
        font-size: 3rem;
    }
    .article-title-jw {
        font-size: 1.8rem !important;
        line-height: 1.3;
    }
}

.jw-typography img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 30px 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #ccc;
    font-size: 1.2rem;
    line-height: 1;
}

/* RESPONSIVIDADE ADICIONAL (FIX MOBILE) */
@media (max-width: 767px) {
    /* Ajuste de Títulos Gerais */
    h1, .display-4 {
        font-size: 1.8rem;
        line-height: 1.25;
        overflow-wrap: break-word;
    }
    
    .hero-content-jw {
        padding: 20px;
        text-align: center;
    }
    
    .post-title-jw {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    /* Ajuste de Espaçamento */
    .row.g-5 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 2rem;
    }

    /* Cards Interativos */
    .interactive-card-jw {
        padding: 30px 20px;
    }

    .icon-box-jw {
        width: 80px;
        height: 80px;
        padding: 10px;
    }

    /* Mapa na Home */
    #africa-map-container svg {
        max-height: 450px;
    }

    /* Padding de Seções */
    section {
        padding: 40px 0;
    }

    /* Botão Flutuante (Prevenção de sobreposição) */
    .mobile-bottom-nav {
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    }
}

/* Ajuste fino para telas muito pequenas */
@media (max-width: 380px) {
    .post-title-jw {
        font-size: 1.1rem;
    }
    
    .logo-img {
        height: 38px !important;
    }
}
