/*
Theme Name: Hill Voice
Theme URI: https://hillvoice.net
Author: Hill Voice Team
Author URI: https://hillvoice.net
Description: Modular, high-performance, classic WordPress theme for Hill Voice news portal.
Version: 1.5.1
Text Domain: hillv
*/

:root {
  --red: #e30613;
  --red-dark: #b8050f;
  --dark: #1a1a1a;
  --muted: #666666;
  --border: #e5e5e5;
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --blue: #1a6fb5;
  --blue-light: #e8f3fb;
  --category: #e30613;
  --international: #0f8a8a;
  --max-width: 1200px;
  --ticker-duration: 65s;
  --transition-smooth: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), color 0.2s ease, background-color 0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Guard: Enforce standard block formatting context on body across all templates */
body,
body.search,
body.search-results {
  display: block !important;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--dark);
  background: var(--bg);
  line-height: 1.4;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

article p {
  margin-bottom: 1.5em;
}

/* ===== Top bar ===== */
.topbar {
  background: var(--bg-soft);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.date {
  font-size: 13px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo {
  position: relative;
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: 34px;
  color: var(--red);
  text-align: center;
  letter-spacing: 1px;
  line-height: 1;
}

.logo .net {
  position: absolute;
  font-weight: 700;
  font-size: 0.8em;
  bottom: -0.2em;
}

.top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.lang {
  background: #0f7a8a;
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 2px;
  font-weight: 500;
  display: inline-block;
}

.top-right ul.lang-switch {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.top-right ul.lang-switch li a {
  background: #0f7a8a;
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 2px;
  font-weight: 500;
}

.top-right ul.lang-switch li.current-lang {
  display: none;
}

.socials {
  display: flex;
  gap: 8px;
}

.socials a {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  transition: background 0.2s ease;
}

.socials a:hover {
  background: var(--red);
}

/* ===== Navigation ===== */

.nav {
  background: var(--bg-soft);
  padding: 0.25em 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.menu .menu-item {
  position: relative;
  list-style: none;
}

.menu .menu-item > a {
  display: inline-block;
  font-weight: 700;
  font-size: 13.5px;
  padding: 0 8px;
  border-right: 2px solid var(--red);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: inherit;
}

.menu .menu-item:last-child > a {
  border-right: none;
}

.menu .menu-item > a:hover,
.menu .menu-item.current-menu-item > a {
  color: var(--red);
}

.menu .sub-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  padding: 6px 0;
  margin: 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.menu .sub-menu .menu-item {
  display: block;
  width: 100%;
}

.menu .sub-menu .menu-item > a {
  display: block;
  padding: 8px 14px;
  border-right: none;
  font-size: 12.5px;
  white-space: nowrap;
}

.menu .sub-menu .menu-item > a:hover {
  background: var(--bg-soft);
  color: var(--red);
}

/* Ensure the parent link aligns text and caret horizontally */
.menu .menu-item-has-children > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Down caret icon via Font Awesome 6 */
.menu .menu-item-has-children > a::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 9px;
  color: var(--red);
  display: inline-block;
  line-height: 1;
  transition: transform 0.2s ease;
}

/* Rotate caret upwards when dropdown is active or hovered */
.menu .menu-item-has-children:hover > a::after,
.menu .menu-item-has-children:focus-within > a::after,
.menu .menu-item-has-children.is-open > a::after {
  transform: rotate(180deg);
}

/* Optional: If a submenu itself has a nested submenu, display a right-facing caret */
.menu .sub-menu .menu-item-has-children > a {
  display: flex;
  justify-content: space-between;
}

.menu .sub-menu .menu-item-has-children > a::after {
  content: "\f054"; /* chevron-right */
  font-size: 8px;
  transform: none;
}

.menu .sub-menu .menu-item-has-children:hover > a::after,
.menu .sub-menu .menu-item-has-children.is-open > a::after {
  transform: rotate(90deg);
}

.menu .menu-item-has-children:hover > .sub-menu,
.menu .menu-item-has-children:focus-within > .sub-menu,
.menu .menu-item-has-children.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


/* Scoped Form Selector: Prevents collision with body.search */
form.search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 6px 12px;
  min-width: 220px;
}

form.search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 13px;
  background: transparent;
}

form.search .search-btn,
form.search .mic-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

form.search i {
  color: #999;
  margin-right: 6px;
  font-size: 12px;
}

form.search .mic {
  margin-left: 6px;
  margin-right: 0;
  color: var(--red);
}

form.search .mic.is-listening {
  color: var(--red);
  animation: pulse-mic 1.2s infinite;
}

@keyframes pulse-mic {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== Infinite Scroll Sentinel ===== */
.scroll-sentinel {
  text-align: center;
  padding: 20px 0;
  width: 100%;
}

.scroll-loading-indicator {
  font-size: 24px;
  color: var(--red);
}

.scroll-end-msg {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== Ticker Marquee ===== */
.trending {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  overflow: hidden;
}

.trending .tag {
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  padding: 0 0 0 6px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.trending .tag span {
  display: inline-block;
  background: #111;
  padding: 3px 6px;
  margin-left: 3px;
}

.ticker-wrap {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  margin-left: 14px;
}

.ticker-track {
  display: inline-flex;
  gap: 30px;
  animation: ticker-slide var(--ticker-duration) linear infinite;
  will-change: transform;
}

.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dark);
  display: inline-flex;
  align-items: center;
  gap: 30px;
}

.ticker-item a:hover {
  color: var(--red);
}

.ticker-item::after {
  content: "•";
  color: var(--red);
  font-size: 16px;
}

@keyframes ticker-slide {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* ===== Section Titles ===== */
.section-title {
  text-align: center;
  margin: 32px 0 20px;
  position: relative;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-title a {
  color: var(--dark);
}

.section-title a:hover {
  color: var(--red);
}

.section-title::before,
.section-title::after {
  content: "";
  display: inline-block;
  height: 2px;
  width: 120px;
  background: var(--red);
  margin: 0 18px;
}

/* ===== Global Image Container & Hover Scaling ===== */
.featured,
.side-card,
.thumb-img-wrap,
.cht-lead-img-wrap,
.bcard-img-wrap,
.portrait-img-wrap,
.cross-card-img-wrap,
.video-thumb-wrap,
.search-card-thumb {
  overflow: hidden;
  position: relative;
}

.featured img,
.side-card img,
.thumb-img-wrap img,
.cht-lead-img-wrap img,
.bcard-img-wrap img,
.portrait-img-wrap img,
.cross-card-img-wrap img,
.video-thumb-wrap img,
.search-card-thumb img {
  transition: var(--transition-smooth);
  will-change: transform;
}

.featured:hover img,
.side-card:hover img,
.thumb:hover .thumb-img-wrap img,
.cht-lead:hover .cht-lead-img-wrap img,
.bcard:hover .bcard-img-wrap img,
.portrait:hover .portrait-img-wrap img,
.cross-lang-card:hover .cross-card-img-wrap img,
.video-card:hover .video-thumb-wrap img,
.search-card:hover .search-card-thumb img {
  transform: scale(1.05);
}

/* ===== Hero Grid ===== */
.hero {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 16px;
  margin-top: 16px;
}

.latest-col .latest-head {
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  font-size: 14px;
}

.latest-list {
  border: 1px solid var(--border);
  border-top: none;
  padding: 12px;
}

.latest-item {
  padding: 10px 0;
  border-bottom: 1px dashed #ddd;
}

.latest-item:last-child {
  border-bottom: none;
}

.latest-item h4 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.latest-item h4:hover {
  color: var(--red);
}

.latest-item .time {
  font-size: 11px;
  color: var(--muted);
}

.latest-item .time i {
  margin-right: 4px;
}

/* Hero Center: Featured Card */
.featured {
  height: 440px;
  background: #222;
  cursor: pointer;
}

.featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.featured .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
  pointer-events: none;
}

.featured .content {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  color: #fff;
  z-index: 2;
}

.badge {
  display: inline-block;
  background: var(--category);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  padding: 5px 10px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.badge.intl {
  background: var(--international);
}

.featured h2 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
}

.featured h2 a {
  color: #fff;
  transition: color 0.2s ease;
}

.featured:hover h2 a {
  color: var(--red);
}

.featured .date-line {
  font-size: 13px;
  opacity: 0.9;
}

/* Hero Side Stack */
.side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  height: 212px;
  background: #333;
  cursor: pointer;
}

.side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.side-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.85));
  z-index: 1;
  pointer-events: none;
}

.side-card .content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: #fff;
  z-index: 2;
}

.side-card h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
}

.side-card h3 a {
  color: #fff;
  transition: color 0.2s ease;
}

.side-card:hover h3 a {
  color: var(--red);
}

.side-card .date-line {
  font-size: 11px;
  opacity: 0.9;
}

/* ===== Thumb row ===== */
.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 20px 0 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.thumb {
  display: flex;
  gap: 12px;
}

.thumb-img-wrap {
  width: 110px;
  height: 80px;
  flex: 0 0 110px;
  background: #f0f0f0;
}

.thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb p {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.thumb:hover p {
  color: var(--red);
}

/* ===== Category Top (CHT Style) ===== */
.cht {
  display: grid;
  grid-template-columns: 2fr 1.2fr 260px;
  gap: 24px;
}

.cht-lead h3 {
  color: var(--red);
  font-weight: 900;
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 14px;
}

.cht-lead h3 a {
  color: var(--red);
}

.cht-lead:hover h3 a {
  opacity: 0.85;
}

.cht-lead-img-wrap {
  width: 100%;
  height: 230px;
  margin-bottom: 12px;
  background: #eee;
}

.cht-lead-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cht-lead p {
  font-size: 14px;
  color: #333;
  margin-bottom: 14px;
  line-height: 1.55;
}

.read-more {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 14px;
  letter-spacing: 0.5px;
}

.read-more:hover {
  background: var(--red-dark);
  color: #fff;
}

.cht-mid .mid-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cht-mid .mid-item:first-child {
  padding-top: 0;
}

.cht-mid h4 {
  color: var(--blue);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 6px;
}

.cht-mid h4 a {
  color: var(--blue);
}

.cht-mid h4 a:hover {
  color: var(--red);
}

.cht-mid .date-line {
  font-size: 12px;
  color: var(--muted);
}

.cht-mid .date-line i {
  margin-right: 4px;
}

/* ===== Aside Widgets: Calendar & Portrait ===== */
.cht-side .widget {
  margin-bottom: 16px;
}

.cht-side .calendar,
.cht-side .portrait {
  border: 1px solid var(--border);
  margin-bottom: 16px;
  background: #fff;
  width: 100%;
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}

.cal-nav-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-select {
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--dark);
  border: 1px solid transparent;
  background: transparent;
  padding: 3px 2px;
  cursor: pointer;
}

.cal-select:hover, .cal-select:focus {
  border-color: #ddd;
  background: #fff;
}

.cal-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #555;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
}

.cal-nav-btn:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.calendar table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.calendar th, .calendar td {
  text-align: center;
  padding: 4px 0;
  color: #333;
  height: 28px;
  vertical-align: middle;
}

.calendar th {
  font-weight: 700;
  color: #666;
  font-size: 10px;
  background: #fdfdfd;
  border-bottom: 1px solid #f0f0f0;
}

/* Dates with Published Posts: Circular Light Blue, Bold Blue, No Underline */
.calendar td.has-post {
  background: transparent;
}

.calendar td.has-post a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--blue-light);
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(26, 111, 181, 0.2);
  transition: all 0.2s ease;
  margin: 0 auto;
}

.calendar td.has-post a:hover {
  background-color: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  text-decoration: none;
}

.calendar td.is-today {
  outline: 1px solid var(--dark);
  outline-offset: -1px;
  border-radius: 2px;
}

.portrait {
  padding: 12px;
  text-align: center;
}

.portrait-img-wrap {
  width: 100%;
  height: 230px;
  background: #eee;
}

.portrait-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.2);
}

.portrait:hover .portrait-img-wrap img {
  filter: sepia(0);
}

.portrait .name {
  background: #e5e5e5;
  padding: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 16px;
  color: var(--dark);
}

.portrait .name a {
  color: inherit;
}

.portrait .name a:hover {
  color: var(--red);
}

/* ===== Bottom Grid & Cards ===== */
.bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
  padding-bottom: 24px;
}

.bcard-img-wrap {
  width: 100%;
  height: 180px;
  background: #eee;
}

.bcard-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bcard h4 {
  font-family: 'Roboto Slab', serif;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
  margin: 10px 0 8px;
}

.bcard h4 a {
  color: var(--red);
}

.bcard:hover h4 a {
  color: var(--red-dark);
}

.bcard p {
  font-size: 13px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* ===== Cross-Language Section ===== */
.cross-language-section {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 24px;
  background: var(--bg-soft);
  padding: 16px 16px 24px;
}

.cross-lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cross-lang-card {
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cross-card-img-wrap {
  width: 100%;
  height: 140px;
  background: #eee;
  display: block;
}

.cross-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cross-card-content {
  padding: 12px;
  flex: 1;
}

.cross-card-content h4 {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
}

.cross-card-content h4 a {
  color: var(--dark);
}

.cross-lang-card:hover .cross-card-content h4 a {
  color: var(--red);
}

/* ===== Modular Category Variants ===== */
.category-modular-section {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.cat-split-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
}

.cat-split-grid.is-reversed {
  grid-template-columns: 1.2fr 1.8fr;
}

.cat-split-grid.is-reversed .cat-lead-col {
  order: 2;
}

.cat-split-grid.is-reversed .cat-thumbs-col {
  order: 1;
}

.cat-thumbs-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cat-thumbs-col .thumb {
  padding-bottom: 12px;
  border-bottom: 1px dashed #eee;
}

.variant-c-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

/* ===== Video Showcase Section ===== */
.videos-section {
  padding: 10px 0 30px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.video-card {
  display: flex;
  flex-direction: column;
}

.video-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  margin-bottom: 10px;
  display: block;
}

.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-btn-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease;
  z-index: 2;
}

.play-btn-overlay i {
  width: 44px;
  height: 44px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding-left: 3px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.video-card:hover .play-btn-overlay {
  background: rgba(0, 0, 0, 0.15);
}

.video-card:hover .play-btn-overlay i {
  transform: scale(1.1);
}

.video-card h4 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.video-card h4 a {
  color: var(--dark);
}

.video-card:hover h4 a {
  color: var(--red);
}

.video-card .time {
  font-size: 11px;
  color: var(--muted);
}

.video-card .time i {
  margin-right: 4px;
}

/* ===== Search Results Page Layout ===== */
.search-results-container {
  padding-top: 24px;
  padding-bottom: 48px;
  width: 100%;
  max-width: var(--max-width);
}

.search-page-header {
  margin-bottom: 32px;
  text-align: center;
}

.search-result-count {
  font-size: 14px;
  color: var(--muted);
  margin-top: -10px;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.search-card {
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.search-card:hover {
  border-color: #ccc;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.search-card-thumb {
  width: 100%;
  height: 180px;
  background: #eee;
  display: block;
}

.search-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #ccc;
  background: var(--bg-soft);
}

.search-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.search-card-body .badge {
  align-self: flex-start;
  margin-bottom: 8px;
}

.search-card-title {
  font-family: 'Roboto Slab', serif;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.search-card-title a {
  color: var(--dark);
}

.search-card:hover .search-card-title a {
  color: var(--red);
}

.search-card-snippet {
  font-size: 13px;
  color: #444;
  line-height: 1.5;
  margin-bottom: 12px;
  flex-grow: 1;
}

.search-card-body .date-line {
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: auto;
}

.search-card-body .date-line i {
  margin-right: 4px;
}

.search-pagination {
  text-align: center;
  margin-top: 32px;
}

.search-pagination .nav-links {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.search-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.search-pagination .page-numbers.current {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.search-pagination a.page-numbers:hover {
  background: var(--bg-soft);
  border-color: #ccc;
  color: var(--red);
}

.search-empty-state {
  max-width: 540px;
  margin: 60px auto;
  text-align: center;
}

.search-empty-state .empty-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.search-empty-state .empty-icon-wrap i {
  font-size: 28px;
  color: var(--muted);
}

.search-empty-state h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--dark);
}

.search-empty-state p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.search-empty-form-box {
  max-width: 360px;
  margin: 0 auto;
}

/* ===== Footer Widgets ===== */
.site-footer {
  background: #111;
  color: #bbb;
  padding: 40px 0 20px;
  font-size: 13px;
  border-top: 3px solid var(--red);
  width: 100%;
  clear: both;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #282828;
  text-align: left;
}

.footer-widget-title {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-list li {
  margin-bottom: 8px;
}

.footer-links-list a {
  color: #aaa;
}

.footer-links-list a:hover {
  color: var(--red);
}

.footer-bottom {
  padding-top: 20px;
  text-align: center;
  color: #888;
}

.footer-bottom strong {
  color: #fff;
}

/* ===== Responsive Adaptations ===== */
@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .featured {
    height: 340px;
  }
  .cht {
    grid-template-columns: 1fr;
  }
  .thumbs {
    grid-template-columns: repeat(2, 1fr);
  }
  .cross-lang-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-split-grid {
    grid-template-columns: 1fr;
  }
  .cat-split-grid.is-reversed .cat-lead-col {
    order: 1;
  }
  .cat-split-grid.is-reversed .cat-thumbs-col {
    order: 2;
  }
  .variant-c-duo {
    grid-template-columns: 1fr;
  }
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .footer-widgets {
    grid-template-columns: 1fr;
  }
  .topbar-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .top-right, .date {
    justify-content: center;
  }
  .nav-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .menu {
    justify-content: center;
  }
  .menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;
    width: 100%;
    background: var(--bg-soft);
  }
  .menu .menu-item-has-children.is-open > .sub-menu {
    display: block;
  }
  .menu .menu-item-has-children:hover > .sub-menu {
    display: none;
  }
  .menu .menu-item-has-children.is-open:hover > .sub-menu {
    display: block;
  }
  form.search {
    width: 100%;
  }
  .featured h2 {
    font-size: 20px;
  }
  .section-title::before, .section-title::after {
    width: 40px;
    margin: 0 8px;
  }
}

@media (max-width: 600px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
  .cross-lang-grid {
    grid-template-columns: 1fr;
  }
  .thumbs {
    grid-template-columns: 1fr;
  }
  .search-grid {
    grid-template-columns: 1fr;
  }
  .search-card-thumb {
    height: 200px;
  }
}