/*
Theme Name: NCB v3
Theme URI: https://noticiascampobelo.com.br
Author: Jaime Rabello
Author URI: https://www.jaimerabello.com.br
Description: Tema oficial do Notícias Campo Belo — leve, responsivo e integrado à Vitrine NCB.
Version: 3.4.0
Requires PHP: 7.4
Text Domain: ncb
*/

:root{
  --ncb-red:#C8102E; --ncb-red-dark:#9C0B22; --ink:#14171A; --ink-soft:#3D444B;
  --paper:#FFFFFF; --bg:#F4F5F7; --line:#E4E7EB; --gray-bar:#EDEFF2;
  --display:'Barlow Condensed',Impact,sans-serif; --body:'Inter',system-ui,sans-serif;
}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:var(--body);background:var(--bg);color:var(--ink);font-size:15px;line-height:1.55}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
svg{display:block}
.wrap{max-width:1200px;margin:0 auto;padding:0 16px}

/* ===== SLOTS DE ANÚNCIO ===== */
.ncb-ad{display:flex;align-items:center;justify-content:center;overflow:hidden}
.ncb-ad img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.ncb-ad a{display:block;width:100%;height:100%}
.ncb-ad ins{width:100%}
.ncb-ad-empty{display:none}

/* ===== BARRA AGORA ===== */
.agora{background:var(--ncb-red);color:#fff;font-size:13px;overflow:hidden}
.agora .wrap{display:flex;align-items:center;gap:14px;height:36px}
.agora-tag{font-family:var(--display);font-weight:800;font-size:15px;letter-spacing:.08em;background:#fff;color:var(--ncb-red);padding:2px 10px;border-radius:3px;flex-shrink:0}
.ticker{white-space:nowrap;overflow:hidden;flex:1}
.ticker-track{display:inline-block;animation:tick 38s linear infinite;padding-left:100%}
.ticker-track a{margin-right:44px}
.ticker-track b{color:#FFD9DF;font-weight:600}
@keyframes tick{to{transform:translateX(-100%)}}

/* ===== BARRA CINZA ===== */
.utilbar{background:var(--gray-bar);border-bottom:1px solid var(--line);font-size:12.5px;color:var(--ink-soft)}
.utilbar .wrap{display:flex;align-items:center;justify-content:space-between;height:36px}
.util-left{display:flex;gap:18px;align-items:center}
.util-weather{display:flex;gap:6px;align-items:center;font-weight:600}
.util-weather small{font-weight:400;color:#8a919a}
.util-social{display:flex;gap:6px}
.util-social a{width:24px;height:24px;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#fff;transition:.15s}
.util-social a:hover{transform:translateY(-1px)}
.s-ig{background:linear-gradient(45deg,#F58529,#DD2A7B,#8134AF)}
.s-fb{background:#1877F2}.s-yt{background:#FF0000}.s-tk{background:#010101}.s-wa{background:#25D366}

/* ===== HEADER ===== */
.site-header{background:var(--paper)}
.header-main{display:flex;align-items:center;gap:22px;padding:14px 0}
.burger{width:46px;height:46px;border:1.5px solid var(--line);background:#fff;border-radius:10px;cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4.5px;flex-shrink:0}
.burger span{width:21px;height:2.5px;background:var(--ink);border-radius:2px}
.logo{display:flex;align-items:center;gap:11px;flex-shrink:0}
.logo img{width:auto;height:58px}
.logo-name{font-family:var(--display);font-weight:800;font-size:21px;line-height:.98;letter-spacing:.02em}
.ad-topo{margin-left:auto;width:728px;max-width:100%;height:90px}

/* ===== MENU VERMELHO ===== */
.mainmenu{background:var(--ncb-red);position:sticky;top:0;z-index:50;box-shadow:0 2px 10px rgba(200,16,46,.25)}
.mainmenu .wrap{display:flex;align-items:center;gap:8px}
.mainmenu ul{display:flex;list-style:none;overflow-x:auto;scrollbar-width:none;flex:1}
.mainmenu ul::-webkit-scrollbar{display:none}
.mainmenu li a{display:block;color:#fff;font-family:var(--display);font-weight:700;font-size:16.5px;letter-spacing:.05em;padding:13px 15px;white-space:nowrap;border-bottom:3px solid transparent}
.mainmenu li a:hover,.mainmenu li.current-menu-item a,.mainmenu li.current-cat a{background:var(--ncb-red-dark);border-bottom-color:#fff}
.menu-search{display:flex;align-items:center;background:rgba(255,255,255,.16);border-radius:20px;padding:0 4px 0 14px;flex-shrink:0}
.menu-search input{border:0;outline:0;background:none;color:#fff;font-family:var(--body);font-size:12.5px;width:130px;padding:7px 0}
.menu-search input::placeholder{color:rgba(255,255,255,.75)}
.menu-search button{border:0;background:#fff;color:var(--ncb-red);width:26px;height:26px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center}

/* ===== DRAWER ===== */
.drawer{position:fixed;inset:0;z-index:200;pointer-events:none}
.drawer.open{pointer-events:auto}
.drawer-bg{position:absolute;inset:0;background:rgba(10,12,14,.55);opacity:0;transition:.25s}
.drawer.open .drawer-bg{opacity:1}
.drawer-panel{position:absolute;top:0;left:0;bottom:0;width:300px;max-width:85vw;background:#fff;transform:translateX(-102%);transition:.28s cubic-bezier(.2,.7,.3,1);overflow-y:auto;box-shadow:6px 0 30px rgba(0,0,0,.18)}
.drawer.open .drawer-panel{transform:none}
.drawer-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:2px solid var(--ncb-red)}
.drawer-head img{height:40px;width:auto}
.drawer-close{border:0;background:none;font-size:26px;cursor:pointer;color:var(--ncb-red);line-height:1}
.drawer h5{font-family:var(--display);font-size:14px;letter-spacing:.14em;color:#8a919a;padding:16px 18px 6px}
.drawer nav a{display:block;padding:9px 18px;font-weight:600;font-size:14px;border-left:3px solid transparent}
.drawer nav a:hover{background:#FFF3F5;border-left-color:var(--ncb-red);color:var(--ncb-red)}

/* ===== LAYOUT ===== */
.layout{display:grid;grid-template-columns:1fr 300px;gap:28px;margin-top:22px}
.ad-largura{width:100%;height:250px;margin-bottom:22px}
.ad-entre{width:100%;height:120px;margin:22px 0 0}
.ad-prerodape{width:100%;height:250px;margin-top:28px}

/* ===== CARDS ===== */
.hero{display:grid;grid-template-columns:2fr 1fr;gap:18px}
.card{background:var(--paper);border-radius:10px;overflow:hidden;border:1px solid var(--line);transition:.18s;display:flex;flex-direction:column}
.card:hover{box-shadow:0 8px 24px rgba(20,23,26,.1);transform:translateY(-2px)}
.card-img{aspect-ratio:16/9;background:linear-gradient(135deg,#DADEE3,#C3C9D0);overflow:hidden}
.card-img img{width:100%;height:100%;object-fit:cover}
.card-body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:7px;flex:1}
.cat-tag{font-family:var(--display);font-weight:700;font-size:12.5px;letter-spacing:.1em;color:#fff;padding:2.5px 9px;border-radius:3px;align-self:flex-start;background:var(--ncb-red)}
.card h3{font-family:var(--display);font-weight:700;font-size:21px;line-height:1.12}
.card p{font-size:13px;color:var(--ink-soft);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card time{font-size:11.5px;color:#98A0AA;font-weight:500;margin-top:auto}
.hero-main .card-img{aspect-ratio:16/10}
.hero-main h3{font-size:31px;line-height:1.06}
.hero-main p{-webkit-line-clamp:3;font-size:14px}
.hero-side{display:grid;gap:18px}
.hero-side .card h3{font-size:18px}
.hero-side .card .card-img{aspect-ratio:16/8}

/* ===== REELS ===== */
.reels{background:var(--ink);border-radius:14px;padding:20px 20px 24px;margin:28px 0;color:#fff}
.reels-head{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.reels-head h2{font-family:var(--display);font-weight:800;font-size:24px;letter-spacing:.04em}
.reels-head a{margin-left:auto;font-size:12.5px;color:#FF8FA0;font-weight:600}
.reels-track{display:flex;gap:14px;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}
.reel{flex:0 0 150px;border-radius:12px;overflow:hidden;position:relative;aspect-ratio:9/16;cursor:pointer;background:#2a2f35}
.reel img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.reel::before{content:'▶';position:absolute;z-index:2;top:50%;left:50%;transform:translate(-50%,-50%);width:40px;height:40px;background:rgba(200,16,46,.92);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:15px;color:#fff;transition:.2s}
.reel:hover::before{transform:translate(-50%,-50%) scale(1.12)}
.reel span{position:absolute;z-index:2;bottom:0;left:0;right:0;padding:26px 10px 10px;background:linear-gradient(transparent,rgba(0,0,0,.85));font-size:11.5px;font-weight:600;line-height:1.3}

/* ===== BLOCOS ===== */
.bloco{margin:32px 0;border-left:5px solid var(--bc,var(--ncb-red));padding-left:18px}
.bloco-head{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.bloco-head h2{font-family:var(--display);font-weight:800;font-size:26px;letter-spacing:.03em;color:var(--bc,var(--ncb-red))}
.bloco-head h2 a{color:inherit}
.bloco-head>a{margin-left:auto;font-size:12.5px;font-weight:700;color:var(--bc,var(--ncb-red))}
.bloco-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}

/* ===== SIDEBAR ===== */
.sidebar{display:flex;flex-direction:column;gap:20px}
.widget{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:18px}
.widget h4{font-family:var(--display);font-weight:800;font-size:19px;letter-spacing:.04em;padding-bottom:10px;border-bottom:2px solid var(--ncb-red);margin-bottom:14px}
.maislidas{list-style:none;counter-reset:ml}
.maislidas li{counter-increment:ml;display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-weight:600;font-size:13.5px;line-height:1.3}
.maislidas li:last-child{border:0;padding-bottom:0}
.maislidas li::before{content:counter(ml);font-family:var(--display);font-weight:800;font-size:26px;color:var(--ncb-red);line-height:1;min-width:22px}
.w-tempo{display:flex;align-items:center;gap:14px}
.w-tempo .temp{font-family:var(--display);font-weight:800;font-size:44px;line-height:1}
.w-tempo .cid{font-weight:700;font-size:14px}
.w-tempo .det{font-size:11.5px;color:#8a919a}
.quad-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quad-grid .ncb-ad{aspect-ratio:1;border-radius:8px}
.ad-lateral{height:250px}
.sticky-ad{position:sticky;top:64px}
.ad-300x600{min-height:600px}

/* ===== ARTIGO ===== */
.crumbs{font-size:12px;color:#8a919a;margin-bottom:14px}
.crumbs b,.crumbs a:last-child{color:var(--ncb-red)}
.art h1{font-family:var(--display);font-weight:800;font-size:40px;line-height:1.04;margin:8px 0 10px}
.art .sub{font-size:16.5px;color:var(--ink-soft);margin-bottom:14px;line-height:1.5}
.art-meta{display:flex;gap:16px;align-items:center;font-size:12px;color:#8a919a;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:18px;flex-wrap:wrap}
.art-meta b{color:var(--ink)}
.art-share{margin-left:auto;display:flex;gap:6px;align-items:center}
.art-share a{width:24px;height:24px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;color:#fff}
.art-featured{border-radius:10px;overflow:hidden;margin-bottom:6px}
.art-featured img{width:100%;display:block}
.legenda{font-size:11.5px;color:#98A0AA;margin-bottom:18px}
.art-body p{margin-bottom:16px;font-size:16px;line-height:1.75}
.art-body h2,.art-body h3{font-family:var(--display);margin:22px 0 10px;line-height:1.15}
.art-body img{border-radius:8px;margin:10px 0}
.art-body a{color:var(--ncb-red);font-weight:600}
.art-body ul,.art-body ol{margin:0 0 16px 22px}
.art-body blockquote{border-left:4px solid var(--ncb-red);padding:8px 16px;background:#fff;border-radius:0 8px 8px 0;margin-bottom:16px;font-style:italic}
.leia{margin-top:34px}

/* ===== ARQUIVO/CATEGORIA ===== */
.arch-head{margin:6px 0 20px}
.arch-head h1{font-family:var(--display);font-weight:800;font-size:34px;color:var(--bc,var(--ncb-red))}
.arch-head p{color:var(--ink-soft);font-size:13.5px}
.arch-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.pagination{display:flex;gap:8px;justify-content:center;margin:30px 0 10px;font-weight:700}
.pagination .page-numbers{padding:8px 14px;background:#fff;border:1px solid var(--line);border-radius:8px}
.pagination .current{background:var(--ncb-red);color:#fff;border-color:var(--ncb-red)}

/* ===== FOOTER ===== */
.site-footer{background:var(--ink);color:#B9C0C8;margin-top:46px}
.foot-main{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:30px;padding:40px 0 30px}
.foot-main h5{font-family:var(--display);color:#fff;font-size:17px;letter-spacing:.06em;margin-bottom:12px}
.foot-main a{display:block;font-size:13px;padding:3px 0}
.foot-main a:hover{color:#fff}
.foot-brand img{height:52px;width:auto}
.foot-brand p{font-size:12.5px;line-height:1.6;margin-top:10px}
.foot-bottom{border-top:1px solid #2A2F35;padding:16px 0;font-size:12px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.foot-bottom a{color:#FF8FA0;font-weight:600}

/* ===== RESPONSIVO ===== */
@media(max-width:1024px){.ad-topo{width:468px;height:60px}}
@media(max-width:980px){
  .layout{grid-template-columns:1fr}
  .hero{grid-template-columns:1fr}
  .bloco-grid,.arch-grid{grid-template-columns:repeat(2,1fr)}
  .foot-main{grid-template-columns:1fr 1fr}
  .art h1{font-size:30px}
  .sticky-ad{position:static}
}
@media(max-width:640px){
  .bloco-grid,.arch-grid{grid-template-columns:1fr}
  .header-main{flex-wrap:wrap;gap:14px}
  .ad-topo{width:100%;height:70px;margin:0}
  .menu-search input{width:80px}
  .util-left .util-data{display:none}
  .hero-main h3{font-size:24px}
  .ad-largura{height:160px}
  .logo img{height:46px}
}
@media(prefers-reduced-motion:reduce){.ticker-track{animation:none}}

/* ===== MOBILE: só menu sanduíche ===== */
@media(max-width:768px){
  .mainmenu ul{display:none}
  .mainmenu .wrap{justify-content:space-between;padding-top:6px;padding-bottom:6px}
  .menu-search{flex:1;max-width:none;margin:0}
  .menu-search input{width:100%;flex:1}
}

/* ===== v3.1: LOGO MENOR NO HEADER ===== */
.logo img, .custom-logo{max-height:48px !important;width:auto !important;height:auto !important}
@media(max-width:640px){.logo img, .custom-logo{max-height:38px !important}}

/* ===== v3.1: FOOTER LOGO BRANCA ===== */
.foot-brand img{height:auto;max-height:62px;width:auto;filter:none}

/* ===== v3.1: WIDGET AREAS ===== */
.widget-area{margin:24px 0;background:#fff;border:1px solid var(--line);border-radius:10px;padding:18px}
.widget-area .widget-title{font-family:var(--display);font-weight:800;font-size:22px;color:var(--ncb-red);margin-bottom:12px;padding-bottom:8px;border-bottom:2px solid var(--ncb-red)}
.widget-area:empty{display:none}

/* ===== v3.2 ===== */
/* Logo um pouco maior */
.logo img, .custom-logo{max-height:60px !important}
@media(max-width:640px){.logo img, .custom-logo{max-height:44px !important}}

/* Banner topo: altura FIXA em 90px (impede AdSense de esticar) */
.ad-topo{width:728px;max-width:100%;height:90px !important;max-height:90px !important;overflow:hidden}
.ad-topo ins, .ad-topo iframe, .ad-topo img{max-height:90px !important;height:90px !important}
@media(max-width:1024px){.ad-topo{width:468px;height:60px !important;max-height:60px !important}.ad-topo ins,.ad-topo iframe,.ad-topo img{max-height:60px !important;height:60px !important}}
@media(max-width:640px){.ad-topo{width:100%;max-width:360px;height:70px !important;max-height:70px !important}.ad-topo ins,.ad-topo iframe,.ad-topo img{max-height:70px !important;height:70px !important}}

/* Restringir outros slots também */
.ad-largura{height:250px !important;max-height:250px !important;overflow:hidden}
.ad-largura ins,.ad-largura iframe,.ad-largura img{max-height:250px !important}
.ad-entre{height:120px !important;max-height:120px !important;overflow:hidden}
.ad-entre ins,.ad-entre iframe,.ad-entre img{max-height:120px !important}
.ad-prerodape{height:250px !important;max-height:250px !important;overflow:hidden}
.ad-prerodape ins,.ad-prerodape iframe,.ad-prerodape img{max-height:250px !important}
.ad-lateral{height:250px !important;max-height:250px !important;overflow:hidden;width:100%}
.ad-lateral ins,.ad-lateral iframe,.ad-lateral img{max-height:250px !important}
.ad-300x600{height:600px !important;max-height:600px !important;overflow:hidden}
.ad-300x600 ins,.ad-300x600 iframe,.ad-300x600 img{max-height:600px !important}
.quad-grid .ncb-ad{aspect-ratio:1;overflow:hidden}

/* ===== Previsão expandida ===== */
.widget-weather .w-tempo{align-items:center;gap:12px}
.widget-weather .w-main-icon{width:56px;height:56px;flex-shrink:0}
.widget-weather .w-main-icon svg{width:100%;height:100%}
.w-hours{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.w-hour{display:flex;flex-direction:column;align-items:center;gap:2px}
.w-h-time{font-size:10.5px;font-weight:700;color:#8a919a;letter-spacing:.05em}
.w-h-icon{width:32px;height:32px}
.w-h-icon svg{width:100%;height:100%}
.w-h-temp{font-size:12px;font-weight:700;color:var(--ink)}
.w-days{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.w-day{display:grid;grid-template-columns:44px 34px 1fr;align-items:center;gap:8px;padding:5px 0;font-size:12px}
.w-day:not(:last-child){border-bottom:1px dashed var(--line)}
.w-d-name{font-weight:700;color:#8a919a;letter-spacing:.05em;font-size:11px}
.w-d-icon{width:28px;height:28px}
.w-d-icon svg{width:100%;height:100%}
.w-d-temps{text-align:right;color:var(--ink-soft)}
.w-d-temps b{color:var(--ink);font-weight:700}

/* ===== v3.3 LightWidget ===== */
.reels-embed{border-radius:10px;overflow:hidden;background:#1a1d21;min-height:280px}
.reels-embed iframe.lightwidget-widget{display:block;width:100% !important}

/* ===== v3.4 Modal Instagram ===== */
.reel img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.reel-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:44px;height:44px;background:rgba(200,16,46,.92);border-radius:50%;padding:10px;z-index:2}
.reel:hover .reel-play{transform:translate(-50%,-50%) scale(1.12)}
.reel::before{content:none}
.reel{cursor:pointer}

.ig-modal{position:fixed;inset:0;z-index:999;display:none;align-items:center;justify-content:center}
.ig-modal.open{display:flex}
.ig-modal-bg{position:absolute;inset:0;background:rgba(0,0,0,.85);backdrop-filter:blur(4px)}
.ig-modal-box{position:relative;background:transparent;max-width:540px;width:92vw;max-height:90vh;display:flex;flex-direction:column;align-items:center;gap:12px}
.ig-modal-close{position:absolute;top:-42px;right:0;background:transparent;border:0;color:#fff;font-size:26px;cursor:pointer;z-index:2}
.ig-modal-body{width:100%;max-height:75vh;overflow-y:auto;background:#fff;border-radius:12px}
.ig-modal-body iframe{width:100% !important;min-width:0 !important;border-radius:12px}
.ig-modal-open{background:#fff;color:var(--ncb-red);font-weight:700;padding:10px 22px;border-radius:22px;font-size:13.5px}
.ig-modal-open:hover{background:var(--ncb-red);color:#fff}

/* Remover CSS antigo do LightWidget */
.reels-embed{display:none}
