/* CSS Variables & Reset */
:root {
  --bg: #000;
  --muted: #9aa0a6;
  --accent: #de2600;
  --container: 1200px;
  --card: #0f0f0f;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: #fff;
  line-height: 1.4;
}

/* Enhanced header dark/light mode styles */
body[data-theme="dark"] {
  background: #181818 !important;
  color: #f5f5f5 !important;
}
body[data-theme="light"] {
  background: #fff !important;
  color: #222 !important;
}
.site-header[data-theme="dark"], .main-nav[data-theme="dark"] {
  background: #222 !important;
}
.site-header[data-theme="light"], .main-nav[data-theme="light"] {
  background: #f5f5f5 !important;
}
.menu li a[data-theme="dark"] {
  color: #e0e0e0 !important;
}
.menu li a[data-theme="light"] {
  color: #222 !important;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; background: #181818; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 8px; }

/* Responsive Typography */
h1, .brand-title { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

/* Sidebars */

/* Left Sidebar Only */
.sidebar {
  background: #151515;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px 16px;
  margin-bottom: 32px;
  min-height: 200px;
  max-width: 340px;
}
.sidebar .widget {
  margin-bottom: 24px;
  background: #181818;
  border-radius: 6px;
  padding: 16px 12px;
  color: #e0e0e0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.sidebar .widget-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent);
}
.sidebar-left {
  margin-right: 24px;
}
.sidebar-right {
  display: none !important;
}

/* Ad Spaces in Sidebars and Grid */
.ad-space {
  background: #222;
  border-radius: 8px;
  padding: 18px 10px;
  margin: 0 0 18px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-space.ad-inline-grid {
  grid-column: span 4;
}
.ad-space.ad-top, .ad-space.ad-bottom, .ad-space.ad-after-title {
  margin: 18px 0;
}
.ad-space.ad-sidebar-top, .ad-space.ad-sidebar-bottom {
  margin: 0 0 18px 0;
}
.ad-space.ad-sidebar-top-right, .ad-space.ad-sidebar-bottom-right {
  margin: 0 0 18px 0;
}

@media (max-width: 1024px) {
  .sidebar {
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 16px 8px;
  }
}
/* Buttons */
.btn, button, input[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 22px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.btn:hover, button:hover, input[type="submit"]:hover {
  background: #b81e00;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Card Hover Effect */
.thumb-block {
  transition: transform 0.2s, box-shadow 0.2s;
}
.thumb-block:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

/* Form Styling */
input[type="search"], input[type="text"], input[type="email"], textarea {
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 15px;
  transition: border 0.2s;
}
input[type="search"]:focus, input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  border-color: var(--accent);
  outline: none;
}

/* Search bar focus effect */
.search-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(222,38,0,0.2);
}
.search-form label.focused .search-field {
  background: #fff;
  color: #222;
}

/* Footer Polishing */
.site-footer {
  background: #181818;
  color: #bdbdbd;
  font-size: 15px;
  letter-spacing: 0.2px;
}
.footer-menu li a {
  color: #bdbdbd;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-menu li a:hover {
  color: var(--accent);
}

/* Accessibility: Focus Styles */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Smooth Transitions for Major Elements */
.header-inner, .main-nav, .btn, .thumb-block {
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

/* Image Polishing */
img, .thumb-img {
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

/* Breadcrumb Styling */
.breadcrumb-nav {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb-nav a:hover {
  text-decoration: underline;
}
/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: clamp(12px, 4vw, 32px);
  padding-right: clamp(12px, 4vw, 32px);
}

/* Header */
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:clamp(10px,2vw,18px) 0}
.logo-wrap .site-title{font-weight:700;font-size:20px;color:#fff;text-decoration:none}
.hamburger{background:none;border:0;color:#fff;cursor:pointer;padding:8px;display:none}
.hamburger span{display:block;width:22px;height:2px;background:#fff;margin:4px 0}
.primary-nav .menu{list-style:none;display:flex;gap:18px;margin:0;padding:0}
.primary-nav .menu li a{color:#fff;text-decoration:none}
.header-actions{display:flex;align-items:center;gap:12px}

/* Header Layout */
.header-inner {
  padding: 0;
}
.header-top {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.site-branding img {
  height: 44px;
  display: block;
}
.header-search {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 180px;
}
.header-search form {
  max-width: 420px;
  width: 100%;
}
.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-actions .profile-btn {
  margin-left: 8px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s;
}
.header-actions .profile-btn:hover {
  color: var(--accent);
}
#menu-toggle {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s;
}
#menu-toggle:hover {
  color: var(--accent);
}
#mode-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s;
}
#mode-toggle:hover {
  color: var(--accent);
}
@media (max-width: 1024px) {
  .main-nav { display: none !important; }
  #menu-toggle { display: inline-block !important; }
  .header-search { flex: 1 1 100%; }
  .header-top { flex-wrap: wrap; }
  .header-actions { gap: 8px; }
  .header-search form { max-width: 100%; }
}
@media (max-width: 600px) {
  .header-inner { padding: 0 8px; }
  .header-top { flex-direction: column; align-items: stretch; gap: 10px; }
  .site-branding, .header-actions { justify-content: center; }
  .header-search { justify-content: center; margin-bottom: 8px; }
  .header-search form { max-width: 100%; }
}
@media (min-width: 1025px) {
  .main-nav { display: block !important; }
  #menu-toggle { display: none !important; }
}
/* Main nav menu bar below header */
.main-nav {
  width: 100%;
  margin-top: 12px;
  background: #181818;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 8px 0;
  display: block;
}
.menu {
  display: flex;
  gap: 24px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu li a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.menu li a:hover {
  background: var(--accent);
  color: #fff;
}
body[data-theme="light"] .menu li a {
  color: #222;
}

/* --- Professional Grid --- */
/* --- Auto-Resizing Grid --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
@media (max-width: 1024px) {
  .grid {
    gap: 18px;
  }
}
@media (max-width: 768px) {
  .grid {
    gap: 14px;
  }
}
@media (max-width: 480px) {
  .grid {
    gap: 10px;
  }
}
.thumb-block {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.thumb-block:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.thumb-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.thumb-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  background: #222;
}
.thumb-under {
  padding: 16px;
}
.title {
  font-size: 18px;
  margin: 0 0 8px 0;
  color: #fff;
  font-weight: 600;
}
.meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(0,0,0,0.7);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #fff;
  z-index: 2;
}

/* --- Dark/Light Mode for Grid --- */

body[data-theme="dark"] .thumb-block {
  background: #181818;
  color: #f5f5f5;
}
body[data-theme="dark"] .title {
  color: #f5f5f5;
}
body[data-theme="dark"] .meta {
  color: #bdbdbd;
}
body[data-theme="dark"] .badge {
  background: rgba(0,0,0,0.7);
  color: #fff;
}
body[data-theme="light"] .thumb-block {
  background: #f5f5f5;
  color: #222;
}
body[data-theme="light"] .title {
  color: #222;
}
body[data-theme="light"] .meta {
  color: #666;
}
body[data-theme="light"] .badge {
  background: #eee;
  color: #222;
}

/* --- Enhanced Hero --- */
/* --- Enhanced Hero --- */
.hero {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border-radius: 10px;
  background: rgba(20,20,20,0.85);
  padding: clamp(24px,6vw,40px) 0;
  margin-bottom: 32px;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}
body[data-theme="dark"] .hero {
  background: rgba(20,20,20,0.85);
  color: #f5f5f5;
}
body[data-theme="light"] .hero {
  background: #f5f5f5;
  color: #222;
}
.brand-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
  letter-spacing: 1px;
  font-weight: 700;
}
.hero-sub {
  color: var(--muted);
  margin-top: 8px;
  font-size: 1.2rem;
}

/* --- Enhanced Footer --- */
/* --- Enhanced Footer --- */
.site-footer {
  padding: clamp(16px,4vw,24px) 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  text-align: center;
  color: var(--muted);
  background: #181818;
  font-size: 15px;
  letter-spacing: 0.2px;
  border-radius: 10px 10px 0 0;
  transition: background 0.2s, color 0.2s;
}
body[data-theme="dark"] .site-footer {
  background: #181818;
  color: #bdbdbd;
  border-top: 1px solid rgba(255,255,255,0.04);
}
body[data-theme="light"] .site-footer {
  background: #f5f5f5;
  color: #222;
  border-top: 1px solid #eee;
}
.footer-menu {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 16px 0 0 0;
  padding: 0;
  justify-content: center;
}
.footer-menu li {
  display: inline-block;
}
.footer-menu li a {
  color: #bdbdbd;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
}
.footer-menu li a:hover {
  color: var(--accent);
  background: rgba(222,38,0,0.08);
}
body[data-theme="light"] .footer-menu li a {
  color: #222;
}

/* --- Enhanced Menu --- */
.main-nav {
  width: 100%;
  margin-top: 12px;
  background: #181818;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 8px 0;
  display: block;
}
body[data-theme="light"] .main-nav {
  background: #f5f5f5;
}
.menu {
  display: flex;
  gap: 24px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu li a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.menu li a:hover {
  background: var(--accent);
  color: #fff;
}
body[data-theme="light"] .menu li a {
  color: #222;
}