/*
Theme Name: Sotto TV
Theme URI:
Author: Sotto TV
Author URI:
Description: A fast, lightweight and responsive WordPress news and magazine theme for modern publishers. Built with a mobile-first layout, clean typography, accessible navigation, flexible homepage category sections, single-post author information, Recent Posts and Most Popular Posts sidebars, and stable ad containers for Google Ad Manager, AdX and AdSense integrations.
Version: 1.5.6
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sottotv
Tags: news, magazine, blog, responsive, mobile-first, accessibility-ready, custom-logo, custom-menu, featured-images, translation-ready, two-columns, custom-background, threaded-comments
*/
:root{--bg:#fff;--surface:#f6f7f9;--text:#17191c;--muted:#69707a;--border:#e3e6ea;--accent:#d71920;--link:#1257a6;--max:1180px;--radius:8px;--shadow:0 2px 12px rgba(0,0,0,.06)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px;line-height:1.65}img{max-width:100%;height:auto;display:block}a{color:var(--link);text-decoration:none}a:hover{text-decoration:underline}.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.screen-reader-text:focus{position:fixed!important;top:8px;left:8px;width:auto;height:auto;padding:10px 14px;margin:0;clip:auto;white-space:normal;background:#fff;color:#000;z-index:99999;border:2px solid #000}
.site-header{background:var(--bg);border-bottom:1px solid var(--border)}.header-inner{max-width:var(--max);margin:auto;padding:14px 18px;display:flex;align-items:center;gap:20px}.site-branding{display:flex;align-items:center;gap:10px;min-width:0}.custom-logo-link{display:block;flex:0 0 auto;line-height:0;max-width:220px}.custom-logo,.site-logo-fallback img{display:block;max-width:220px;width:auto;height:auto;max-height:58px;object-fit:contain}.site-logo-fallback{display:block;line-height:0;flex:0 0 auto}.site-title{font-size:25px;font-weight:800;letter-spacing:-.5px;color:var(--text)}.site-description{margin:0;color:var(--muted);font-size:13px}.menu-toggle{margin-left:auto;display:none;border:1px solid var(--border);background:var(--surface);padding:8px 10px;border-radius:6px;font:inherit;cursor:pointer}.main-navigation{margin-left:auto}.main-navigation ul{display:flex;gap:18px;list-style:none;margin:0;padding:0}.main-navigation a{color:var(--text);font-weight:650;font-size:15px}.main-navigation a:hover{color:var(--accent);text-decoration:none}
.site-main{max-width:var(--max);margin:auto;padding:28px 18px}.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:30px}.section-title{font-size:28px;line-height:1.2;margin:0 0 18px}.post-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.post-card{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--bg);box-shadow:var(--shadow)}.post-card .thumb{aspect-ratio:16/9;background:var(--surface);overflow:hidden}.post-card .thumb img{width:100%;height:100%;object-fit:cover}.post-card-body{padding:15px}.post-card h2{font-size:20px;line-height:1.3;margin:0 0 8px}.meta{font-size:13px;color:var(--muted)}.excerpt{color:#3e444b;margin:8px 0 0}
.hero{display:grid;grid-template-columns:1.5fr 1fr;gap:20px;margin-bottom:28px}.hero-main{position:relative;min-height:330px;border-radius:var(--radius);overflow:hidden;background:#111}.hero-main img{width:100%;height:100%;object-fit:cover;opacity:.78}.hero-overlay{position:absolute;inset:0;padding:28px;color:#fff;background:linear-gradient(transparent 18%,rgba(0,0,0,.9));display:flex;flex-direction:column;justify-content:flex-end;overflow:hidden}.hero-overlay h1{font-size:34px;line-height:1.15;margin:5px 0}.hero-overlay p{margin:8px 0 0;line-height:1.45}.hero-side{display:grid;gap:14px}.mini-card{display:grid;grid-template-columns:110px 1fr;gap:12px;border-bottom:1px solid var(--border);padding-bottom:14px}.mini-card img{width:110px;height:75px;object-fit:cover;border-radius:6px}.mini-card h2{font-size:16px;line-height:1.3;margin:0}
.single-header{margin-bottom:22px}.single-header h1{font-size:42px;line-height:1.15;letter-spacing:-.7px;margin:6px 0 12px}.post-content{font-size:18px}.post-content p,.post-content ul,.post-content ol{margin:0 0 1.2em}.post-content h2{font-size:28px}.post-content blockquote{border-left:4px solid var(--accent);margin:1.5em 0;padding:.5em 1em;background:var(--surface)}.post-content figure{margin:1.5em 0}.featured-image{margin:0 0 22px}.featured-image img{width:100%;border-radius:var(--radius)}
.sidebar-widget{border-bottom:1px solid var(--border);padding-bottom:20px;margin-bottom:22px}.sidebar-widget h2{font-size:18px;margin:0 0 10px}.sidebar-widget ul{list-style:none;margin:0;padding:0}.sidebar-widget li{padding:6px 0;border-bottom:1px solid var(--border)}
.ad-slot{width:100%;min-height:0;margin:18px 0;display:flex;justify-content:center;align-items:center;overflow:hidden}.ad-slot[data-size="300x250"]{min-height:250px}.ad-slot[data-size="336x280"]{min-height:280px}.ad-slot[data-size="responsive"]{min-height:100px}.ad-label{font-size:10px;color:#9aa0a6;letter-spacing:.08em;text-transform:uppercase}.ad-slot ins{max-width:100%}
.pagination{margin-top:28px}.nav-links{display:flex;gap:8px;flex-wrap:wrap}.page-numbers{border:1px solid var(--border);padding:7px 11px;border-radius:5px}.current{background:var(--text);color:#fff}
.related{border-top:1px solid var(--border);margin-top:35px;padding-top:25px}.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.related-card-thumb{display:block;line-height:0;border-radius:6px;overflow:hidden}.related-card-thumb img{width:100%;border-radius:6px;aspect-ratio:16/9;object-fit:cover;display:block}.related-card h3{font-size:16px;line-height:1.35}
.site-footer{border-top:1px solid var(--border);margin-top:40px}.footer-inner{max-width:var(--max);margin:auto;padding:25px 18px;color:var(--muted);font-size:14px;text-align:center}.footer-menu ul{display:flex;justify-content:center;align-items:center;gap:15px;list-style:none;padding:0;margin:0 0 10px}
.search-form{display:flex;gap:8px}.search-field{min-width:0;flex:1;border:1px solid var(--border);border-radius:6px;padding:10px;font:inherit}.search-submit{border:0;border-radius:6px;padding:10px 14px;background:var(--text);color:#fff;font:inherit;cursor:pointer}
@media (max-width:900px){.content-grid{grid-template-columns:1fr}.hero{grid-template-columns:1fr}.hero-side{grid-template-columns:repeat(2,1fr)}}
@media (max-width:700px){.header-inner{flex-wrap:wrap}.menu-toggle{display:block}.main-navigation{display:none;width:100%;margin:0}.main-navigation.is-open{display:block}.main-navigation ul{flex-direction:column;gap:0}.main-navigation li{border-top:1px solid var(--border)}.main-navigation a{display:block;padding:9px 0}.site-description{display:none}.post-grid,.related-grid{grid-template-columns:1fr}.hero-side{grid-template-columns:1fr}.hero-main{min-height:250px}.hero-overlay{padding:20px;background:linear-gradient(transparent 8%,rgba(0,0,0,.92))}.hero-overlay h1{font-size:30px;line-height:1.12;margin:4px 0}.hero-overlay p{font-size:16px;line-height:1.4;margin:6px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.single-header h1{font-size:32px}.site-main{padding-top:20px}}
@media (prefers-color-scheme:dark){:root{--bg:#101214;--surface:#181b1f;--text:#f1f3f5;--muted:#a6adb5;--border:#2b3036;--link:#72a9ff}.post-card{box-shadow:none}.excerpt{color:#c4c9cf}.site-header,.site-footer{background:var(--bg)}.search-submit,.current{background:#f1f3f5;color:#111}.screen-reader-text:focus{background:#111;color:#fff}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* v1.1 ad stability and in-app-browser safeguards */
.ad-slot{position:relative;contain:layout paint;box-sizing:border-box}
.ad-slot .ad-label{position:absolute;top:2px;left:50%;transform:translateX(-50%);pointer-events:none}
.ad-slot[data-size="300x250"]{width:100%;max-width:300px;margin-left:auto;margin-right:auto}
.ad-slot[data-size="336x280"]{width:100%;max-width:336px;margin-left:auto;margin-right:auto}
@media (max-width:700px){.ad-slot[data-size="300x250"],.ad-slot[data-size="336x280"]{max-width:100%;overflow-x:hidden}}
button,a,input{touch-action:manipulation}
img{content-visibility:auto}

/* v1.2 WebView/ad rendering safeguards */
html.sottotv-webview .ad-slot{min-height:100px}
html.sottotv-webview .ad-slot[data-size="300x250"]{min-height:250px}
html.sottotv-webview .ad-slot[data-size="336x280"]{min-height:280px}
html.sottotv-webview .ad-slot[data-size="responsive"]{min-height:100px}
.ad-slot{isolation:isolate}
.ad-slot iframe{max-width:100%;border:0}

/* v1.2.3 compact post lists: thumbnail + date + title */
.post-list{display:grid;gap:0;border-top:1px solid var(--border)}
.post-list-item{display:grid;grid-template-columns:180px minmax(0,1fr);gap:18px;padding:16px 0;border-bottom:1px solid var(--border)}
.post-list-thumb{width:180px;height:110px;overflow:hidden;border-radius:7px;background:var(--surface)}
.post-list-thumb img{width:100%;height:100%;object-fit:cover}
.post-list-body h3{margin:4px 0 5px;font-size:20px;line-height:1.3}
.post-list-body .meta{margin-top:0}
.category-section{margin-top:34px}
.category-section:first-child{margin-top:0}
.category-section-header{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:2px solid var(--text);padding-bottom:8px;margin-bottom:0}
.category-section-header h2{margin:0;font-size:24px;line-height:1.2}
.category-section-header a{font-size:13px;font-weight:700}
.archive-layout-grid .post-list{display:none}
.archive-layout-list .post-grid{display:none}
@media (max-width:700px){
  .post-list-item{grid-template-columns:105px minmax(0,1fr);gap:12px;padding:13px 0}
  .post-list-thumb{width:105px;height:75px}
  .post-list-body h3{font-size:16px}
  .category-section-header h2{font-size:20px}
}

.pagination ul{list-style:none;margin:22px 0 0;padding:0;display:flex;gap:7px;flex-wrap:wrap}
.pagination li{margin:0}.pagination .page-numbers{display:inline-block}.recent-posts-section{margin-top:38px}

/* v1.2.5 category compact multi-column layout */
.category-post-list{display:grid;grid-template-columns:repeat(var(--category-columns,2),minmax(0,1fr));gap:0 22px;border-top:1px solid var(--border)}
.category-post-list .post-list-item{grid-template-columns:120px minmax(0,1fr);gap:12px;padding:14px 0}
.category-post-list .post-list-thumb{width:120px;height:80px}
.category-post-list .post-list-body h3{font-size:17px;line-height:1.3;margin:3px 0 0}
@media(max-width:850px){
  .category-post-list{grid-template-columns:1fr}
}
@media(max-width:700px){
  .category-post-list .post-list-item{grid-template-columns:105px minmax(0,1fr)}
  .category-post-list .post-list-thumb{width:105px;height:75px}
}

/* v1.2.6: category sections are explicitly two-column on desktop */
.category-post-list{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  column-gap:24px;
  row-gap:0;
  border-top:1px solid var(--border);
}
.category-post-list .post-list-item{
  min-width:0;
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:12px;
  align-items:start;
  padding:14px 0;
  border-bottom:1px solid var(--border);
}
.category-post-list .post-list-thumb{
  width:120px;
  height:80px;
  display:block;
}
.category-post-list .post-list-body h3{
  font-size:17px;
  line-height:1.3;
  margin:2px 0 0;
}
@media(max-width:850px){
  .category-post-list{
    grid-template-columns:1fr !important;
  }
}
@media(max-width:700px){
  .category-post-list .post-list-item{
    grid-template-columns:105px minmax(0,1fr);
  }
  .category-post-list .post-list-thumb{
    width:105px;
    height:75px;
  }
}

/* v1.2.7 */
.home-category-posts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:24px;border-top:1px solid var(--border)}
.home-category-posts .post-list-item{min-width:0;display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;align-items:start;padding:14px 0;border-bottom:1px solid var(--border)}
.home-category-posts .post-list-thumb{width:120px;height:80px;display:block}
.home-category-posts .post-list-body h3{font-size:17px;line-height:1.3;margin:2px 0 0}
.sottotv-pagination{margin:22px 0 5px;white-space:normal}
.sottotv-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 9px;margin:0 4px 0 0;border:1px solid var(--border);border-radius:4px;text-decoration:none;box-sizing:border-box}
.sottotv-pagination .page-numbers.current{font-weight:700}
.sottotv-pagination .page-numbers.dots{border:0;min-width:auto;padding:0 3px}
@media(max-width:850px){.home-category-posts{grid-template-columns:1fr!important}}
@media(max-width:700px){.home-category-posts .post-list-item{grid-template-columns:105px minmax(0,1fr)}.home-category-posts .post-list-thumb{width:105px;height:75px}.sottotv-pagination .page-numbers{min-width:32px;height:32px;margin-right:3px;padding:0 7px}}

/* v1.2.8 custom author box */
.author-box{display:flex;gap:16px;align-items:flex-start;border:1px solid var(--border);background:var(--surface);border-radius:var(--radius);padding:18px;margin:32px 0}
.author-box-avatar{width:82px;height:82px;flex:0 0 82px;border-radius:50%;object-fit:cover;background:var(--bg)}
.author-box-body{min-width:0}.author-box-name{font-size:20px;line-height:1.25;margin:0 0 2px}.author-box-role{font-size:13px;color:var(--muted);margin:0 0 8px}.author-box-bio{margin:0;color:var(--text)}
@media(max-width:600px){.author-box{padding:14px;gap:12px}.author-box-avatar{width:64px;height:64px;flex-basis:64px}}
/* v1.2.8 empty ad slots collapse completely */
.ad-slot.ad-slot-empty,.ad-slot:empty{display:none!important;min-height:0!important;height:0!important;margin:0!important;padding:0!important;border:0!important}
.ad-slot.ad-slot-filled{display:flex;min-height:0}

/* v1.3.7: Smart Ad Optimizer 1.8 compatibility.
   The existing plugin owns its ad markup; keep its stages visible and unconstrained. */
.sao-slot{display:block!important;width:100%;max-width:100%;min-height:1px;overflow:visible;contain:initial;isolation:auto;position:relative}
.sao-stage{display:block!important;width:100%;max-width:100%;min-height:1px;overflow:visible}
.sao-slot iframe,.sao-slot ins,.sao-slot object,.sao-slot embed{max-width:100%;box-sizing:border-box}
.sao-loading-space{min-height:1px}
.sao-anchor,.sao-anchor .sao-slot{width:100%;max-width:100%}

/* v1.3.0: clean single-line pagination — remove unwanted bullets/dots */
.sottotv-pagination,
.sottotv-pagination ul,
.sottotv-pagination ol{
  list-style:none !important;
  margin:22px 0 5px !important;
  padding:0 !important;
}
.sottotv-pagination ul,
.sottotv-pagination ol{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:0 !important;
}
.sottotv-pagination li{
  list-style:none !important;
  display:inline-flex !important;
  margin:0 !important;
  padding:0 !important;
}
.sottotv-pagination li::before,
.sottotv-pagination li::after,
.sottotv-pagination::before,
.sottotv-pagination::after{
  content:none !important;
  display:none !important;
}
.sottotv-pagination .page-numbers{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:34px;
  height:34px;
  margin:0 4px 0 0 !important;
  padding:0 9px;
  box-sizing:border-box;
}
.sottotv-pagination .page-numbers.dots{
  min-width:34px;
  padding:0 9px;
}
@media(max-width:700px){
  .sottotv-pagination ul,
  .sottotv-pagination ol{
    flex-wrap:wrap !important;
    row-gap:6px !important;
  }
}

/* v1.3.1: pagination uses inline links only; never render a list marker */
.sottotv-pagination{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:0!important;list-style:none!important;margin:22px 0 5px!important;padding:0!important}
.sottotv-pagination a.page-numbers,.sottotv-pagination span.page-numbers{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:34px!important;height:34px!important;margin:0 4px 0 0!important;padding:0 9px!important;border:1px solid var(--border)!important;border-radius:4px!important;box-sizing:border-box!important;list-style:none!important;text-decoration:none!important}
.sottotv-pagination a.page-numbers::before,.sottotv-pagination a.page-numbers::after,.sottotv-pagination span.page-numbers::before,.sottotv-pagination span.page-numbers::after{content:none!important;display:none!important}
.sottotv-pagination .page-numbers.current{font-weight:700!important}
.sottotv-pagination .page-numbers.dots{min-width:20px!important;border:0!important;padding:0 3px!important}
@media(max-width:700px){.sottotv-pagination{flex-wrap:wrap!important;row-gap:6px!important}.sottotv-pagination a.page-numbers,.sottotv-pagination span.page-numbers{min-width:32px!important;height:32px!important}}

/* Single post sidebar: recent + most popular */
.sidebar-post-list li{padding:9px 0;border-bottom:1px solid var(--border)}
.sidebar-post-list li:last-child{border-bottom:0}
.sidebar-post-list a{display:block;font-weight:600;line-height:1.45}
.sidebar-post-list time,.sidebar-post-views{display:block;margin-top:3px;font-size:12px;color:var(--muted)}


/* v1.3.5: reliable header logo fallback + centered footer */
.footer-inner{text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.footer-menu{width:100%;display:flex;justify-content:center}
.footer-menu ul{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:14px;list-style:none;margin:0;padding:0}
.footer-menu li{list-style:none;margin:0;padding:0}
.site-logo-fallback{flex:0 0 auto}

/* v1.3.7: desktop logo reliability + clickable related thumbnails */
.site-branding .custom-logo-link,.site-branding .site-logo-fallback{visibility:visible!important;opacity:1!important}
@media(min-width:701px){.site-branding .custom-logo-link,.site-branding .site-logo-fallback{display:block!important}.site-branding .custom-logo,.site-branding .site-logo-fallback img{max-width:220px!important;max-height:58px!important;width:auto!important;height:auto!important}}
.related-card-thumb:hover img{opacity:.94}

/* v1.3.9: keep desktop menu items on one line beside the logo; submenus open as dropdowns. */
:root{--max:1600px}
@media (min-width:701px){
  .header-inner{gap:28px;min-width:0}
  .site-branding{flex:0 0 auto;min-width:0}
  .main-navigation{margin-left:auto;flex:1 1 auto;min-width:0}
  .main-navigation>div>ul,.main-navigation>ul{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:18px;flex-wrap:nowrap;list-style:none;margin:0;padding:0}
  .main-navigation>div>ul>li,.main-navigation>ul>li{position:relative;flex:0 0 auto}
  .main-navigation a{white-space:nowrap;display:block;padding:4px 0}
  .main-navigation .sub-menu{position:absolute;top:100%;left:0;z-index:9999;display:none;min-width:190px;margin:0;padding:7px 0;background:var(--bg);border:1px solid var(--border);border-radius:6px;box-shadow:var(--shadow);list-style:none}
  .main-navigation li:hover>.sub-menu,.main-navigation li:focus-within>.sub-menu{display:block}
  .main-navigation .sub-menu li{display:block;position:relative;width:100%;border:0}
  .main-navigation .sub-menu a{padding:7px 14px;font-size:14px;white-space:nowrap}
  .main-navigation .sub-menu .sub-menu{top:-8px;left:100%;margin-left:1px}
  .main-navigation .menu-item-has-children>a::after{content:'▾';font-size:10px;margin-left:5px}
  .main-navigation .sub-menu .menu-item-has-children>a::after{content:'▸';float:right;margin-left:14px}
}
@media (max-width:1100px) and (min-width:701px){
  .header-inner{gap:14px}
  .main-navigation>div>ul,.main-navigation>ul{gap:11px}
  .main-navigation a{font-size:14px}
  .custom-logo,.site-logo-fallback img{max-width:190px}
}
@media (max-width:700px){
  .main-navigation .sub-menu{position:static;display:none;min-width:0;margin:0;padding:0 0 0 14px;border:0;box-shadow:none;background:transparent}
  .main-navigation li:focus-within>.sub-menu{display:block}
  .main-navigation li:hover>.sub-menu{display:none}
}

/* v1.3.9: boxed content container + left-aligned desktop navigation */
:root{--content-max:1280px}
body{background:#f4f5f7}
.site-header{background:var(--bg)}
.header-inner{max-width:var(--content-max);}
@media (min-width:701px){
  .main-navigation{margin-left:0!important;flex:0 1 auto!important;}
  .main-navigation>div>ul,.main-navigation>ul{justify-content:flex-start!important;}
}
.site-main{
  max-width:var(--content-max);
  margin:28px auto 0;
  padding:28px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
@media (max-width:700px){
  body{background:var(--bg)}
  .site-main{margin:0;padding:20px 16px;border:0;border-radius:0;box-shadow:none}
}


/* v1.4.1: built-in Theme Ad Manager */
.sottotv-theme-ad{width:100%;box-sizing:border-box;display:flex;justify-content:center;align-items:center;overflow:visible;clear:both;margin:18px auto;text-align:center}
.sottotv-theme-ad ins,.sottotv-theme-ad iframe{max-width:100%}
.sottotv-ad-top-banner,.sottotv-ad-bottom-banner{min-height:1px}
.sottotv-ad-before-post,.sottotv-ad-before-content,.sottotv-ad-after-paragraph{min-height:1px}
.sottotv-ad-anchor-ad{position:fixed;left:0;right:0;bottom:0;z-index:99998;margin:0;padding:0;min-height:1px;display:flex;justify-content:center;align-items:flex-end;background:transparent;pointer-events:auto}
.sottotv-ad-anchor-ad iframe{max-width:100%;border:0}
@supports(padding:max(0px)){.sottotv-ad-anchor-ad{padding-bottom:max(0px,env(safe-area-inset-bottom))}}
@media(max-width:700px){.sottotv-theme-ad{margin:14px auto}.sottotv-ad-anchor-ad{width:100%;overflow:hidden}}

/* v1.4.1: dedicated single-post/sidebar ad containers */
.sottotv-ad-single-post,.sottotv-ad-sidebar{width:100%;box-sizing:border-box;display:flex;justify-content:center;align-items:center;overflow:visible;clear:both;margin:20px auto;text-align:center}
.sottotv-ad-single-post ins,.sottotv-ad-single-post iframe,.sottotv-ad-sidebar ins,.sottotv-ad-sidebar iframe{max-width:100%}


/* v1.4.2: separate boxed sidebar; keep all other layout unchanged */
.sidebar{
  min-width:0;
  align-self:start;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:var(--shadow);
}
.sidebar .sidebar-widget:last-of-type{margin-bottom:0}
.sidebar .sottotv-ad-sidebar{margin-left:auto;margin-right:auto}
@media(max-width:900px){
  .sidebar{padding:18px;}
}
@media(max-width:700px){
  .sidebar{padding:18px;margin-top:8px;}
}


/* v1.4.3: three-column footer with English, Random and Popular posts. */
.site-footer{margin-top:40px;background:var(--text);color:var(--bg);border-top:1px solid var(--border)}
.footer-inner{max-width:var(--content-max,1280px);margin:0 auto;padding:38px 28px 22px;text-align:left;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,1fr);gap:42px;color:var(--bg)}
.footer-column{min-width:0}
.footer-column h2,.footer-column h3{margin:0 0 16px;font-size:18px;line-height:1.25;color:inherit}
.footer-brand .footer-logo{display:inline-flex;align-items:center;margin:0 0 14px;line-height:0}
.footer-brand .footer-logo img{display:block;width:auto;max-width:220px;max-height:58px;object-fit:contain}
.footer-brand .custom-logo{display:block;width:auto;max-width:220px;max-height:58px;object-fit:contain}
.footer-brand p{margin:0;max-width:390px;color:var(--bg);opacity:.82;font-size:14px;line-height:1.45}
.footer-post-list{list-style:none!important;margin:0!important;padding:0!important}
.footer-post-list li{list-style:none!important;margin:0;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid rgba(255,255,255,.14)}
.footer-post-list li:last-child{border-bottom:0;margin-bottom:0}
.footer-post-list a{display:block;color:inherit;text-decoration:none;font-size:16px;font-weight:650;line-height:1.3}
.footer-post-list a:hover{text-decoration:underline}
.footer-post-list time{display:block;margin-top:5px;font-size:12px;opacity:.68}
.footer-random-heading{margin-top:22px!important}
.footer-bottom{grid-column:1/-1;border-top:1px solid rgba(255,255,255,.14);padding-top:18px;margin-top:4px;display:flex;justify-content:space-between;gap:20px;align-items:center;font-size:13px;opacity:.82}
.footer-bottom .footer-menu{width:auto;display:block}
.footer-bottom .footer-menu ul{display:flex;flex-wrap:wrap;gap:14px;list-style:none;margin:0;padding:0}
.footer-bottom .footer-menu li{list-style:none;margin:0;padding:0}
.footer-bottom .footer-menu a{color:inherit;text-decoration:none}
@media(max-width:900px){.footer-inner{grid-template-columns:1fr 1fr;gap:30px}.footer-brand{grid-column:1/-1}.footer-bottom{grid-column:1/-1}}
@media(max-width:600px){.footer-inner{grid-template-columns:1fr;padding:30px 18px 18px;gap:28px}.footer-brand,.footer-bottom{grid-column:auto}.footer-bottom{display:block}.footer-bottom .footer-menu{margin-bottom:10px}.footer-brand p{max-width:none}}
@media(prefers-color-scheme:dark){.site-footer{background:#08090a;color:#f1f3f5}.footer-brand p{color:#f1f3f5}.footer-post-list a{color:#f1f3f5}}


/* v1.4.6: clean white three-column footer. English column shows only 3 posts. */
.site-footer{background:#fff!important;color:var(--text)!important;border-top:1px solid var(--border);}
.site-footer .footer-inner{background:#fff!important;color:var(--text)!important;text-align:left;display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:34px;align-items:start;padding:34px 0 0;}
.site-footer .footer-column{min-width:0;}
.site-footer .footer-column h2{margin:0 0 14px;font-size:20px;line-height:1.25;}
.site-footer .footer-brand p{margin:10px 0 0;color:var(--muted);max-width:430px;}
.site-footer .footer-post-list{list-style:none;margin:0;padding:0;}
.site-footer .footer-post-list li{list-style:none;margin:0;padding:10px 0;border-top:1px solid var(--border);}
.site-footer .footer-post-list li:first-child{border-top:0;padding-top:0;}
.site-footer .footer-post-list a{display:block;color:var(--link);font-weight:600;text-decoration:none;line-height:1.4;}
.site-footer .footer-post-list time{display:block;margin-top:4px;color:var(--muted);font-size:12px;}
.site-footer .footer-bottom{grid-column:1/-1;border-top:1px solid var(--border);margin-top:6px;padding:18px 0;display:flex;justify-content:space-between;align-items:center;gap:20px;text-align:left;}
.site-footer .footer-menu{width:auto;display:flex;justify-content:flex-start;}
@media(max-width:850px){.site-footer .footer-inner{grid-template-columns:1fr 1fr;gap:24px;}.site-footer .footer-brand{grid-column:1/-1;}.site-footer .footer-bottom{grid-column:1/-1;}}
@media(max-width:600px){.site-footer .footer-inner{grid-template-columns:1fr;gap:22px;padding-top:26px;}.site-footer .footer-brand{grid-column:auto;}.site-footer .footer-bottom{grid-column:auto;flex-direction:column;align-items:flex-start;}}

/* v1.4.7: compact, stronger footer typography matching the requested demo. */
.site-footer{margin-top:28px;background:#fff!important;color:#17191c!important;border-top:1px solid #e1e4e8;}
.site-footer .footer-inner{padding:24px 0 0;gap:28px;}
.site-footer .footer-column h2{font-size:19px;font-weight:750;color:#111317;margin:0 0 10px;}
.site-footer .footer-brand .footer-logo{margin-bottom:8px;}
.site-footer .footer-brand .footer-logo img,.site-footer .footer-brand .custom-logo{max-width:215px;max-height:54px;}
.site-footer .footer-brand p{margin:6px 0 0;max-width:430px;color:#59616a;opacity:1;font-size:14px;font-weight:500;line-height:1.38;}
.site-footer .footer-post-list li{padding:7px 0;margin:0;border-top:1px solid #e1e4e8;border-bottom:0;}
.site-footer .footer-post-list li:first-child{padding-top:0;}
.site-footer .footer-post-list a{font-size:15px;font-weight:700;line-height:1.3;color:#175a96;text-decoration:none;}
.site-footer .footer-post-list a:hover{text-decoration:underline;}
.site-footer .footer-post-list time{margin-top:3px;font-size:11px;font-weight:500;color:#7a828b;}
.site-footer .footer-bottom{margin-top:2px;padding:12px 0;border-top:1px solid #e1e4e8;font-size:12px;font-weight:500;color:#4f565e;}
.site-footer .footer-bottom .footer-menu a{font-weight:600;color:#4f565e;}
@media(max-width:850px){.site-footer .footer-inner{gap:22px;padding-top:22px;}}
@media(max-width:600px){.site-footer .footer-inner{gap:18px;padding-top:20px;}.site-footer .footer-bottom{padding:11px 0;}}

/* v1.4.8: never reserve normal-page space for an empty bottom/anchor ad. */
#sao-anchor:empty,
.sottotv-ad-anchor-ad:empty,
.sottotv-ad-bottom-banner:empty{display:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;}
#sao-anchor{margin:0!important;padding:0!important;height:0!important;min-height:0!important;}
#sao-anchor .sao-slot{margin:0!important;padding:0!important;min-height:0!important;height:0!important;}
#sao-anchor .sao-stage{margin:0!important;padding:0!important;min-height:0!important;}
/* Once an actual anchor creative is inserted, let it sit fixed at the bottom. */
#sao-anchor.sao-has-ad{position:fixed!important;left:0;right:0;bottom:0;z-index:99998;width:100%;height:auto!important;min-height:0!important;background:transparent;display:flex;justify-content:center;align-items:flex-end;pointer-events:auto;}
#sao-anchor.sao-has-ad .sao-slot,
#sao-anchor.sao-has-ad .sao-stage{height:auto!important;min-height:0!important;width:100%;}


/* v1.4.9: never reserve blank document space for an unfilled theme ad. */
.sottotv-theme-ad{display:flex!important;width:100%;min-height:100px;height:auto!important;margin:18px auto!important;padding:0!important;border:0!important;overflow:visible!important;justify-content:center;align-items:center;text-align:center}
.sottotv-theme-ad.sottotv-ad-empty{min-height:100px!important;height:auto!important;margin:18px auto!important}
.sottotv-theme-ad.sottotv-ad-filled{min-height:0!important;height:auto!important;margin:18px auto!important}
.sottotv-ad-anchor-ad.sottotv-ad-empty{display:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important}
.sottotv-ad-anchor-ad.sottotv-ad-filled{display:flex}
@media(max-width:700px){.sottotv-theme-ad,.sottotv-theme-ad.sottotv-ad-empty,.sottotv-theme-ad.sottotv-ad-filled{margin:14px auto!important;}}


/* v1.5.10: anchor host is a zero-height transparent layer. The creative alone
   may overflow from the host, preventing the large opaque/backdrop area seen
   behind fixed-bottom ads. */
.sottotv-ad-anchor-ad,
#sao-anchor{
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.sottotv-ad-anchor-ad{
  position:fixed!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  z-index:99998!important;
  display:block!important;
}
.sottotv-ad-anchor-ad.sottotv-ad-empty{display:none!important;}
.sottotv-ad-anchor-ad.sottotv-ad-filled{display:block!important;}
.sottotv-ad-anchor-ad.sottotv-ad-filled > *{
  position:relative;
  display:block;
  width:auto;
  max-width:100%;
  margin:0 auto!important;
  background:transparent;
}
#sao-anchor.sao-has-ad{
  display:block!important;
  height:0!important;
  min-height:0!important;
  background:transparent!important;
  overflow:visible!important;
}
#sao-anchor.sao-has-ad .sao-slot,
#sao-anchor.sao-has-ad .sao-stage{
  height:auto!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:0!important;
  background:transparent!important;
  overflow:visible!important;
}

/* v1.5.10: the anchor host itself must never create a full-width fixed backdrop
   or reserve viewport/page space. The publisher's anchor creative controls its
   own size/positioning. */
.sottotv-ad-anchor-ad,
.sottotv-ad-anchor-ad.sottotv-ad-filled,
#sao-anchor,
#sao-anchor.sao-has-ad{
  position:static!important;
  inset:auto!important;
  width:0!important;
  max-width:0!important;
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
  overflow:visible!important;
  display:block!important;
  pointer-events:none!important;
}
.sottotv-ad-anchor-ad.sottotv-ad-empty,
#sao-anchor:not(.sao-has-ad){display:none!important;}
/* Never style the publisher creative itself; only remove spacing from the host. */
.sottotv-ad-anchor-ad > *,
#sao-anchor > *{margin:0!important;}
