/*
Theme Name: Tri Duc English News
Theme URI: https://tienganhtriduc.com
Author: Tri Duc English Center
Author URI: https://tienganhtriduc.com
Description: Theme báo điện tử phong cách VnExpress cho Tri Duc English Center
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
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: triduc-news
Tags: news, magazine, education, ielts
*/

/* ========================================
   CSS VARIABLES
======================================== */
:root {
  --primary: #c0392b;
  --primary-dark: #962d22;
  --primary-light: #e74c3c;
  --accent: #f39c12;
  --accent2: #27ae60;
  --accent3: #2980b9;
  --accent4: #8e44ad;
  --text-dark: #1a1a1a;
  --text-body: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-white: #fff;
  --bg-light: #f5f5f5;
  --bg-section: #fafafa;
  --border: #e0e0e0;
  --border-light: #eee;
  --font-display: 'Playfair Display', 'Times New Roman', serif;
  --font-body: 'Source Sans Pro', 'Segoe UI', sans-serif;
  --font-ui: 'Roboto', 'Helvetica Neue', sans-serif;
  --container: 1200px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 2px 8px rgba(0,0,0,.12);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.15);
  --radius: 4px;
  --transition: 0.2s ease;
}

/* ========================================
   RESET & BASE
======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-body);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ========================================
   TYPOGRAPHY
======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-dark);
}

/* ========================================
   LAYOUT
======================================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 12px;
}

.site-wrapper { background: var(--bg-white); }

/* ========================================
   TOP BAR
======================================== */
.top-bar {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 2px solid var(--primary-dark);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.top-bar-date {
  white-space: nowrap;
  opacity: 0.85;
  font-size: 11px;
}

.top-bar-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.ticker-label {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ticker-content {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
}

.ticker-text {
  display: inline-block;
  animation: ticker 25s linear infinite;
  opacity: 0.95;
  font-size: 12px;
}

@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.top-bar-right a {
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  transition: color var(--transition);
}
.top-bar-right a:hover { color: #fff; }

.top-bar-right .divider { opacity: 0.4; }

.top-bar-search-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 11px;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-bar-search-btn:hover { background: rgba(255,255,255,0.25); }

/* ========================================
   SITE HEADER
======================================== */
.site-header {
  background: var(--bg-white);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-logo img {
  height: 50px;
  width: auto;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.logo-name span { color: var(--accent); }

.logo-tagline {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}

.header-banner {
  flex: 1;
  text-align: center;
}

.header-banner img {
  max-height: 60px;
  margin: 0 auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-register {
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition);
  white-space: nowrap;
}
.btn-register:hover { background: var(--primary-dark); color: #fff; }

.btn-login {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-login:hover { background: var(--primary); color: #fff; }

/* ========================================
   MAIN NAVIGATION
======================================== */
.main-nav-wrapper {
  background: var(--primary);
  position: sticky;
  top: 74px;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

.main-nav {
  display: flex;
  align-items: center;
  position: relative;
}

.main-nav > ul {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav > ul > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition);
  border-bottom: 3px solid transparent;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current-menu-ancestor > a {
  background: rgba(0,0,0,.2);
  color: #fff;
  border-bottom-color: var(--accent);
}

.main-nav > ul > li > a .arrow {
  font-size: 9px;
  opacity: 0.7;
  transition: transform var(--transition);
}

.main-nav > ul > li:hover > a .arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 1000;
  border-radius: 0 0 var(--radius) var(--radius);
}

.main-nav ul li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav .sub-menu li a {
  display: block;
  padding: 9px 16px;
  font-size: 13.5px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition);
}

.main-nav .sub-menu li:last-child a { border-bottom: none; }

.main-nav .sub-menu li a:hover {
  background: var(--bg-light);
  color: var(--primary);
  padding-left: 22px;
}

/* Sub-sub menu */
.main-nav .sub-menu .sub-menu {
  top: -3px;
  left: 100%;
  border-top: 3px solid var(--accent);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  color: #fff;
  font-size: 20px;
  padding: 12px 14px;
  cursor: pointer;
  margin-left: auto;
}

/* ========================================
   BREADCRUMB
======================================== */
.breadcrumb-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 8px 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.breadcrumb-bar a { color: var(--text-light); }
.breadcrumb-bar a:hover { color: var(--primary); }
.breadcrumb-bar .sep { margin: 0 6px; opacity: 0.5; }

/* ========================================
   SECTION HEADERS
======================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
  position: relative;
}

.section-header::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--primary);
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .cat-icon {
  width: 5px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
  display: inline-block;
}

.section-title .badge {
  font-size: 10px;
  background: var(--primary);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
  vertical-align: middle;
}

.view-all {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.view-all:hover { color: var(--primary-dark); }

/* ========================================
   HERO / FEATURED
======================================== */
.hero-section {
  background: var(--bg-white);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto auto;
  gap: 16px;
}

.hero-main {
  grid-row: span 2;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-main .post-thumb {
  width: 100%;
  height: 360px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-main:hover .post-thumb { transform: scale(1.03); }

.hero-main .post-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.82));
  padding: 40px 18px 18px;
  color: #fff;
}

.hero-main .post-cat {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-main .post-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 8px;
}

.hero-main .post-title:hover { text-decoration: underline; }

.hero-main .post-excerpt {
  font-size: 13.5px;
  color: rgba(255,255,255,0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-side { display: flex; flex-direction: column; gap: 12px; }

.hero-side .side-post {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.hero-side .side-post .post-thumb {
  width: 100px;
  height: 68px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.hero-side .side-post:hover .post-thumb { opacity: 0.88; }

.hero-side .side-post .post-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-side .side-post .post-title:hover { color: var(--primary); }

.hero-side .side-post .post-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========================================
   MAIN CONTENT AREA
======================================== */
.site-content { padding: 16px 0 24px; }

.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

/* ========================================
   CONTENT SECTIONS
======================================== */
.content-section {
  background: var(--bg-white);
  padding: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Big + small layout */
.posts-grid-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.post-card-lg { grid-column: span 1; }

.post-card-lg .post-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: opacity var(--transition);
}

.post-card-lg:hover .post-thumb { opacity: 0.88; }

.post-card-lg .post-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.post-card-lg .post-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.post-card-lg .post-title:hover { color: var(--primary); }

.post-card-lg .post-excerpt {
  font-size: 13px;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-lg .post-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* List posts */
.posts-list { border-top: 1px solid var(--border-light); }

.post-list-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}

.post-list-item:last-child { border-bottom: none; }

.post-list-item .post-thumb {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.post-list-item:hover .post-thumb { opacity: 0.85; }

.post-list-item .post-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-list-item .post-title:hover { color: var(--primary); }

.post-list-item .post-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* 3-column grid */
.posts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.post-card-sm .post-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: opacity var(--transition);
}

.post-card-sm:hover .post-thumb { opacity: 0.88; }

.post-card-sm .post-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-sm .post-title:hover { color: var(--primary); }

.post-card-sm .post-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Sub-category tabs */
.cat-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.cat-tab:hover,
.cat-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.cat-tab-content { display: none; }
.cat-tab-content.active { display: block; }

/* ========================================
   SIDEBAR
======================================== */
.sidebar { position: sticky; top: 120px; }

.sidebar-widget {
  background: var(--bg-white);
  padding: 14px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--primary);
}

/* Hot posts widget */
.hot-post-item {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}

.hot-post-item:last-child { border-bottom: none; }

.hot-post-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  font-family: var(--font-display);
}

.hot-post-item:nth-child(1) .hot-post-num { color: var(--primary); }
.hot-post-item:nth-child(2) .hot-post-num { color: var(--accent); }
.hot-post-item:nth-child(3) .hot-post-num { color: var(--accent3); }

.hot-post-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-post-title:hover { color: var(--primary); }

/* Ad widget */
.widget-ad {
  text-align: center;
  border: 1px dashed var(--border);
  padding: 20px;
  background: var(--bg-section);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.widget-ad:hover { border-color: var(--primary); }

/* Schedule widget */
.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.schedule-item:last-child { border-bottom: none; }

.schedule-name { font-weight: 600; color: var(--text-dark); }

.schedule-time {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  background: rgba(192,57,43,0.08);
  padding: 2px 7px;
  border-radius: 10px;
}

/* Band score widget */
.band-table {
  width: 100%;
  font-size: 12.5px;
  border-collapse: collapse;
}

.band-table th {
  background: var(--primary);
  color: #fff;
  padding: 6px 8px;
  text-align: center;
  font-weight: 700;
}

.band-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.band-table tr:hover td { background: var(--bg-light); }

/* ========================================
   TAGS SECTION
======================================== */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-item {
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  transition: all var(--transition);
}

.tag-item:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ========================================
   SEARCH MODAL
======================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  backdrop-filter: blur(3px);
}

.search-overlay.open { display: flex; }

.search-box {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
}

.search-box-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-dark);
}

.search-input-wrap {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus { border-color: var(--primary); }

.search-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.search-submit:hover { background: var(--primary-dark); }

.search-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.75);
  margin-top: 20px;
}

.footer-top {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 36px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
}

.footer-brand .logo-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}

.footer-brand .logo-name span { color: var(--accent); }

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.6);
}

.footer-contact p {
  font-size: 12.5px;
  margin-bottom: 5px;
  color: rgba(255,255,255,0.65);
}

.footer-contact strong { color: rgba(255,255,255,0.9); }

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links li {
  margin-bottom: 7px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.social-links {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.social-link {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.footer-bottom {
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: var(--accent); }

/* ========================================
   UTILITY CLASSES
======================================== */
.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.post-meta .meta-time { display: flex; align-items: center; gap: 3px; }
.post-meta .meta-views { display: flex; align-items: center; gap: 3px; }

.label-new {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 2px;
  font-weight: 700;
  text-transform: uppercase;
}

.label-hot {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 2px;
  font-weight: 700;
}

.label-video {
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 2px;
  font-weight: 700;
}

/* ========================================
   SINGLE POST
======================================== */
.post-single {
  background: var(--bg-white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.post-single .post-cat-header {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.post-single .post-title {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 12px;
}

.post-single .post-lead {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.6;
  border-left: 3px solid var(--primary);
  padding-left: 14px;
  margin-bottom: 16px;
}

.post-single .post-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-body);
}

.post-single .post-content h2 {
  font-size: 20px;
  margin: 20px 0 10px;
}

.post-single .post-content p { margin-bottom: 14px; }

.post-single .post-content img {
  width: 100%;
  border-radius: var(--radius);
  margin: 14px 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.post-tags .label { font-size: 13px; font-weight: 600; }

/* ========================================
   PAGINATION
======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 0;
}

.page-num {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-body);
  transition: all var(--transition);
}

.page-num:hover,
.page-num.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
  .content-area { grid-template-columns: 1fr 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main .post-thumb { height: 240px; }
  .hero-side { display: none; }

  .content-area { grid-template-columns: 1fr; }
  .sidebar { position: static; }

  .posts-grid-main { grid-template-columns: 1fr; }
  .posts-grid-3 { grid-template-columns: 1fr 1fr; }

  .main-nav > ul { display: none; flex-direction: column; width: 100%; }
  .main-nav > ul.open { display: flex; }
  .main-nav > ul > li > a { padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .main-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    background: rgba(0,0,0,.15);
    border-radius: 0;
    display: none;
  }
  .main-nav .sub-menu.open { display: block; }
  .main-nav .sub-menu li a { color: rgba(255,255,255,.8); padding-left: 30px; }

  .nav-toggle { display: block; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .header-banner { display: none; }
  .logo-name { font-size: 20px; }

  .top-bar-ticker { display: none; }
}

@media (max-width: 480px) {
  .posts-grid-3 { grid-template-columns: 1fr; }
  .top-bar-right { display: none; }
}

/* Ẩn share buttons trong archive */
.archive .sharedaddy,
.archive .sd-sharing,
.archive .post-shares,
.home .sharedaddy {
    display: none !important;
}

/* Pagination ngang */
.page-numbers { display:flex !important; justify-content:center; gap:6px; padding:16px 0; list-style:none; flex-wrap:wrap; }
.page-numbers li { display:inline-block !important; }
.page-numbers li a,
.page-numbers li span { display:flex; align-items:center; justify-content:center; width:34px; height:34px; border:1px solid #e2e2e2; border-radius:4px; font-size:13.5px; font-weight:600; color:#444; transition:all .15s; }
.page-numbers li a:hover,
.page-numbers li span.current { background:#c0392b; border-color:#c0392b; color:#fff; }

/* Performance */
img { loading: lazy; }

/* ── MOBILE FIX ── */
@media (max-width: 600px) {
  /* Header */
  .hdr-inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hdr-actions {
    width: 100%;
    justify-content: center;
  }
  .btn-reg, .btn-grading {
    flex: 1;
    text-align: center;
    padding: 7px 10px;
    font-size: 12px;
  }

  /* Trang chủ page grid 3 cột → 1 cột */
  .entry-content div[style*="grid-template-columns: repeat(3"] {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Grid 2 cột → 1 cột */
  .entry-content div[style*="grid-template-columns: repeat(2"] {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Hệ sinh thái grid */
  .entry-content div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Banner header ẩn trên mobile */
  .hdr-banner { display: none; }

  /* Nav hamburger */
  .nav-toggle { display: block; }
}

/* Fix nav sticky che nội dung mobile */
@media (max-width: 768px) {
  .nav-wrap {
    position: relative !important;
    top: auto !important;
  }
  .site-header {
    position: relative !important;
    top: auto !important;
  }
}
