/*
Theme Name: Repórter Nacional
Theme URI: https://rn.co.mz
Author: Repórter Nacional
Description: Tema premium. Grelhas 1/4 padronizadas para Desktop, Anti-Quebra Integrado e Rodapé Fixo Premium.
Version: 2.4.0
Text Domain: rn-theme
*/

:root {
    --primary-color: #0b1c54;
    --secondary-color: #d11a2a;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #f7fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* FIX DO RODAPÉ (Sticky Footer Imbatível) */
html, body { 
    height: 100%; 
    margin: 0; 
    padding: 0; 
}
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    line-height: 1.5; 
    overflow-x: hidden; 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

/* O "main" empurra tudo o resto para baixo */
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; margin-top: auto; width: 100%; background: #1a202c; color: #cbd5e0; }

a { color: var(--primary-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--secondary-color); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; width: 100%; }
.home-block-heading { font-size: 1.3rem; text-transform: uppercase; border-bottom: 2px solid var(--border-color); margin-bottom: 20px; padding-bottom: 5px; color: var(--primary-color); display: flex; }
.home-block-heading span { border-bottom: 2px solid var(--secondary-color); margin-bottom: -7px; padding-bottom: 5px; position: relative; font-weight: 800; }

.home-main-wrapper { margin-top: 25px; margin-bottom: 50px; }
.home-columns-layout { display: flex; gap: 30px; margin-top: 10px; }
.home-content-column { flex: 1; width: 100%; } 
.sidebar-area { width: 320px; flex-shrink: 0; }

/* CABEÇALHO */
.site-header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 1000; width: 100%; left: 0; right: 0; flex-shrink: 0; }
.header-top { background: var(--primary-color); color: var(--white); padding: 6px 0; font-size: 0.8rem; text-align: center; font-weight: 600; width: 100%; }
.header-main { padding: 15px 0; display: flex; justify-content: space-between; align-items: center; }

.site-title { font-size: 1.8rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.5px; margin: 0; }
.site-title a { color: var(--primary-color); }
.site-title span { color: var(--secondary-color); }

.rn-menu-toggle { background: transparent; border: none; cursor: pointer; display: flex; flex-direction: column; gap: 5px; padding: 5px; }
.rn-bar { width: 26px; height: 3px; background-color: var(--primary-color); border-radius: 3px; transition: 0.3s; }

.rn-search-trigger { background: transparent; border: none; cursor: pointer; color: var(--primary-color); padding: 5px; transition: color 0.2s; display: flex; align-items: center; justify-content: center; }
.rn-search-trigger:hover { color: var(--secondary-color); }

/* PÁGINA INICIAL */
.hero-prime-section { margin-bottom: 40px; }
.hero-prime-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.04); display: flex; flex-direction: column; }
.hero-prime-thumb img { width: 100%; height: auto; max-height: 480px; object-fit: cover; display: block; }
.hero-prime-content { padding: 25px; }
.hero-prime-title { font-size: 1.8rem; line-height: 1.2; margin-bottom: 12px; font-weight: 800; }
.hero-prime-title a { color: var(--primary-color); }
.hero-prime-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 12px; }
.hero-prime-excerpt { color: #4a5568; font-size: 1.05rem; }

.native-carousel-section { margin-bottom: 45px; }
.native-carousel-container { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 15px; }
.native-carousel-container::-webkit-scrollbar { height: 6px; }
.native-carousel-container::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 4px; }
.carousel-item-card { min-width: 250px; flex: 1; background: var(--white); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.03); scroll-snap-align: start; }
.carousel-item-thumb img { width: 100%; height: 180px; object-fit: cover; display: block; } 
.carousel-item-content { padding: 15px; }
.carousel-item-title { font-size: 1.05rem; line-height: 1.3; font-weight: 700; margin-bottom: 8px; height: 2.6em; overflow: hidden; }
.carousel-item-date { font-size: 0.8rem; color: var(--text-light); }

.home-cat-block { margin-bottom: 50px; }
.cat-grid-card { background: var(--white); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.cat-card-media-wrapper { position: relative; background: #000; overflow: hidden; }
.cat-card-thumb img { width: 100%; object-fit: cover; display: block; transition: transform 0.3s ease, opacity 0.3s; }
.cat-grid-card:hover .cat-card-thumb img { opacity: 0.85; transform: scale(1.03); }
.cat-card-info { padding: 15px; }
.cat-card-title { font-size: 0.95rem; font-weight: 700; line-height: 1.3; margin-bottom: 6px; height: 2.6em; overflow: hidden; }
.cat-card-date { font-size: 0.75rem; color: var(--text-light); }

/* MOBILE GRELHAS */
.layout-5-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.layout-5-cards .cat-grid-card:nth-child(1) { grid-column: 1 / -1; } 
.layout-5-cards .cat-grid-card:nth-child(1) .cat-card-thumb img { height: 220px; }
.layout-5-cards .cat-grid-card:nth-child(n+2) .cat-card-thumb img { height: 120px; }
.layout-5-cards .cat-grid-card:nth-child(n+2) .cat-card-title { font-size: 0.85rem; height: 3.8em; }

.layout-grid-eq { display: grid; grid-template-columns: 1fr; gap: 15px; }
.layout-grid-eq .cat-card-thumb img { height: 180px; }

.is-video-block { background: #111827; padding: 25px; border-radius: 8px; }
.is-video-block .home-block-heading { color: var(--white); border-bottom-color: #374151; }
.is-video-block .cat-grid-card { background: #1f2937; }
.is-video-block .cat-card-title a { color: var(--white); }
.is-video-block .cat-card-title a:hover { color: var(--secondary-color); }
.is-video-block .cat-card-date { color: #9ca3af; }
.video-play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(209, 26, 42, 0.95); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.5); transition: transform 0.2s ease; pointer-events: none; }
.video-play-overlay::before { content: "▶"; color: var(--white); font-size: 1.2rem; margin-left: 3px; }
.cat-grid-card:hover .video-play-overlay { transform: translate(-50%, -50%) scale(1.15); background: var(--secondary-color); }

.older-news-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.standard-card .cat-card-thumb img { height: 180px; }

/* PAGINAÇÃO */
.rn-pagination { margin-top: 40px; text-align: center; border-top: 1px solid var(--border-color); padding-top: 30px; }
.rn-pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.rn-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; background: var(--white); color: var(--text-color); border: 1px solid var(--border-color); border-radius: 4px; font-weight: 700; transition: all 0.2s; padding: 0 15px; }
.rn-pagination .page-numbers:hover { background: var(--bg-color); color: var(--primary-color); border-color: var(--primary-color); }
.rn-pagination .page-numbers.current { background: var(--primary-color); color: var(--white); border-color: var(--primary-color); }

.widget { background: var(--white); padding: 25px; border-radius: 6px; margin-bottom: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.widget-title { font-size: 1.15rem; color: var(--primary-color); margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--secondary-color); font-weight: 800; }
.widget ul { list-style: none; }
.widget li { padding: 12px 0; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; margin: 0; }
.widget li:last-child { border-bottom: none; padding-bottom: 0; }


/* =========================================================
   ESTILOS PREMIUM PARA O RODAPÉ (FOOTER)
========================================================= */
.footer-top-area { padding: 50px 0; border-top: 4px solid var(--primary-color); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }

.footer-widget .footer-title { color: var(--white); font-size: 1.2rem; margin-bottom: 20px; font-weight: 800; text-transform: uppercase; position: relative; padding-bottom: 10px; }
.footer-widget .footer-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--secondary-color); }

.footer-about { color: #a0aec0; font-size: 0.95rem; line-height: 1.6; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #a0aec0; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-links svg { color: var(--secondary-color); flex-shrink: 0; }

.footer-contact-info { list-style: none; padding: 0; margin: 0; }
.footer-contact-info li { display: flex; align-items: flex-start; gap: 10px; color: #a0aec0; margin-bottom: 15px; font-size: 0.95rem; line-height: 1.4; }
.footer-contact-info svg { color: var(--secondary-color); flex-shrink: 0; margin-top: 2px; }

.footer-bottom-area { background: #111827; padding: 20px 0; text-align: center; border-top: 1px solid #2d3748; }
.footer-bottom-area p { margin: 0; font-size: 0.9rem; color: #718096; }


/* =========================================================
   ESTILOS PREMIUM PARA A PÁGINA DO ARTIGO (SINGLE.PHP)
========================================================= */
.single-article-wrapper { background: var(--white); border-radius: 8px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); margin-bottom: 40px; }
.article-header { margin-bottom: 25px; }
.article-cat-label a { background: var(--secondary-color); color: var(--white); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; padding: 5px 12px; border-radius: 3px; display: inline-block; margin-bottom: 15px; }
.article-title { font-size: 2.5rem; line-height: 1.2; color: var(--primary-color); margin-bottom: 15px; font-weight: 900; letter-spacing: -0.5px; }
.article-subtitle { font-size: 1.2rem; color: #4a5568; font-weight: 400; line-height: 1.5; margin-bottom: 20px; border-left: 4px solid var(--border-color); padding-left: 15px; }
.article-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 12px 0; margin-bottom: 25px; font-size: 0.9rem; color: var(--text-light); }
.article-author-date strong a { color: var(--primary-color); }
.article-comments-count a { color: var(--secondary-color); font-weight: 600; }

.social-share-buttons { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; }
.social-share-buttons .share-text { font-weight: 700; font-size: 0.9rem; margin-right: 5px; }
.share-btn { padding: 6px 14px; color: var(--white) !important; font-size: 0.85rem; font-weight: 600; border-radius: 4px; transition: opacity 0.2s; }
.share-btn:hover { opacity: 0.85; }
.share-btn.whatsapp { background-color: #25D366; }
.share-btn.facebook { background-color: #1877F2; }
.share-btn.twitter { background-color: #1DA1F2; }

.article-featured-image { margin-bottom: 30px; }
.article-featured-image img { width: 100%; height: auto; border-radius: 6px; display: block; }
.article-featured-image figcaption { font-size: 0.85rem; color: var(--text-light); text-align: center; margin-top: 10px; font-style: italic; }

.article-content { font-size: 1.15rem; line-height: 1.8; color: #1a202c; }
.article-content p { margin-bottom: 25px; }
.article-content h2 { font-size: 1.8rem; color: var(--primary-color); margin: 35px 0 15px; font-weight: 800; }
.article-content h3 { font-size: 1.5rem; color: var(--primary-color); margin: 30px 0 15px; font-weight: 700; }
.article-content a { color: var(--secondary-color); text-decoration: underline; }
.article-content ul, .article-content ol { margin-bottom: 25px; padding-left: 20px; }
.article-content li { margin-bottom: 10px; }
.article-content blockquote { font-size: 1.3rem; font-style: italic; color: var(--primary-color); border-left: 5px solid var(--secondary-color); padding: 15px 25px; background: #f8fafc; margin: 30px 0; border-radius: 0 6px 6px 0; }
.article-content iframe { width: 100%; max-width: 100%; height: auto; aspect-ratio: 16/9; border-radius: 8px; margin: 20px 0; }

.author-box { display: flex; align-items: center; gap: 20px; background: var(--bg-color); padding: 25px; border-radius: 8px; margin-top: 40px; border-left: 4px solid var(--primary-color); }
.author-avatar img { border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.author-info h4 { font-size: 1.1rem; color: var(--primary-color); margin-bottom: 5px; }
.author-info p { font-size: 0.95rem; color: var(--text-light); margin: 0; line-height: 1.5; }

.related-posts-section { margin-top: 40px; border-top: 2px solid var(--border-color); padding-top: 30px; }


/* =========================================================
   6. RESPONSIVIDADE ADAPTATIVA (COMPUTADOR / TABLET / MOBILE)
========================================================= */

@media (min-width: 768px) {
    .hero-prime-card { flex-direction: row; }
    .hero-prime-thumb { flex: 1.3; }
    .hero-prime-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 35px; }
    .hero-prime-title { font-size: 2.3rem; }
    
    .native-carousel-container { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
    .older-news-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

    /* Layout Premium 1/4 Expandido no Desktop */
    .layout-5-cards { grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: auto auto; }
    .layout-5-cards .cat-grid-card:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
    .layout-5-cards .cat-grid-card:nth-child(1) .cat-card-thumb img { height: 100%; min-height: 400px; }
    .layout-5-cards .cat-grid-card:nth-child(n+2) .cat-card-thumb img { height: 130px; }
    
    .layout-grid-eq { grid-template-columns: repeat(3, 1fr); }

    /* Footer Responsivo */
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .home-columns-layout { flex-direction: column; }
    .sidebar-area { width: 100%; }
}

@media (max-width: 767px) {
    .site-title { font-size: 1.5rem; }
    .hero-prime-title { font-size: 1.5rem; }
    .older-news-grid { grid-template-columns: 1fr; }
    .single-article-wrapper { padding: 15px; }
    .article-title { font-size: 1.8rem; }
    .article-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
    .author-box { flex-direction: column; text-align: center; }
}

@media (min-width: 500px) and (max-width: 767px) { 
    .older-news-grid { grid-template-columns: 1fr 1fr; } 
}
