/*
Theme Name: Rattana
Theme URI: https://yourdomain.com/rattana
Author: Rattana
Description: Bold professional news with dark top-stories banner and ticker.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rattana
Tags: news, blog, magazine, two-columns, right-sidebar, custom-logo, featured-images, threaded-comments, translation-ready
*/

:root{
  --bg:      #f4f7fb;
  --bg2:     #ffffff;
  --ink:     #0d1b2a;
  --ink2:    #2d3e50;
  --ink3:    #7f8c8d;
  --accent:  #1a5276;
  --accent2: #2980b9;
  --aclt:    #eaf2fb;
  --gold:    #f39c12;
  --border:  #d6e4f0;
  --sh:      0 2px 16px rgba(0,0,0,.07);
  --sh-lg:   0 8px 40px rgba(0,0,0,.13);
  --fh:      'DM Serif Display', Georgia, serif;
  --fb:      'DM Sans', system-ui, -apple-system, sans-serif;
  --r:       4px;
  --mw:      1240px;
  --pad:     clamp(14px,4vw,24px);
}
/* =============================================================
   VARIABLES
   ============================================================= */
:root {
  --bg:       #f7f4ef;
  --bg2:      #ffffff;
  --ink:      #1a1612;
  --ink2:     #4a453f;
  --ink3:     #8a847c;
  --accent:   #c0392b;
  --accent2:  #e74c3c;
  --aclt:     #fdf0ee;
  --gold:     #d4a04a;
  --border:   #e8e2d9;
  --sh:       0 2px 16px rgba(26,22,18,.07);
  --sh-lg:    0 8px 40px rgba(26,22,18,.13);
  --fh:       'DM Serif Display', Georgia, serif;
  --fb:       'DM Sans', system-ui, -apple-system, sans-serif;
  --r:        6px;
  --mw:       1240px;
  --pad:      clamp(14px, 4vw, 24px);
}

/* =============================================================
   RESET
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fb);
  font-size: clamp(15px, 1.5vw, 16px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* =============================================================
   UTILITIES
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--mw);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* =============================================================
   AUTO FALLBACK IMAGE — styling
   ============================================================= */
/* When a post has no featured image, .siyean-fallback-img is used */
.siyean-fallback-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
/* Fallback image gets a subtle overlay label */
.fallback-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(26,22,18,.55);
  color: rgba(255,255,255,.6);
  font-size: .58rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  z-index: 3;
  pointer-events: none;
}

/* =============================================================
   TOPBAR
   ============================================================= */
.topbar { background: var(--ink); color: rgba(255,255,255,.6); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; padding: 6px 0; }
.topbar-inner { max-width: var(--mw); margin: auto; padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.topbar-links { display: flex; align-items: center; gap: 16px; }
.topbar-links a:hover { color: var(--gold); transition: color .15s; }
.topbar-social { display: flex; gap: 10px; }
.topbar-social a { font-size: .8rem; transition: color .15s; }
.topbar-social a:hover { color: var(--gold); }
.topbar-date { color: rgba(255,255,255,.35); font-size: .65rem; }

/* =============================================================
   SITE HEADER
   ============================================================= */
.site-header { background: var(--bg2); border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 500; box-shadow: var(--sh); }
.header-inner { max-width: var(--mw); margin: auto; padding: 0 var(--pad); height: 64px; display: flex; align-items: center; gap: 16px; }
.site-logo-wrap { flex-shrink: 0; }
.site-logo-wrap img { height: 40px; width: auto; }
.site-title { font-family: var(--fh); font-size: clamp(1.4rem, 3vw, 1.85rem); color: var(--ink); letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.site-title span { color: var(--accent); }
.site-title a { color: inherit; }
.main-nav-wrap { flex: 1; overflow: hidden; }
#primary-menu { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#primary-menu::-webkit-scrollbar { display: none; }
#primary-menu li { position: relative; flex-shrink: 0; }
#primary-menu li a { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 6px 11px; border-radius: var(--r); white-space: nowrap; transition: background .15s, color .15s; }
#primary-menu li a:hover,
#primary-menu li.current-menu-item > a,
#primary-menu li.current-menu-ancestor > a { background: var(--aclt); color: var(--accent); }
#primary-menu li ul { display: none; position: absolute; top: calc(100% + 4px); left: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-lg); min-width: 200px; z-index: 600; padding: 6px 0; }
#primary-menu li:hover > ul { display: block; }
#primary-menu li ul li a { padding: 9px 16px; border-radius: 0; font-size: .78rem; text-transform: none; letter-spacing: 0; }
.header-search { display: flex; align-items: center; gap: 7px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 99px; padding: 5px 12px; transition: border-color .2s; flex-shrink: 0; }
.header-search:focus-within { border-color: var(--accent); }
.header-search .search-icon { color: var(--ink3); flex-shrink: 0; }
.header-search input[type="search"],
.header-search input[type="text"] { background: none; border: none; outline: none; width: 130px; font-size: .82rem; color: var(--ink); }
.header-search button[type="submit"] { background: none; border: none; cursor: pointer; padding: 0; display: flex; color: var(--ink3); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 5px; color: var(--ink); flex-shrink: 0; margin-left: auto; }

/* =============================================================
   MOBILE NAV
   ============================================================= */
.mobile-nav { display: none; position: fixed; inset: 0; background: var(--ink); z-index: 9999; padding: 72px var(--pad) 40px; flex-direction: column; overflow-y: auto; }
.mobile-nav.open { display: flex; }
.mobile-nav a { display: block; font-size: 1rem; font-weight: 500; color: rgba(255,255,255,.8); padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.07); transition: color .15s; }
.mobile-nav a:hover { color: var(--accent); }
.mobile-nav-close { position: fixed; top: 16px; right: 16px; background: rgba(255,255,255,.1); border: none; color: #fff; font-size: 1.2rem; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 10000; }

/* =============================================================
   BREAKING BAR
   ============================================================= */
.breaking-bar { background: var(--accent); color: #fff; font-size: .76rem; font-weight: 500; padding: 8px 0; overflow: hidden; }
.breaking-inner { max-width: var(--mw); margin: auto; padding: 0 var(--pad); display: flex; align-items: center; gap: 14px; }
.breaking-label { background: #fff; color: var(--accent); font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 3px; flex-shrink: 0; white-space: nowrap; }
.breaking-ticker { overflow: hidden; flex: 1; min-width: 0; }
.breaking-ticker-inner { display: flex; gap: 48px; white-space: nowrap; animation: ticker 30s linear infinite; }
.breaking-ticker-inner span::before { content: "▸ "; opacity: .7; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =============================================================
   CATEGORY STRIP
   ============================================================= */
.cat-strip { background: var(--bg2); border-bottom: 1px solid var(--border); overflow: hidden; }
.cat-strip-inner { max-width: var(--mw); margin: auto; padding: 0 var(--pad); display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cat-strip-inner::-webkit-scrollbar { display: none; }
.cat-link { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 10px 14px; border-bottom: 3px solid transparent; white-space: nowrap; color: var(--ink2); transition: color .15s, border-color .15s; flex-shrink: 0; }
.cat-link:hover, .cat-link.current { color: var(--accent); border-bottom-color: var(--accent); }

/* =============================================================
   BREADCRUMBS
   ============================================================= */
.breadcrumbs { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 10px 0; font-size: .74rem; color: var(--ink3); }
.breadcrumbs .container { display: flex; align-items: center; flex-wrap: wrap; }
.breadcrumbs a { color: var(--ink3); transition: color .15s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 6px; color: var(--border); }
.breadcrumbs .current { color: var(--ink2); }

/* =============================================================
   SECTION HEADERS
   ============================================================= */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--border); gap: 12px; }
.section-title { font-family: var(--fh); font-size: clamp(1.1rem, 2.5vw, 1.35rem); color: var(--ink); position: relative; padding-left: 14px; }
.section-title::before { content: ''; position: absolute; left: 0; top: 8%; bottom: 8%; width: 4px; background: var(--accent); border-radius: 2px; }
.see-all { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); white-space: nowrap; flex-shrink: 0; transition: opacity .15s; }
.see-all:hover { opacity: .75; }
.category-link { display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; transition: opacity .15s; }
.category-link:hover { opacity: .75; }

/* =============================================================
   HERO
   ============================================================= */
.hero { padding: clamp(20px, 4vw, 40px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.featured-post { background: var(--bg2); border-radius: 10px; overflow: hidden; box-shadow: var(--sh-lg); display: flex; flex-direction: column; height: 100%; }
.featured-post .fp-thumb { position: relative; padding-top: 55%; overflow: hidden; flex-shrink: 0; }
.featured-post .fp-thumb a { position: absolute; inset: 0; display: block; }
.featured-post .fp-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.featured-post:hover .fp-thumb img { transform: scale(1.04); }
.featured-post .thumb-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(20,15,10,.8) 100%); pointer-events: none; }
.post-badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff; font-size: .63rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; z-index: 2; }
.featured-post .fp-content { padding: clamp(16px, 3vw, 24px); flex: 1; border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; }
.featured-post h2 { font-family: var(--fh); font-size: clamp(1.2rem, 2.5vw, 1.7rem); line-height: 1.25; color: var(--ink); margin-bottom: 10px; transition: color .2s; }
.featured-post:hover h2 { color: var(--accent); }
.featured-post .excerpt { font-size: .88rem; color: var(--ink2); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-secondary { display: flex; flex-direction: column; gap: 14px; }
.mini-card { background: var(--bg2); border-radius: 8px; overflow: hidden; border: 1px solid var(--border); display: flex; box-shadow: var(--sh); transition: transform .2s, box-shadow .2s; min-height: 90px; }
.mini-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.mini-card .mc-thumb { width: 110px; min-width: 110px; overflow: hidden; flex-shrink: 0; position: relative; }
.mini-card .mc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; position: absolute; inset: 0; }
.mini-card:hover .mc-thumb img { transform: scale(1.07); }
.mini-card .mc-content { padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; }
.mini-card h3 { font-family: var(--fh); font-size: .95rem; line-height: 1.3; color: var(--ink); transition: color .2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-card:hover h3 { color: var(--accent); }
.mini-card .mc-meta { font-size: .7rem; color: var(--ink3); }

/* =============================================================
   AD UNITS
   ============================================================= */
.ad-unit { width: 100%; display: flex; justify-content: center; align-items: center; margin: 24px 0; overflow: hidden; }
.ad-placeholder { background: var(--bg2); border: 1.5px dashed var(--border); border-radius: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink3); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; gap: 4px; padding: 14px; max-width: 100%; }
.ad-placeholder small { opacity: .5; font-size: .6rem; }

/* =============================================================
   MAIN LAYOUT
   ============================================================= */
.main-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; padding: clamp(24px,5vw,44px) 0 clamp(40px,6vw,64px); align-items: start; }

/* =============================================================
   POST CARDS
   ============================================================= */
.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.post-card { background: var(--bg2); border-radius: 8px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--sh); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.post-card .pc-thumb { position: relative; padding-top: 58%; overflow: hidden; flex-shrink: 0; }
.post-card .pc-thumb a { position: absolute; inset: 0; display: block; }
.post-card .pc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .pc-thumb img { transform: scale(1.06); }
.post-card .pc-content { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.post-card h3 { font-family: var(--fh); font-size: 1.05rem; line-height: 1.3; color: var(--ink); transition: color .2s; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card:hover h3 { color: var(--accent); }
.post-card .excerpt { font-size: .82rem; color: var(--ink2); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: 8px; font-size: .71rem; color: var(--ink3); flex-wrap: wrap; margin-top: auto; }
.post-meta .author-link { display: flex; align-items: center; gap: 5px; }
.post-meta .author-link img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.meta-sep { width: 3px; height: 3px; background: var(--border); border-radius: 50%; flex-shrink: 0; }
.reading-time { margin-left: auto; }
.load-more-wrap { text-align: center; margin-top: 28px; }
.btn-load-more { display: inline-flex; align-items: center; gap: 8px; background: var(--bg2); border: 2px solid var(--border); color: var(--ink2); font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 11px 26px; border-radius: 99px; cursor: pointer; transition: border-color .2s, color .2s, background .2s; width: 100%; max-width: 260px; justify-content: center; }
.btn-load-more:hover { border-color: var(--accent); color: var(--accent); background: var(--aclt); }
.btn-load-more:disabled { opacity: .6; cursor: not-allowed; }

/* =============================================================
   SIDEBAR
   ============================================================= */
.sidebar { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.widget { background: var(--bg2); border-radius: 8px; border: 1px solid var(--border); overflow: hidden; box-shadow: var(--sh); }
.widgettitle, .widget-title { font-family: var(--fh); font-size: .95rem; color: var(--ink); padding: 13px 18px 11px; border-bottom: 1px solid var(--border); background: var(--bg); margin: 0; }
.widget .widget-body, .widget .textwidget { padding: 14px 18px; }
.widget ul { padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.widget ul li a { font-size: .83rem; color: var(--ink2); transition: color .15s; display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.widget ul li a:hover { color: var(--accent); }
.popular-list { display: flex; flex-direction: column; }
.popular-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); transition: background .15s; }
.popular-item:last-child { border-bottom: none; }
.popular-item:hover { background: var(--bg); }
.popular-num { font-family: var(--fh); font-size: 1.4rem; line-height: 1; color: var(--border); flex-shrink: 0; width: 22px; text-align: center; padding-top: 2px; }
.popular-item:nth-child(1) .popular-num { color: var(--accent); }
.popular-item:nth-child(2) .popular-num { color: var(--gold); }
.popular-item h4 { font-family: var(--fh); font-size: .88rem; line-height: 1.3; color: var(--ink); transition: color .2s; }
.popular-item:hover h4 { color: var(--accent); }
.popular-item .item-meta { font-size: .68rem; color: var(--ink3); margin-top: 3px; }
.tag-cloud, .tags-wrap { padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud-link, .tag { background: var(--bg); border: 1px solid var(--border); color: var(--ink2); font-size: .73rem !important; font-weight: 500; padding: 4px 11px; border-radius: 99px; transition: all .15s; white-space: nowrap; }
.tag-cloud-link:hover, .tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.newsletter-widget { background: var(--ink) !important; border-color: var(--ink) !important; }
.newsletter-widget .widgettitle, .newsletter-widget .widget-title { background: rgba(255,255,255,.05); color: #fff; border-color: rgba(255,255,255,.1); }
.newsletter-body { padding: 18px; }
.newsletter-body p { font-size: .82rem; color: rgba(255,255,255,.65); margin-bottom: 12px; line-height: 1.6; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input[type="email"] { background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.15); border-radius: var(--r); padding: 9px 13px; font-size: .82rem; color: #fff; outline: none; transition: border-color .2s; width: 100%; }
.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,.35); }
.newsletter-form input[type="email"]:focus { border-color: var(--accent); }
.newsletter-form button { background: var(--accent); color: #fff; border: none; border-radius: var(--r); padding: 9px 13px; font-size: .8rem; font-weight: 600; cursor: pointer; letter-spacing: .04em; text-transform: uppercase; transition: background .15s; width: 100%; }
.newsletter-form button:hover { background: var(--accent2); }

/* =============================================================
   TRENDING
   ============================================================= */
.trending-section { padding: clamp(28px,5vw,44px) 0; border-top: 1px solid var(--border); }
.trending-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 20px; }
.trending-card { background: var(--bg2); border-radius: 8px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--sh); transition: transform .2s, box-shadow .2s; }
.trending-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.trending-card .tc-thumb { position: relative; padding-top: 65%; overflow: hidden; }
.trending-card .tc-thumb a { position: absolute; inset: 0; display: block; }
.trending-card .tc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.trending-card:hover .tc-thumb img { transform: scale(1.07); }
.trending-card .tc-content { padding: 14px 14px 16px; }
.trending-card h3 { font-family: var(--fh); font-size: .95rem; line-height: 1.3; color: var(--ink); transition: color .2s; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trending-card:hover h3 { color: var(--accent); }
.trending-card .tc-meta { font-size: .7rem; color: var(--ink3); margin-top: 7px; }

/* =============================================================
   SINGLE POST
   ============================================================= */
.progress-bar { position: fixed; top: 67px; left: 0; height: 3px; background: var(--accent); width: 0%; z-index: 400; transition: width .1s linear; }
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding: clamp(20px,4vw,36px) 0 clamp(40px,6vw,64px); align-items: start; }
.article-main { min-width: 0; }
.article-category-badge { display: inline-block; background: var(--accent); color: #fff; font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 3px; margin-bottom: 14px; }
.article-title { font-family: var(--fh); font-size: clamp(1.5rem, 4vw, 2.35rem); line-height: 1.2; color: var(--ink); margin-bottom: 14px; letter-spacing: -.02em; }
.article-deck { font-size: clamp(.9rem,1.5vw,1.08rem); color: var(--ink2); line-height: 1.65; margin-bottom: 20px; border-left: 4px solid var(--accent); padding-left: 18px; font-style: italic; }
.article-meta-bar { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.author-avatar-lg { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.author-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.author-meta .name { font-size: .85rem; font-weight: 600; color: var(--ink); }
.author-meta .name a:hover { color: var(--accent); }
.author-meta .date { font-size: .74rem; color: var(--ink3); }
.article-stats { display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.stat-item { font-size: .74rem; color: var(--ink3); white-space: nowrap; }
.share-bar { display: flex; align-items: center; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.share-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); flex-shrink: 0; }
.share-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border-radius: 99px; font-size: .73rem; font-weight: 600; cursor: pointer; border: none; transition: opacity .15s, transform .15s; white-space: nowrap; }
.share-btn:hover { opacity: .88; transform: translateY(-1px); }
.share-tw { background: #000; color: #fff; }
.share-fb { background: #1877f2; color: #fff; }
.share-wa { background: #25d366; color: #fff; }
.share-copy { background: var(--bg2); color: var(--ink2); border: 1.5px solid var(--border) !important; }
.post-hero-image { border-radius: 10px; overflow: hidden; margin-bottom: 6px; box-shadow: var(--sh-lg); position: relative; }
.post-hero-image img { width: 100%; max-height: 480px; object-fit: cover; }
.image-caption { font-size: .73rem; color: var(--ink3); text-align: center; margin-bottom: 26px; }
.entry-content { font-size: clamp(.95rem,1.4vw,1.02rem); line-height: 1.85; color: var(--ink2); }
.entry-content h2 { font-family: var(--fh); font-size: clamp(1.3rem,2.5vw,1.6rem); color: var(--ink); margin: 36px 0 14px; line-height: 1.25; }
.entry-content h3 { font-family: var(--fh); font-size: clamp(1.1rem,2vw,1.25rem); color: var(--ink); margin: 26px 0 11px; }
.entry-content h4 { font-family: var(--fh); font-size: 1rem; color: var(--ink); margin: 20px 0 9px; }
.entry-content p { margin-bottom: 18px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content strong { color: var(--ink); font-weight: 600; }
.entry-content blockquote { border-left: 4px solid var(--accent); padding: 14px 18px 14px 22px; background: var(--aclt); border-radius: 0 8px 8px 0; margin: 26px 0; font-size: 1.04rem; font-style: italic; color: var(--ink); }
.entry-content blockquote cite { display: block; font-size: .78rem; color: var(--ink3); margin-top: 8px; font-style: normal; }
.entry-content ul { list-style: disc; margin: 0 0 18px 22px; display: flex; flex-direction: column; gap: 7px; }
.entry-content ol { list-style: decimal; margin: 0 0 18px 22px; display: flex; flex-direction: column; gap: 7px; }
.entry-content li { line-height: 1.7; }
.entry-content img { border-radius: 8px; margin: 24px 0 6px; box-shadow: var(--sh); width: 100%; }
.entry-content figure { margin: 24px 0; }
.entry-content figcaption { font-size: .74rem; color: var(--ink3); text-align: center; margin-top: 7px; }
.entry-content pre { background: var(--ink); color: #e8e2d9; padding: 18px 22px; border-radius: 8px; overflow-x: auto; margin: 22px 0; font-size: .86rem; line-height: 1.6; }
.entry-content code { background: var(--bg); border: 1px solid var(--border); padding: 2px 5px; border-radius: 4px; font-size: .87em; color: var(--accent); }
.entry-content pre code { background: none; border: none; padding: 0; color: inherit; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .86rem; overflow-x: auto; display: block; }
.entry-content th { background: var(--ink); color: #fff; padding: 9px 13px; text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.entry-content td { padding: 9px 13px; border-bottom: 1px solid var(--border); }
.entry-content tr:nth-child(even) td { background: var(--bg); }
.article-footer-section { margin-top: 44px; padding-top: 22px; border-top: 2px solid var(--border); }
.post-tags-list { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 20px; }
.post-tag { background: var(--bg); border: 1px solid var(--border); color: var(--ink2); font-size: .73rem; font-weight: 500; padding: 4px 11px; border-radius: 99px; transition: all .15s; }
.post-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.author-bio-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: flex; gap: 18px; margin-top: 28px; box-shadow: var(--sh); align-items: flex-start; }
.author-bio-box .author-photo { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-bio-info h4 { font-family: var(--fh); font-size: 1rem; color: var(--ink); margin-bottom: 6px; }
.author-bio-info p { font-size: .82rem; color: var(--ink2); line-height: 1.6; }
.author-bio-links { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.author-bio-links a { font-size: .73rem; color: var(--accent); font-weight: 600; }
.related-posts { margin-top: 44px; }
.related-posts h3 { font-family: var(--fh); font-size: clamp(1.1rem,2.5vw,1.3rem); color: var(--ink); margin-bottom: 18px; padding-bottom: 11px; border-bottom: 2px solid var(--border); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: var(--sh); transition: transform .2s, box-shadow .2s; }
.related-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.related-card .rc-thumb { position: relative; padding-top: 60%; overflow: hidden; }
.related-card .rc-thumb a { position: absolute; inset: 0; display: block; }
.related-card .rc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.related-card:hover .rc-thumb img { transform: scale(1.06); }
.related-card .rc-content { padding: 12px 14px 16px; }
.related-card .cat-label { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 4px; }
.related-card h4 { font-family: var(--fh); font-size: .92rem; line-height: 1.3; color: var(--ink); transition: color .2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card:hover h4 { color: var(--accent); }
.related-card .card-date { font-size: .68rem; color: var(--ink3); margin-top: 7px; }
.toc-nav { display: flex; flex-direction: column; padding: 12px 14px; gap: 1px; }
.toc-nav a { font-size: .8rem; color: var(--ink2); padding: 6px 10px; border-radius: var(--r); border-left: 2px solid transparent; transition: all .15s; display: block; line-height: 1.4; }
.toc-nav a:hover, .toc-nav a.active { color: var(--accent); background: var(--aclt); border-left-color: var(--accent); }
.comments-area { margin-top: 44px; }
.comments-title { font-family: var(--fh); font-size: clamp(1.1rem,2.5vw,1.3rem); color: var(--ink); margin-bottom: 22px; padding-bottom: 11px; border-bottom: 2px solid var(--border); }
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; }
.comment { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 18px; box-shadow: var(--sh); }
.comment-author-name { font-weight: 600; font-size: .86rem; color: var(--ink); }
.comment-meta-date { font-size: .7rem; color: var(--ink3); margin-top: 2px; }
.comment-content { font-size: .86rem; color: var(--ink2); margin-top: 10px; line-height: 1.65; }
.comment-reply-link { font-size: .73rem; color: var(--accent); font-weight: 600; margin-top: 10px; display: inline-block; }
.comment-form { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 22px; box-shadow: var(--sh); }
.comment-form h3 { font-family: var(--fh); font-size: 1.05rem; margin-bottom: 18px; color: var(--ink); }
.comment-form p { margin-bottom: 13px; }
.comment-form label { display: block; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink2); margin-bottom: 5px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea { width: 100%; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r); padding: 9px 13px; font-size: .86rem; color: var(--ink); outline: none; transition: border-color .2s; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { resize: vertical; min-height: 110px; }
.comment-form .submit { background: var(--accent); color: #fff; border: none; border-radius: var(--r); padding: 10px 26px; font-size: .8rem; font-weight: 600; cursor: pointer; letter-spacing: .04em; text-transform: uppercase; transition: background .15s; }
.comment-form .submit:hover { background: var(--accent2); }
.pagination, .wp-pagenavi, .nav-links { display: flex; gap: 7px; justify-content: center; margin: 36px 0; flex-wrap: wrap; }
.pagination .page-numbers, .wp-pagenavi a, .wp-pagenavi span, .nav-links a, .nav-links span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: var(--r); background: var(--bg2); border: 1.5px solid var(--border); font-size: .8rem; font-weight: 600; color: var(--ink2); transition: all .15s; padding: 0 10px; }
.pagination .page-numbers:hover, .wp-pagenavi a:hover, .nav-links a:hover { border-color: var(--accent); color: var(--accent); background: var(--aclt); }
.pagination .current, .wp-pagenavi .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.meta-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .72rem; color: var(--ink3); }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer { background: var(--ink); color: rgba(255,255,255,.6); margin-top: clamp(40px,6vw,64px); }
.footer-top { max-width: var(--mw); margin: auto; padding: clamp(32px,5vw,52px) var(--pad) clamp(28px,4vw,44px); display: grid; grid-template-columns: 260px 1fr 1fr 1fr; gap: 36px; }
.footer-brand .site-title { display: block; color: #fff; margin-bottom: 12px; font-size: clamp(1.3rem,2.5vw,1.65rem); }
.footer-brand .site-title span { color: var(--accent); }
.footer-brand p { font-size: .82rem; line-height: 1.7; color: rgba(255,255,255,.45); }
.footer-socials { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.social-btn { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; color: rgba(255,255,255,.55); transition: background .15s, color .15s; flex-shrink: 0; }
.social-btn:hover { background: var(--accent); color: #fff; }
.footer-col h4 { color: #fff; font-family: var(--fh); font-size: .95rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-col ul { padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-col ul li a { font-size: .8rem; color: rgba(255,255,255,.45); transition: color .15s; display: block; padding: 2px 0; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding: 14px var(--pad); display: flex; justify-content: space-between; align-items: center; max-width: var(--mw); margin: auto; font-size: .73rem; color: rgba(255,255,255,.28); flex-wrap: wrap; gap: 8px; }
.footer-bottom a { color: rgba(255,255,255,.28); transition: color .15s; }
.footer-bottom a:hover { color: var(--gold); }
.back-to-top { position: fixed; right: 20px; bottom: 20px; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 16px rgba(192,57,43,.45); opacity: 0; pointer-events: none; transition: opacity .3s, transform .2s; z-index: 200; font-size: 1rem; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }
.fade-up { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.search-header { padding: clamp(20px,4vw,36px) 0 16px; }
.search-header h1 { font-family: var(--fh); font-size: clamp(1.3rem,3vw,1.8rem); color: var(--ink); }
.search-form-large { display: flex; margin-top: 14px; }
.search-form-large input { flex: 1; background: var(--bg2); border: 2px solid var(--border); border-right: none; border-radius: var(--r) 0 0 var(--r); padding: 11px 16px; font-size: .9rem; outline: none; transition: border-color .2s; min-width: 0; }
.search-form-large input:focus { border-color: var(--accent); }
.search-form-large button { background: var(--accent); color: #fff; border: none; padding: 11px 20px; border-radius: 0 var(--r) var(--r) 0; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background .15s; white-space: nowrap; }
.search-form-large button:hover { background: var(--accent2); }
.not-found { text-align: center; padding: clamp(40px,8vw,80px) var(--pad); }
.not-found .error-code { font-family: var(--fh); font-size: clamp(5rem,15vw,8rem); color: var(--accent); line-height: 1; opacity: .12; }
.not-found h2 { font-family: var(--fh); font-size: clamp(1.5rem,3vw,2rem); color: var(--ink); margin: -30px 0 14px; position: relative; z-index: 1; }
.not-found p { color: var(--ink2); margin-bottom: 24px; font-size: .95rem; }
.btn-primary { display: inline-flex; background: var(--accent); color: #fff; padding: 11px 26px; border-radius: 99px; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; transition: background .15s; }
.btn-primary:hover { background: var(--accent2); }
.search-form { display: flex; }
.search-field { flex: 1; border: 1.5px solid var(--border); border-right: none; border-radius: var(--r) 0 0 var(--r); padding: 8px 12px; font-size: .84rem; color: var(--ink); background: var(--bg2); outline: none; min-width: 0; transition: border-color .2s; }
.search-field:focus { border-color: var(--accent); }
.search-submit { background: var(--accent); color: #fff; border: none; border-radius: 0 var(--r) var(--r) 0; padding: 8px 14px; font-size: .82rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.search-submit:hover { background: var(--accent2); }
.page-content { padding: clamp(28px,5vw,48px) 0 clamp(48px,7vw,80px); max-width: 820px; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1200px) {
  .footer-top { grid-template-columns: 220px 1fr 1fr 1fr; gap: 24px; }
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-secondary { flex-direction: row; flex-wrap: wrap; gap: 14px; }
  .mini-card { flex: 1 1 calc(50% - 7px); min-width: 0; }
  .trending-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .main-layout { grid-template-columns: 1fr 260px; gap: 24px; }
  .article-layout { grid-template-columns: 1fr 260px; gap: 28px; }
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-layout .sidebar { display: none; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .main-nav-wrap { display: none; }
  .hamburger { display: flex; }
  .header-search { display: none; }
  .header-inner { height: 56px; }
  .progress-bar { top: 59px; }
  .hero-secondary { flex-direction: column; }
  .mini-card { flex: 1 1 100%; }
  .main-layout { grid-template-columns: 1fr; gap: 0; }
  .main-layout .sidebar { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
  .trending-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-meta-bar { gap: 10px; }
  .article-stats { margin-left: 0; width: 100%; }
  .author-bio-box { flex-direction: column; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
  .topbar-links { display: none; }
}
@media (max-width: 600px) {
  .trending-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .post-hero-image img { max-height: 260px; }
  .share-btn { padding: 5px 10px; font-size: .7rem; }
}
@media (max-width: 480px) {
  .header-inner { height: 52px; gap: 10px; }
  .progress-bar { top: 55px; }
  .mini-card .mc-thumb { width: 90px; min-width: 90px; }
  .breaking-label { display: none; }
  .post-hero-image img { max-height: 220px; }
}
@media (max-width: 360px) {
  .mini-card { flex-direction: column; }
  .mini-card .mc-thumb { width: 100%; height: 140px; min-width: unset; }
}
