/*
Theme Name: JAV Theme
Author: JAV
Description: JAV Theme
Version: 2.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ตัวปรับแต่งพื้นฐานของธีม */
body {
  background-color: #0b0b0f;
  color: #e5e7eb;
  font-family: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Post Meta (single) */
.post-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: .6rem;
  padding: .75rem;
}

@media (min-width: 768px) {
  .post-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem;
  }
}

.post-meta .meta-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .35rem .5rem;
  border-radius: .5rem;
}

.post-meta .meta-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex: 0 0 auto;
}

.post-meta .meta-label {
  color: var(--muted);
  font-weight: 600;
  margin-right: .25rem;
}

.post-meta .meta-value {
  color: var(--text);
}

.post-meta .tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.post-meta .tag-item {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .8rem;
  line-height: 1;
  color: var(--text);
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.post-meta .tag-item:hover {
  background: #263243;
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

a {
  color: #ffffff;
  text-decoration: none;
}

a:hover {
  color: #dc2626;
  text-decoration: none;
}

/* โทนสีใกล้เคียงเว็บอ้างอิง */
:root {
  --bg: #0b0b0f;
  --panel: #12121a;
  --panel-2: #1a1b24;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #dc2626;
}

.header-shadow {
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.03), 0 1px 0 rgba(0, 0, 0, 0.6) inset;
}

.bg-panel {
  background-color: var(--panel) !important;
}

.bg-panel-2 {
  background-color: var(--panel-2) !important;
}

.text-muted-2 {
  color: var(--muted) !important;
}

/* Site logo above navbar */
.site-logo img,
.site-logo-link img,
img.custom-logo {
  max-height: 48px !important;
  height: 48px !important;
  width: auto !important;
  display: block;
  object-fit: contain;
}

.site-logo-link {
  gap: .5rem;
  min-height: 48px;
}

.topbar {
  min-height: 60px;
  align-items: center;
}

.topbar .top-search {
  flex: 0 0 260px;
  max-width: 260px;
}

.topbar .top-search .form-control {
  height: 40px;
}

.topbar .top-search .btn {
  height: 40px;
}

@media (max-width: 575.98px) {
  .topbar {
    gap: .75rem;
  }

  .topbar .top-search {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* Navbar */
.navbar-dark .navbar-nav .nav-link {
  color: #e5e7eb;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff;
}

/* Long-label menu support */
@media (min-width: 992px) {

  /* apply on lg and up (when navbar is expanded) */
  .navbar .navbar-nav {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .navbar .navbar-nav .nav-item {
    flex: 0 0 auto;
    max-width: 200px;
  }

  .navbar .navbar-nav .nav-link {
    white-space: normal;
    /* allow wrapping */
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.3;
    padding: .5rem .25rem;
    font-size: .95rem;
    font-weight: 600;
    text-align: center;
  }
}

@media (max-width: 991.98px) {

  /* In collapsed menu, let items be full width and readable */
  .navbar .navbar-nav .nav-item {
    max-width: 100%;
  }

  .navbar .navbar-nav .nav-link {
    white-space: normal;
    line-height: 1.4;
  }
}

/* เมนูแนวนอนหลายบรรทัด/หมวดหมู่ */
.menu-scroller {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scrollbar-width: thin;
}

.menu-chip {
  background: #1f2937;
  color: #e5e7eb;
  border-radius: 999px;
  padding: .4rem .8rem;
  white-space: nowrap;
  font-size: .9rem;
}

.menu-chip.active,
.menu-chip:hover {
  background: #374151;
}

/* การ์ดรายการวิดีโอ/คอนเทนต์ */
.card-media {
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: .5rem;
  overflow: hidden;
  position: relative;
}

.card-media .thumb {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  display: block;
}

.card-media .thumb-container {
  position: relative;
  overflow: hidden;
  border-radius: .5rem .5rem 0 0;
}

.card-media .duration-overlay {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
}

.card-media .title {
  font-size: .85rem;
  line-height: 1.3;
  margin: .5rem .5rem .3rem;
  color: var(--text);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-media .meta {
  color: var(--muted);
  font-size: .75rem;
  margin: 0 .5rem .5rem;
}

/* Tabs/แถบหัวข้อ */
.tab-line {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: .75rem;
}

.tab-line a {
  color: var(--muted);
  padding: .6rem 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}

.tab-line a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ส่วน footer */
.site-footer {
  color: var(--muted);
  font-size: .9rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

/* Utilities */
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.section-subtitle {
  color: var(--muted);
  font-size: .95rem;
}

/* ปรับ spacing */
.container-narrow {
  max-width: 1200px;
}

/* ปรับแต่ง bootstrap */
/* Improve contrast for accessibility (meets WCAG AA for normal text) */
.btn-accent {
  background: #b91c1c;
  color: #ffffff;
  border: none;
}

.btn-accent:hover {
  background: #991b1b;
  color: #ffffff;
}

.btn-accent:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, .35);
}

/* ==============================
   Pixel-perfect refinements
   ============================== */
/* Typography */
h1,
.h1 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2rem);
  font-weight: 700;
}

h2,
.h2 {
  font-size: clamp(1.3rem, 1.6vw + .8rem, 1.6rem);
  font-weight: 600;
}

h3,
.h3 {
  font-size: 1rem;
  font-weight: 600;
}

small,
.small {
  color: var(--muted);
}

/* Links subtle underlines on hover */
a {
  transition: color .15s ease, opacity .15s ease;
}

.nav-link {
  padding: .6rem .8rem;
}

.navbar-brand {
  letter-spacing: .5px;
}

/* Navbar heights and paddings */
.navbar {
  min-height: 56px;
}

.navbar .form-control {
  height: 38px;
  border-radius: .5rem;
}

.navbar .btn {
  height: 38px;
  border-radius: .5rem;
  padding: .375rem .9rem;
}

/* Chips scroller */
.menu-scroller {
  padding-top: .4rem;
  padding-bottom: .4rem;
}

.menu-chip {
  padding: .45rem .85rem;
  font-size: .92rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-chip.active {
  border-color: rgba(249, 115, 22, .5);
}

/* Cards */
.card-media {
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.card-media:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-media .thumb {
  background: #0f1117;
}

.card-media .title {
  margin-top: .5rem;
  font-weight: 600;
}

.card-media .meta {
  margin-top: .15rem;
}

/* Tabs */
.tab-line {
  gap: 1.25rem;
}

.tab-line a {
  font-weight: 600;
}

.tab-line a:hover {
  color: #fff;
}

/* Containers responsive width close to reference */
@media (min-width: 1400px) {
  .container-narrow {
    max-width: 1280px;
  }
}

@media (max-width: 575.98px) {
  .container-narrow {
    padding-left: .9rem;
    padding-right: .9rem;
  }
}

/* Single page */
.single-hero {
  position: relative;
  border-radius: .6rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--panel-2);
}

.single-hero .thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.single-hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0));
}

.single-meta {
  color: var(--muted);
}

.single-content {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
}

.single-content a {
  color: #f59e0b;
}

.single-actions .btn {
  border-radius: .5rem;
}

/* Footer spacing tweak */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Video section (single) */
.video-section .video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: .6rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.video-section .video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Pagination UI */
.pagination-circ {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1.75rem !important;
}

.pagination-circ ul {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .45rem !important;
  max-width: 100%;
  padding: .45rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: .75rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
}

.pagination-circ li {
  display: flex;
  margin: 0;
}

.pagination-circ .page-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .65rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: .5rem;
  background: rgba(255, 255, 255, .025);
  color: #d1d5db;
  line-height: 1;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.pagination-circ a.page-dot:hover {
  color: #fff;
  background: rgba(220, 38, 38, .12);
  border-color: rgba(220, 38, 38, .5);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .25);
}

.pagination-circ a.page-dot:focus-visible {
  outline: 0;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .25);
}

.pagination-circ .page-dot.is-current {
  border-color: #dc2626;
  background: linear-gradient(145deg, #dc2626 0%, #991b1b 100%);
  box-shadow: 0 5px 14px rgba(153, 27, 27, .3);
  color: #fff;
  cursor: default;
}

.pagination-circ .page-dot.dots {
  min-width: 30px;
  padding: 0 .25rem;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.pagination-circ .page-dot[aria-disabled="true"],
.pagination-circ .page-dot.disabled {
  opacity: .4;
  pointer-events: none;
}

@media (max-width: 575.98px) {
  .pagination-circ {
    justify-content: center;
    overflow-x: auto;
    padding: 0 .25rem .25rem;
    scrollbar-width: thin;
  }

  .pagination-circ ul {
    flex-wrap: nowrap;
    justify-content: center;
    min-width: max-content;
    margin-right: auto;
    margin-left: auto;
  }

  .pagination-circ .page-dot {
    min-width: 38px;
    height: 38px;
  }
}

/* Top-up (Back to Top) button */
.topup-btn {
  position: fixed;
  right: 1.25rem;
  left: auto;
  bottom: 1.25rem;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(239, 68, 68, .5);
  border-radius: .8rem;
  background: linear-gradient(145deg, #dc2626 0%, #991b1b 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45), 0 0 0 0 rgba(220, 38, 38, .35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(.88);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, box-shadow .25s ease, background .25s ease;
  z-index: 1040;
}

.topup-btn.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.topup-btn:hover {
  background: linear-gradient(145deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5), 0 0 0 4px rgba(220, 38, 38, .14);
}

.topup-btn:focus-visible {
  outline: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45), 0 0 0 4px rgba(248, 113, 113, .45);
}

.topup-btn:active {
  transform: translateY(2px) scale(.94);
}

.topup-btn .topup-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: .55rem;
}

.topup-btn .topup-icon::before,
.topup-btn .topup-icon::after {
  content: '';
  position: absolute;
  display: block;
  background: #fff;
  border-radius: 2px;
}

.topup-btn .topup-icon::before {
  width: 3px;
  height: 14px;
  top: 7px;
}

.topup-btn .topup-icon::after {
  width: 10px;
  height: 10px;
  top: 5px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  background: transparent;
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  .topup-btn {
    transition: opacity .01ms linear, visibility .01ms linear;
    transform: none;
  }
}

@media (max-width: 575.98px) {
  .topup-btn {
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    border-radius: .7rem;
  }

  .topup-btn .topup-icon {
    width: 28px;
    height: 28px;
  }
}

/* ==============================
   Mobile Off-canvas Menu Styles
   ============================== */

/* Mobile Menu Toggle Button (Hamburger) */
.mobile-menu-toggle {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.mobile-menu-toggle:hover {
  transform: scale(1.05);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

.mobile-menu-toggle .menu-icon {
  width: 28px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-toggle .menu-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background: #e5e7eb;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover .menu-icon span {
  background: #dc2626;
}

/* Off-canvas Mobile Menu */
.mobile-offcanvas {
  background: linear-gradient(135deg, #12121a 0%, #1a1b24 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  width: 280px !important;
  max-width: 85vw;
}

.mobile-offcanvas .offcanvas-header {
  background: rgba(220, 38, 38, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 1.5rem;
}

.mobile-offcanvas .offcanvas-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  margin: 0;
}

.mobile-offcanvas .btn-close-custom {
  background: transparent;
  border: none;
  color: #e5e7eb;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mobile-offcanvas .btn-close-custom:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mobile-offcanvas .offcanvas-body {
  padding: 1rem 0;
}

/* Mobile Navigation Menu */
.mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-menu li {
  margin: 0;
}

.mobile-nav-menu a {
  display: flex;
  align-items: center;
  padding: 0.9rem 1.5rem;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.mobile-nav-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.15) 0%, transparent 100%);
  transition: width 0.3s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-left-color: #dc2626;
}

.mobile-nav-menu a:hover::before {
  width: 100%;
}

.mobile-nav-menu .current-menu-item>a,
.mobile-nav-menu .current_page_item>a {
  color: #ef4444;
  background: rgba(220, 38, 38, 0.1);
  border-left-color: #dc2626;
  font-weight: 600;
}

/* Submenu styles for mobile */
.mobile-nav-menu .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.2);
}

.mobile-nav-menu .sub-menu a {
  padding-left: 2.5rem;
  font-size: 0.95rem;
  font-weight: 400;
}

/* Backdrop overlay enhancement */
.offcanvas-backdrop {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}

/* Mobile Menu Container - align with search */
.d-lg-none .mobile-menu-toggle {
  margin-left: auto;
  display: flex;
}

/* Enhanced Mobile Menu Toggle */
.mobile-menu-toggle {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(220, 38, 38, 0.25);
  border-color: rgba(220, 38, 38, 0.5);
  transform: scale(1.02);
}

.mobile-menu-toggle:active {
  transform: scale(0.98);
}

.mobile-menu-toggle .menu-icon {
  width: 24px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-toggle .menu-icon span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animated hamburger when offcanvas is open */
.mobile-offcanvas.show ~ header .mobile-menu-toggle .menu-icon span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-offcanvas.show ~ header .mobile-menu-toggle .menu-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-offcanvas.show ~ header .mobile-menu-toggle .menu-icon span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Enhanced Off-canvas styling */
.mobile-offcanvas {
  background: linear-gradient(180deg, #12121a 0%, #1a1b24 50%, #0f0f14 100%);
  border-right: 1px solid rgba(220, 38, 38, 0.2);
  width: 300px !important;
  max-width: 85vw;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}

.mobile-offcanvas .offcanvas-header {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(185, 28, 28, 0.1) 100%);
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
  padding: 1.25rem 1.5rem;
}

.mobile-offcanvas .offcanvas-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-offcanvas .btn-close-custom {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-offcanvas .btn-close-custom:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.4);
  color: #fff;
}

/* Enhanced Mobile Navigation Menu */
.mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-menu li {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-menu li:last-child {
  border-bottom: none;
}

.mobile-nav-menu a {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.25s ease;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
}

.mobile-nav-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.2) 0%, transparent 100%);
  transition: width 0.3s ease;
}

.mobile-nav-menu a::after {
  content: '›';
  margin-left: auto;
  color: rgba(220, 38, 38, 0.6);
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-left-color: #dc2626;
  padding-left: 1.75rem;
}

.mobile-nav-menu a:hover::before {
  width: 100%;
}

.mobile-nav-menu a:hover::after {
  color: #ef4444;
  transform: translateX(4px);
}

.mobile-nav-menu .current-menu-item>a,
.mobile-nav-menu .current_page_item>a {
  color: #ef4444;
  background: rgba(220, 38, 38, 0.12);
  border-left-color: #dc2626;
  font-weight: 600;
}

.mobile-nav-menu .current-menu-item>a::after,
.mobile-nav-menu .current_page_item>a::after {
  color: #ef4444;
}

/* Enhanced Submenu styles for mobile */
.mobile-nav-menu .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.25);
  border-left: 2px solid rgba(220, 38, 38, 0.3);
}

.mobile-nav-menu .sub-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.mobile-nav-menu .sub-menu a {
  padding-left: 2.5rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: #9ca3af;
}

.mobile-nav-menu .sub-menu a::after {
  content: '→';
  font-size: 0.9rem;
}

.mobile-nav-menu .sub-menu a:hover {
  color: #e5e7eb;
  background: rgba(220, 38, 38, 0.08);
}

/* Enhanced Backdrop overlay */
.offcanvas-backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.offcanvas-backdrop.show {
  opacity: 1;
}

/* Mobile menu UI */
@media (max-width: 991.98px) {
  .mobile-offcanvas {
    width: min(340px, 100vw) !important;
    max-width: 100vw;
    background: #15151f;
    border-right: 1px solid rgba(220, 38, 38, .2);
  }

  .mobile-offcanvas .offcanvas-header {
    min-height: 80px;
    justify-content: flex-start;
    gap: .5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(110deg, #2b111c 0%, #21131d 100%);
    border-bottom: 1px solid rgba(220, 38, 38, .35);
  }

  .mobile-offcanvas .mobile-menu-logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
  }

  .mobile-offcanvas .mobile-menu-logo a {
    display: inline-flex;
    align-items: center;
  }

  .mobile-offcanvas .mobile-menu-logo img,
  .mobile-offcanvas .mobile-menu-logo .custom-logo {
    display: block;
    width: auto !important;
    height: 40px !important;
    max-width: 180px;
    object-fit: contain;
  }

  .mobile-offcanvas .mobile-menu-logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
  }

  .mobile-offcanvas .offcanvas-title {
    flex: 0 0 auto;
    gap: .55rem;
    color: #f3f4f6;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
  }

  .mobile-offcanvas .offcanvas-title svg {
    width: 20px;
    height: 20px;
    margin-right: 0 !important;
  }

  .mobile-offcanvas .btn-close-custom {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin: 0 0 0 auto;
    padding: 0;
    color: #d1d5db;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .55rem;
  }

  .mobile-offcanvas .btn-close-custom svg {
    width: 20px;
    height: 20px;
  }

  .mobile-offcanvas .btn-close-custom:hover,
  .mobile-offcanvas .btn-close-custom:focus-visible {
    color: #fff;
    background: rgba(220, 38, 38, .22);
    border-color: rgba(220, 38, 38, .55);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
  }

  .mobile-offcanvas .offcanvas-body {
    padding: 0;
    overflow-y: auto;
  }

  .mobile-nav-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, .065);
  }

  .mobile-nav-menu a {
    min-height: 61px;
    padding: 1rem 1.65rem;
    color: #e5e7eb;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    border-left: 0;
    transition: color .2s ease, background-color .2s ease, padding-left .2s ease;
  }

  .mobile-nav-menu a::before {
    display: none;
  }

  .mobile-nav-menu a::after {
    content: '›';
    margin-left: auto;
    color: #dc2626;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
  }

  .mobile-nav-menu a:hover,
  .mobile-nav-menu a:focus-visible {
    padding-left: 1.85rem;
    color: #fff;
    background: rgba(220, 38, 38, .08);
    border-left: 0;
    outline: none;
  }

  .mobile-nav-menu a:hover::after,
  .mobile-nav-menu a:focus-visible::after {
    color: #ef4444;
    transform: translateX(3px);
  }

  .mobile-nav-menu .current-menu-item>a,
  .mobile-nav-menu .current_page_item>a {
    color: #fff;
    background: rgba(220, 38, 38, .1);
    border-left: 3px solid #dc2626;
    padding-left: calc(1.65rem - 3px);
  }

  .mobile-nav-menu .sub-menu {
    background: #101017;
    border-left: 0;
  }

  .mobile-nav-menu .sub-menu a {
    min-height: 52px;
    padding-left: 2.5rem;
    font-size: .95rem;
    font-weight: 500;
  }
}


/* Desktop menu alignment */
.desktop-nav {
  border-top: 1px solid rgba(220, 38, 38, 0.25);
}

@media (min-width: 992px) {
  .desktop-menu .navbar-nav {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .desktop-menu .navbar-nav .nav-item {
    flex: 0 0 auto;
    max-width: 200px;
  }

  .desktop-menu .navbar-nav .nav-link {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.3;
    padding: 0.5rem 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    color: #e5e7eb;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 6px;
  }

  .desktop-menu .navbar-nav .nav-link:hover {
    color: #fff;
    background: rgba(220, 38, 38, 0.12);
  }

  .desktop-menu .navbar-nav .current-menu-item>a,
  .desktop-menu .navbar-nav .current_page_item>a {
    color: #ef4444;
  }
}

/* SEO archive landing copy */
.archive-intro {
  max-width: 900px;
  line-height: 1.75;
}

.archive-intro p:last-child {
  margin-bottom: 0;
}

.post-meta .meta-value a {
  text-decoration: none;
}

.post-meta .meta-value a:hover {
  text-decoration: underline;
}

/* Single post UX */
.single-entry {
  max-width: 1180px;
  margin: 0 auto;
}

.single-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: .85rem;
}

.single-breadcrumb a {
  color: #ef4444;
}

.single-breadcrumb > span:last-child {
  max-width: 34rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.single-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid rgba(220, 38, 38, .25);
  border-radius: .85rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}

.single-header-copy {
  min-width: 0;
}

.single-kicker {
  color: #ef4444;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.single-title {
  margin: .3rem 0 .45rem;
  color: #fff;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.single-published {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  color: var(--muted);
  font-size: .86rem;
}

.single-header-thumb {
  flex: 0 0 320px;
  width: 320px;
  height: 180px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: .55rem;
}

.single-player-section {
  margin-bottom: 1.25rem;
}

.video-section .video-container {
  border-color: rgba(220, 38, 38, .3);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .3);
}

.video-unavailable {
  padding: 3rem 1rem;
  color: var(--muted);
  text-align: center;
  background: #08080a;
  border: 1px solid rgba(220, 38, 38, .25);
  border-radius: .65rem;
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.single-info,
.single-content-card,
.single-sidebar-card {
  padding: 1.15rem;
  margin-bottom: 1.25rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: .75rem;
}

.single-info {
  display: block;
}

.single-section-title {
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}

.single-info .single-section-title,
.single-content-card .single-section-title {
  padding-bottom: .8rem;
  margin-bottom: .9rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.single-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

.single-info-grid .meta-item {
  display: block;
  min-width: 0;
  padding: .7rem;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: .5rem;
}

.single-info-grid .meta-label,
.single-info-grid .meta-value {
  display: block;
  margin: 0;
}

.single-info-grid .meta-label {
  margin-bottom: .18rem;
  font-size: .78rem;
}

.single-info-grid .meta-value {
  overflow-wrap: anywhere;
}

.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .9rem;
}

.single-tags .tag-item {
  color: #fca5a5;
  background: rgba(220, 38, 38, .1);
  border-color: rgba(220, 38, 38, .3);
}

.single-content-card {
  margin-bottom: 1.25rem;
}

.single-content {
  color: #d1d5db;
  font-size: 1rem;
  line-height: 1.85;
}

.single-content > :last-child {
  margin-bottom: 0;
}

.single-content h2,
.single-content h3 {
  margin-top: 1.4rem;
  color: #fff;
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: .5rem;
}

.single-sidebar-card {
  position: sticky;
  top: 1rem;
}

.single-sidebar-card .single-section-title {
  margin-bottom: .8rem;
}

.single-nav-link {
  display: block;
  padding: .75rem 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.single-nav-link:first-of-type {
  border-top: 0;
}

.single-nav-label {
  display: block;
  margin-bottom: .2rem;
  color: var(--muted);
  font-size: .78rem;
}

.single-nav-link strong {
  display: block;
  color: #e5e7eb;
  line-height: 1.45;
}

.single-nav-link:hover strong {
  color: #ef4444;
}

.single-related {
  padding-top: .3rem;
}

.single-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}

.single-more-link {
  color: #ef4444;
  font-size: .9rem;
  font-weight: 600;
}

.related-card {
  padding: .55rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: .65rem;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(220, 38, 38, .45);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}

.related-card .title {
  margin: .55rem 0 .35rem;
  font-size: .88rem;
  line-height: 1.45;
}

@media (max-width: 767.98px) {
  .single-header {
    align-items: flex-start;
    padding: 1rem;
  }

  .single-header-thumb {
    flex-basis: 180px;
    width: 180px;
    height: 101px;
  }

  .single-layout {
    display: block;
  }

  .single-sidebar-card {
    position: static;
  }
}

/* Force all archive and related thumbnails to landscape */
.card-media .thumb-container {
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden;
  background: #0b0b0f;
}

.card-media .thumb-container .thumb,
.card-media > a > .thumb {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  object-position: center;
}

@media (max-width: 575.98px) {
  .single-title {
    font-size: 1.35rem;
  }

  .single-header {
    flex-direction: column;
  }

  .single-header-thumb {
    flex: 0 0 auto;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .single-info-grid {
    grid-template-columns: 1fr;
  }
}

/* Header UX refresh */
.site-header,
header.sticky-top {
  background: rgba(18, 18, 26, .96) !important;
  border-bottom: 1px solid rgba(220, 38, 38, .16);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

header.sticky-top .topbar {
  min-height: 76px;
  padding-top: .8rem;
  padding-bottom: .8rem;
  gap: 1rem;
}

.site-logo-link {
  flex: 0 1 auto;
  min-width: 0;
  gap: .65rem;
  transition: opacity .2s ease, transform .2s ease;
}

.site-logo-link:hover {
  opacity: .9;
  transform: translateY(-1px);
}

.site-logo-link .site-title {
  overflow: hidden;
  max-width: 260px;
  color: #f9fafb !important;
  font-size: 1.05rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .top-search {
  flex: 0 1 360px;
  max-width: 360px;
  margin-left: auto;
}

.topbar .top-search .input-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: .65rem;
  background: #0d0d12;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.topbar .top-search .input-group:focus-within {
  border-color: rgba(239, 68, 68, .7);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .13);
}

.topbar .top-search .form-control {
  height: 42px;
  min-width: 0;
  padding-left: 1rem;
  background: transparent !important;
  border: 0 !important;
  color: #f3f4f6 !important;
  box-shadow: none !important;
}

.topbar .top-search .form-control::placeholder {
  color: #9ca3af;
}

.topbar .top-search .btn {
  height: 42px;
  min-width: 72px;
  border: 0 !important;
  border-radius: 0;
  background: #b91c1c;
  color: #fff;
  font-weight: 600;
  transition: background .2s ease;
}

.topbar .top-search .btn:hover {
  background: #dc2626;
  color: #fff;
}

.desktop-nav {
  background: rgba(10, 10, 14, .72) !important;
  border-top: 1px solid rgba(220, 38, 38, .24);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.desktop-nav .container {
  padding-top: .2rem;
  padding-bottom: .2rem;
}

.desktop-menu .navbar-nav .nav-link {
  position: relative;
  padding: .7rem .65rem;
  color: #cbd5e1;
  font-weight: 600;
  letter-spacing: .01em;
}

.desktop-menu .navbar-nav .nav-link::after {
  position: absolute;
  right: .65rem;
  bottom: .2rem;
  left: .65rem;
  height: 2px;
  background: #dc2626;
  border-radius: 2px;
  content: '';
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .2s ease, transform .2s ease;
}

.desktop-menu .navbar-nav .nav-link:hover,
.desktop-menu .navbar-nav .current-menu-item > a,
.desktop-menu .navbar-nav .current_page_item > a {
  color: #fff;
  background: transparent;
}

.desktop-menu .navbar-nav .nav-link:hover::after,
.desktop-menu .navbar-nav .current-menu-item > a::after,
.desktop-menu .navbar-nav .current_page_item > a::after {
  opacity: 1;
  transform: scaleX(1);
}

@media (max-width: 991.98px) {
  header.sticky-top .topbar {
    min-height: 64px;
    padding-top: .65rem;
    padding-bottom: .65rem;
  }

  .topbar .top-search {
    flex-basis: 100%;
    max-width: none;
    order: 3;
    margin-left: 0;
  }

  .site-logo-link .site-title {
    max-width: 190px;
  }

  .mobile-menu-toggle {
    order: 2;
    width: 44px;
    height: 44px;
    margin-left: auto !important;
    border: 1px solid rgba(239, 68, 68, .35);
    border-radius: .65rem;
    background: rgba(220, 38, 38, .1);
  }

  .mobile-menu-toggle:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .25);
  }
}

@media (max-width: 575.98px) {
  header.sticky-top .topbar {
    gap: .7rem;
  }

  .site-logo-link img,
  .site-logo img,
  img.custom-logo {
    height: 40px !important;
    max-height: 40px !important;
  }

  .site-logo-link .site-title {
    max-width: 150px;
    font-size: .95rem !important;
  }
}

/* Keep the mobile menu full-height even when Bootstrap CSS is unavailable */
@media (max-width: 991.98px) {
  .mobile-offcanvas {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(340px, 100vw) !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    overflow: hidden;
    visibility: hidden;
    transform: translateX(-100%);
    z-index: 1060;
  }

  .mobile-offcanvas.show,
  .mobile-offcanvas.showing {
    visibility: visible;
    transform: translateX(0);
  }

  .mobile-offcanvas.hiding {
    visibility: visible;
    transform: translateX(-100%);
  }

  .mobile-offcanvas .offcanvas-header {
    flex: 0 0 auto;
  }

  .mobile-offcanvas .offcanvas-body {
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}