/*
Theme Name: TG66 Digital News
Theme URI: https://example.com/tg66-digital-news
Author: TG66 Digital News
Description: Responsive English-language digital news theme with animated breaking ticker, featured stories, category sections and mobile navigation.
Version: 1.1.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: tg66-digital-news
*/
:root{--tg-navy:#071d3b;--tg-blue:#0c376b;--tg-red:#e31824;--tg-ink:#171b22;--tg-muted:#687386;--tg-line:#e6e9ef;--tg-bg:#f4f6f9;--tg-white:#fff;--tg-radius:12px;--tg-shadow:0 5px 22px rgba(7,29,59,.08)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--tg-bg);color:var(--tg-ink);font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;font-size:16px;line-height:1.65}a{color:inherit;text-decoration:none}a:hover{color:var(--tg-red)}img{max-width:100%;height:auto;display:block}button,input{font:inherit}.tg-container{width:min(1200px,calc(100% - 32px));margin:auto}.tg-topbar{background:#04152d;color:#dbe5f3;font-size:13px}.tg-topbar-inner{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:34px}.tg-brandbar{background:linear-gradient(110deg,var(--tg-navy),#0b3c78);color:#fff;border-bottom:3px solid var(--tg-red)}.tg-brand-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0}.tg-brand{display:flex;align-items:center;gap:13px;min-width:0}.tg-logo{font-size:clamp(34px,5vw,54px);font-weight:950;line-height:.95;letter-spacing:-2px;font-style:italic}.tg-logo span{background:var(--tg-red);padding:0 7px;border-radius:4px}.tg-tagline{border-left:2px solid rgba(255,255,255,.45);padding-left:18px;font-size:18px;font-weight:700;line-height:1.4}.tg-actions{display:flex;align-items:center;gap:10px}.tg-live{background:var(--tg-red);color:#fff;border:0;border-radius:7px;padding:8px 13px;font-weight:800}.tg-search{display:flex;background:#fff;border-radius:7px;overflow:hidden}.tg-search input{width:145px;border:0;padding:8px 10px;outline:0}.tg-search button{border:0;background:var(--tg-red);color:#fff;padding:0 12px}.tg-nav{background:#061a35;color:#fff}.tg-nav-inner{display:flex;align-items:center;gap:0;min-height:48px}.tg-nav a{padding:11px 15px;font-weight:700;white-space:nowrap}.tg-nav a:hover,.tg-nav .current-menu-item>a{background:var(--tg-red);color:#fff}.tg-menu{display:flex;list-style:none;margin:0;padding:0;gap:0}.tg-menu li{position:relative}.tg-menu .sub-menu{display:none;position:absolute;top:100%;left:0;z-index:20;min-width:190px;background:#061a35;padding:0;list-style:none;box-shadow:var(--tg-shadow)}.tg-menu li:hover>.sub-menu{display:block}.tg-menu .sub-menu a{display:block}.tg-mobile-toggle{display:none;background:transparent;border:1px solid #ffffff66;color:#fff;border-radius:6px;padding:6px 10px}.tg-breaking{display:flex;align-items:center;background:#fff;border:1px solid var(--tg-line);border-radius:9px;margin:16px 0;padding:7px 12px;overflow:hidden;box-shadow:var(--tg-shadow)}.tg-breaking-label{background:var(--tg-red);color:#fff;font-weight:900;padding:5px 12px;border-radius:5px;white-space:nowrap;margin-right:12px}.tg-breaking-track{overflow:hidden;white-space:nowrap;flex:1}.tg-breaking-track a{font-weight:700}.tg-breaking-track span{padding:0 12px;color:var(--tg-red)}.tg-grid-main{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:18px}.tg-lead-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(230px,.9fr);gap:14px}.tg-card{background:#fff;border:1px solid var(--tg-line);border-radius:var(--tg-radius);overflow:hidden;box-shadow:var(--tg-shadow)}.tg-feature{position:relative;min-height:390px;background:#102b50}.tg-feature img{width:100%;height:390px;object-fit:cover}.tg-feature:after{content:"";position:absolute;inset:35% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.9))}.tg-feature-content{position:absolute;z-index:1;bottom:0;left:0;right:0;padding:22px;color:#fff}.tg-tag{display:inline-block;background:var(--tg-red);color:#fff;padding:3px 10px;border-radius:4px;font-size:13px;font-weight:800;margin-bottom:8px}.tg-feature h1{font-size:clamp(23px,3vw,34px);line-height:1.35;margin:0 0 7px;font-weight:900}.tg-meta{font-size:13px;color:#dce4ef}.tg-side-stories{display:flex;flex-direction:column;gap:10px}.tg-mini-story{display:grid;grid-template-columns:116px 1fr;gap:11px;padding:9px;background:#fff;border:1px solid var(--tg-line);border-radius:10px;min-height:112px}.tg-mini-story img{width:116px;height:92px;object-fit:cover;border-radius:7px}.tg-mini-story h3{font-size:16px;line-height:1.45;margin:0 0 4px}.tg-section{margin-top:22px}.tg-section-head{display:flex;align-items:center;justify-content:space-between;border-bottom:3px solid var(--tg-red);margin-bottom:12px}.tg-section-head h2{display:inline-block;background:var(--tg-red);color:#fff;margin:0;padding:5px 16px;font-size:21px;line-height:1.5;border-radius:7px 7px 0 0}.tg-section-head a{font-weight:700;color:var(--tg-red);font-size:14px}.tg-story-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.tg-story-card{background:#fff;border:1px solid var(--tg-line);border-radius:10px;overflow:hidden;box-shadow:var(--tg-shadow)}.tg-story-card img{width:100%;height:155px;object-fit:cover}.tg-story-card-body{padding:11px 13px}.tg-story-card h3{font-size:17px;line-height:1.45;margin:0 0 6px}.tg-sidebar-box{background:#fff;border:1px solid var(--tg-line);border-radius:10px;overflow:hidden;margin-bottom:16px;box-shadow:var(--tg-shadow)}.tg-sidebar-title{background:var(--tg-red);color:#fff;font-weight:900;font-size:20px;padding:8px 13px}.tg-trending{list-style:none;padding:0;margin:0;counter-reset:trend}.tg-trending li{counter-increment:trend;border-bottom:1px solid var(--tg-line);padding:11px 12px;display:flex;gap:10px;font-weight:700;line-height:1.45}.tg-trending li:before{content:counter(trend);background:var(--tg-red);color:#fff;border-radius:5px;min-width:27px;height:27px;text-align:center;line-height:27px}.tg-district-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.tg-district-card{position:relative;border-radius:10px;overflow:hidden;min-height:145px;background:var(--tg-navy)}.tg-district-card img{width:100%;height:145px;object-fit:cover;opacity:.82}.tg-district-card strong{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,rgba(0,0,0,.9));color:#fff;padding:25px 10px 9px;font-size:17px}.tg-content{background:#fff;border:1px solid var(--tg-line);border-radius:12px;padding:22px;box-shadow:var(--tg-shadow)}.tg-content h1{line-height:1.35}.tg-content .wp-post-image{width:100%;max-height:520px;object-fit:cover;border-radius:9px;margin:14px 0}.tg-content p{font-size:18px;line-height:1.9}.tg-pagination{margin:22px 0}.tg-pagination .page-numbers{display:inline-block;padding:7px 12px;background:#fff;border:1px solid var(--tg-line);border-radius:6px;margin:2px}.tg-pagination .current{background:var(--tg-red);color:#fff}.tg-footer{margin-top:35px;background:#04152d;color:#e8eef8;padding:28px 0}.tg-footer-inner{display:flex;justify-content:space-between;gap:20px;align-items:center}.tg-footer .tg-logo{font-size:32px}.tg-footer p{margin:5px 0;color:#b8c5d8}.tg-empty{padding:35px;text-align:center;background:#fff;border-radius:10px}.tg-video-placeholder{background:#081d3a;color:#fff;border-radius:10px;padding:28px;text-align:center}.tg-video-placeholder a{display:inline-block;background:var(--tg-red);padding:8px 14px;border-radius:6px;color:#fff;font-weight:800}
@media(max-width:900px){.tg-tagline{display:none}.tg-grid-main{grid-template-columns:1fr}.tg-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tg-lead-layout{grid-template-columns:1.4fr 1fr}.tg-nav a{padding:10px 11px;font-size:14px}}
@media(max-width:640px){body{font-size:15px}.tg-container{width:calc(100% - 20px)}.tg-topbar{display:none}.tg-brand-inner{padding:10px 0;gap:8px}.tg-logo{font-size:35px}.tg-brand{gap:8px}.tg-actions{gap:6px}.tg-search input{display:none}.tg-search button{padding:7px 10px}.tg-live{font-size:12px;padding:7px 8px}.tg-mobile-toggle{display:block}.tg-nav-inner{display:block;min-height:0}.tg-menu{display:none;flex-direction:column;padding:5px 0}.tg-menu.is-open{display:flex}.tg-menu a{display:block;padding:9px 12px;border-bottom:1px solid #ffffff18}.tg-menu .sub-menu{position:static;display:block;box-shadow:none;padding-left:12px}.tg-breaking{margin:10px 0;padding:6px}.tg-breaking-label{font-size:12px;padding:5px 7px;margin-right:8px}.tg-breaking-track{font-size:13px}.tg-lead-layout{grid-template-columns:1fr;gap:9px}.tg-feature{min-height:275px}.tg-feature img{height:275px}.tg-feature-content{padding:13px}.tg-feature h1{font-size:22px}.tg-side-stories{display:grid;grid-template-columns:1fr}.tg-mini-story{grid-template-columns:105px 1fr;min-height:96px;padding:7px}.tg-mini-story img{width:105px;height:82px}.tg-mini-story h3{font-size:14px}.tg-sidebar{display:block}.tg-section{margin-top:17px}.tg-section-head h2{font-size:18px}.tg-story-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.tg-story-card img{height:112px}.tg-story-card-body{padding:8px}.tg-story-card h3{font-size:14px}.tg-district-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.tg-district-card,.tg-district-card img{min-height:115px;height:115px}.tg-content{padding:14px}.tg-content p{font-size:16px}.tg-footer-inner{display:block}.tg-footer .tg-logo{margin-bottom:8px}}
/* TG66 compact mobile header refinement */
.tg-brand-inner{min-height:88px;padding:9px 0;gap:12px}
.tg-logo-image{display:block;flex:0 1 300px;min-width:0;line-height:0}
.tg-logo-image img{width:100%;max-width:300px;height:auto;max-height:92px;object-fit:contain}
.tg-actions{flex:0 0 auto;display:flex;align-items:center;gap:9px;white-space:nowrap}
.tg-live{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:8px 12px;white-space:nowrap;line-height:1;font-size:14px}
.tg-live-dot{font-size:11px}
.tg-search-toggle{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;background:var(--tg-red);color:#fff;border:0;border-radius:7px;font-size:27px;line-height:1;cursor:pointer}
.tg-search-panel{background:#08254a;padding:10px max(10px,calc((100% - 1200px)/2));border-top:1px solid #ffffff22}
.tg-search-panel .tg-search{max-width:500px;margin-left:auto}
.tg-search-panel .tg-search input{display:block;width:100%;min-width:0}
.tg-mobile-toggle{width:42px;height:42px;flex:0 0 42px;align-items:center;justify-content:center;padding:0;font-size:21px;cursor:pointer}
@media(max-width:640px){
 .tg-brand-inner{width:calc(100% - 24px);min-height:78px;padding:8px 0;gap:9px;justify-content:space-between}
 .tg-mobile-toggle{display:inline-flex}
 .tg-logo-image{flex:1 1 auto;width:auto;max-width:190px;min-width:0}
 .tg-logo-image img{width:100%;max-width:190px;max-height:64px}
 .tg-actions{gap:6px;flex:0 0 auto}
 .tg-live{min-height:38px;padding:7px 8px;font-size:12px;gap:4px}
 .tg-search-toggle{width:38px;height:38px;font-size:24px}
 .tg-nav-inner{display:block;min-height:0}
 .tg-menu{display:none;flex-direction:column;padding:5px 0}
 .tg-menu.is-open{display:flex}
 .tg-menu a{display:block;padding:9px 12px;border-bottom:1px solid #ffffff18}
 .tg-menu .sub-menu{position:static;display:block;box-shadow:none;padding-left:12px}
}
@media(max-width:360px){.tg-logo-image{max-width:145px}.tg-live{font-size:11px;padding:6px}.tg-mobile-toggle{width:36px;height:38px;flex-basis:36px}.tg-search-toggle{width:36px;height:38px}}

/* TG66 English International Edition v1.1.0 */
.tg-brand-inner{justify-content:space-between}
.tg-breaking{gap:0}
.tg-breaking-viewport{flex:1;min-width:0;overflow:hidden;white-space:nowrap}
.tg-breaking-track{display:inline-flex;align-items:center;gap:22px;width:max-content;min-width:100%;padding-left:0;animation:tg66TickerScroll 85s linear infinite;will-change:transform}
.tg-breaking-track:hover{animation-play-state:paused}
.tg-breaking-track a{display:inline-block;white-space:nowrap;font-weight:700;color:var(--tg-ink)}
.tg-breaking-track span{color:var(--tg-red);padding:0}
.tg-ticker-empty{font-weight:600}
@keyframes tg66TickerScroll{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}
.tg-image-placeholder,.tg-mini-placeholder,.tg-story-placeholder{background:linear-gradient(135deg,#0b376b,#dbe5f3);}
.tg-image-placeholder{height:390px}
.tg-mini-placeholder{width:116px;height:92px;border-radius:7px}
.tg-story-placeholder{height:155px}
.tg-video-placeholder{display:none!important}
@media(max-width:640px){.tg-breaking-track{gap:15px;animation-duration:65s}.tg-image-placeholder{height:275px}.tg-mini-placeholder{width:105px;height:82px}.tg-story-placeholder{height:112px}.tg-breaking{gap:6px}}
@media(prefers-reduced-motion:reduce){.tg-breaking-track{animation:none;padding-left:0;white-space:normal;flex-wrap:wrap}}
.tg-home-link{display:inline-block;background:var(--tg-red);color:#fff;padding:9px 15px;border-radius:6px;font-weight:800}

/* v1.1.1: default Breaking News image when an article has no featured image */
.tg-single-featured-image{display:block;width:100%;height:auto;max-height:520px;object-fit:cover;border-radius:10px;margin:14px 0 18px}

/* v1.1.2: keep the words in the fallback graphic separate from the article headline */
.tg-feature.has-fallback-image{background:#fff}
.tg-feature-fallback-link{display:flex;flex-direction:column;height:100%;color:var(--tg-ink)}
.tg-feature-fallback-media{width:100%;height:185px;overflow:hidden;background:#061a35}
.tg-feature-fallback-media img{display:block;width:100%;height:100%;object-fit:cover}
.tg-feature-content-fallback{position:static;background:#071d3b;color:#fff;padding:17px 19px 19px}
.tg-feature-content-fallback h1{font-size:clamp(21px,2.5vw,29px);line-height:1.28;margin:0 0 9px}
.tg-feature-content-fallback .tg-meta{color:#dce4ef}
@media(max-width:640px){
 .tg-feature-fallback-media{height:150px}
 .tg-feature-content-fallback{padding:12px 13px 14px}
 .tg-feature-content-fallback h1{font-size:21px;line-height:1.3}
}
