/* ===================================================
   GSM Firmware Website - Main Stylesheet
   Theme Color: #ce2020 (Red)
=================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700&display=swap');

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Fira Sans', Arial, sans-serif;
  font-size: 14px;
  color: #656565;
  background: #f2f6f8;
  word-wrap: break-word;
}
a { text-decoration: none; color: #ce2020; }
a:hover { color: #a01818; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ---- Variables ---- */
:root {
  --red: #ce2020;
  --dark-red: #a01818;
  --dark: #1f2024;
  --gray: #656565;
  --light-gray: #f2f6f8;
  --border: rgba(155,155,155,0.2);
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --sidebar-w: 300px;
}

/* ===================================================
   HEADER
=================================================== */
#header-wrap {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  z-index: 1000;
  box-shadow: 0 3px 12px rgba(0,0,0,0.07);
}
.top-minibar {
  background: #15171b;
  color: #9aa0a6;
  font-size: 11.5px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.top-minibar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 11px;
}
.top-minibar-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 68px;
  gap: 16px;
}
/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #e52d27, #ce2020);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(206,32,32,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.site-logo:hover .logo-icon {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(206,32,32,0.45);
}
.site-logo .logo-text {
  font-size: 21px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  letter-spacing: -0.3px;
}
.site-logo .logo-text span { color: var(--red); }
.site-logo-img {
  height: 44px;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

/* Nav */
#main-nav {
  flex: 1;
  display: flex;
  align-items: center;
}
#main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
#main-nav ul > li {
  position: relative;
}
#main-nav ul > li > a {
  display: block;
  padding: 0 13px;
  height: 68px;
  line-height: 68px;
  font-size: 13.5px;
  font-weight: 600;
  color: #33383f;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
#main-nav ul > li > a:hover,
#main-nav ul > li.active > a {
  color: var(--red);
}
#main-nav ul > li > a .fa-chevron-down {
  font-size: 10px;
  margin-left: 4px;
}
/* Dropdown Menu */
.dropdown {
  position: absolute;
  top: 68px;
  left: 0;
  min-width: 210px;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  border-radius: 0 0 10px 10px;
  display: none;
  z-index: 999;
  padding: 8px 0;
}
#main-nav ul > li:hover .dropdown { display: block; }
.dropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover {
  background: #fdf2f2;
  color: var(--red);
  padding-left: 22px;
}

/* Mega Brand Dropdown for All Firmware Brands */
.mega-brand-dropdown {
  position: absolute;
  top: 68px;
  left: -80px;
  width: 580px;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 12px 32px rgba(0,0,0,0.16);
  border-radius: 0 0 12px 12px;
  display: none;
  z-index: 999;
  padding: 18px;
}
#main-nav ul > li:hover .mega-brand-dropdown { display: block; }
.mega-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.mega-brand-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 8px;
  text-decoration: none;
  color: var(--dark);
  transition: all 0.2s ease;
}
.mega-brand-item:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--red);
  transform: translateY(-1.5px);
  box-shadow: 0 3px 8px rgba(206,32,32,0.12);
}
.mega-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
  background: #f0f2f5;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}
.mega-brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  background: white;
}
.cat-banner-logo {
  width: 64px;
  height: 64px;
  background: white;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.cat-banner-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mega-brand-info {
  flex: 1;
}
.mega-brand-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.mega-brand-count {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.mega-brand-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.mega-brand-footer a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}
.mega-brand-footer a:hover {
  text-decoration: underline;
}

/* Nav Tools highlight button */
.nav-tools-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  color: #1f2024 !important;
}
.nav-tools-btn:hover {
  color: var(--red) !important;
}

/* Header Buttons with Border & Shadow */
.header-search-btn {
  background: white;
  border: 1.5px solid rgba(0,0,0,0.1);
  cursor: pointer;
  color: var(--dark);
  font-size: 15px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.header-search-btn:hover {
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 4px 10px rgba(206,32,32,0.18);
  transform: translateY(-1px);
}

.req-btn-header {
  background: linear-gradient(135deg, #ce2020, #e53935);
  color: white !important;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #b71c1c;
  box-shadow: 0 3px 9px rgba(206,32,32,0.32);
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
}
.req-btn-header:hover {
  background: linear-gradient(135deg, #b71c1c, #ce2020);
  box-shadow: 0 5px 14px rgba(206,32,32,0.45);
  transform: translateY(-1.5px);
  color: white !important;
}

/* Mobile menu toggle */
.mobile-menu-btn {
  display: none;
  background: white;
  border: 1.5px solid rgba(0,0,0,0.1);
  cursor: pointer;
  font-size: 17px;
  color: var(--dark);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.mobile-menu-btn:hover {
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 4px 10px rgba(206,32,32,0.18);
}

/* Search overlay */
#search-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
#search-overlay.active { display: flex; }
.search-box {
  background: white;
  border-radius: 10px;
  padding: 20px;
  width: 90%;
  max-width: 580px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.search-box-inner {
  display: flex;
  gap: 10px;
}
.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--red); }
.search-box button {
  padding: 12px 20px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
}
.search-box button:hover { background: var(--dark-red); }
.search-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

/* ===================================================
   BREADCRUMB
=================================================== */
.breadcrumb-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
}
.breadcrumb a { color: #888; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { color: #ccc; }
.breadcrumb .current { color: var(--dark); font-weight: 500; }

/* ===================================================
   TICKER / BREAKING BAR
=================================================== */
.ticker-bar {
  background: var(--red);
  color: white;
  padding: 7px 0;
  overflow: hidden;
}
.ticker-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ticker-label {
  background: rgba(0,0,0,0.2);
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ticker-content {
  flex: 1;
  overflow: hidden;
}
.ticker-scroll {
  display: flex;
  gap: 40px;
  animation: ticker-scroll 25s linear infinite;
  white-space: nowrap;
}
.ticker-scroll a {
  color: white;
  font-size: 12.5px;
  font-weight: 500;
}
.ticker-scroll a:hover { text-decoration: underline; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===================================================
   LAYOUT
=================================================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
#content-wrapper {
  padding: 28px 0 40px;
}
.main-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
#main-content { flex: 1; min-width: 0; }
#sidebar { width: var(--sidebar-w); flex-shrink: 0; }

/* ===================================================
   SECTION HEADING
=================================================== */
.section-heading {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  gap: 10px;
}
.section-heading h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  position: relative;
  padding-left: 12px;
}
.section-heading h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--red);
  border-radius: 2px;
}
.section-heading .view-all {
  margin-left: auto;
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
}

/* ===================================================
   FEATURED SLIDER
=================================================== */
.featured-slider {
  position: relative;
  width: 100%;
  height: 360px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 28px;
  background: #1f2024;
  box-shadow: var(--shadow);
}
.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #111;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.slide-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  padding: 34px 24px 22px;
  color: white;
}
.slide-cat {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.slide-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
  line-height: 1.35;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.slide-meta { font-size: 12px; color: rgba(255,255,255,0.85); }
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.92);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}
.slider-btn:hover { background: white; transform: translateY(-50%) scale(1.08); }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }
.slider-dots {
  position: absolute;
  bottom: 14px;
  right: 20px;
  display: flex;
  gap: 6px;
  z-index: 10;
}
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}
.slider-dot.active { background: #ce2020; width: 22px; border-radius: 4px; box-shadow: 0 0 8px rgba(206,32,32,0.8); }

/* ===================================================
   POST GRID & FIXED THUMBNAILS
=================================================== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.post-card {
  background: white;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.06);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: rgba(206,32,32,0.2);
}
.post-thumb-wrap {
  position: relative;
  width: 100%;
  height: 185px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef1f5;
  flex-shrink: 0;
}
.post-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
  display: block;
}
.post-card:hover .post-thumb-wrap img { transform: scale(1.06); }
.post-cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--red);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.post-card-body {
  padding: 15px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}
.post-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.42;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
  transition: color 0.2s;
}
.post-card:hover .post-card-title { color: var(--red); }
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: #888;
  border-top: 1px solid #f2f4f7;
  padding-top: 10px;
  margin-top: auto;
}
.post-card-meta i { margin-right: 4px; color: #aaa; }
.post-card-meta .download-count { margin-left: auto; color: var(--red); font-weight: 700; }
.post-card-meta .download-count i { color: var(--red); }

/* ===================================================
   LIST POSTS (for category/search pages)
=================================================== */
.post-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.post-list-item {
  background: white;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  gap: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0,0,0,0.06);
}
.post-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  border-color: rgba(206,32,32,0.2);
}
.post-list-thumb {
  width: 210px;
  height: 135px;
  flex-shrink: 0;
  overflow: hidden;
  background: #eef1f5;
  position: relative;
  aspect-ratio: 16 / 10;
}
.post-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}
.post-list-item:hover .post-list-thumb img { transform: scale(1.05); }
.post-list-body {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}
.post-list-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.post-list-item:hover .post-list-title { color: var(--red); }
.post-list-meta {
  font-size: 11.5px;
  color: #999;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.post-list-meta i { margin-right: 3px; }
.post-list-excerpt {
  font-size: 12.5px;
  color: #888;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===================================================
   PAGINATION
=================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0 8px;
  font-family: inherit;
}
.page-btn:hover, .page-btn.active {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.page-btn:disabled { opacity: 0.4; pointer-events: none; }

/* ===================================================
   SIDEBAR
=================================================== */
.sidebar-widget {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.widget-header {
  background: var(--dark);
  color: white;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-header i { color: var(--red); }
.widget-body { padding: 14px 16px; }

/* Sidebar search */
.sidebar-search {
  display: flex;
  gap: 8px;
}
.sidebar-search input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.sidebar-search input:focus { border-color: var(--red); }
.sidebar-search button {
  padding: 9px 13px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

/* Category list */
.cat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cat-list li:last-child { border-bottom: none; }
.cat-list li a {
  color: var(--dark);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.cat-list li a i { color: var(--red); font-size: 11px; }
.cat-list li a:hover { color: var(--red); }
.cat-count {
  background: var(--light-gray);
  color: #888;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}

/* Recent posts widget */
.recent-post-item {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.recent-post-item:last-child { border-bottom: none; }
.recent-thumb {
  width: 74px;
  height: 46px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f172a;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.recent-info { flex: 1; min-width: 0; }
.recent-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  transition: color 0.2s;
}
.recent-post-item:hover .recent-title { color: var(--red); }
.recent-meta { font-size: 11px; color: #aaa; }

/* Tags */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-item {
  padding: 4px 10px;
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11.5px;
  color: var(--gray);
  transition: all 0.2s;
  cursor: pointer;
}
.tag-item:hover { background: var(--red); color: white; border-color: var(--red); }

/* Ad widget */
.ad-widget {
  background: #eee;
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 12px;
  border-radius: 6px;
  border: 2px dashed #ddd;
  text-align: center;
}

/* ===================================================
   SINGLE POST PAGE
=================================================== */
.post-header {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.post-header-cat {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.post-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 14px;
}
.post-header-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #999;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.post-header-meta i { margin-right: 4px; color: #ccc; }
.post-header-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.post-tag {
  padding: 3px 9px;
  background: var(--light-gray);
  border-radius: 20px;
  font-size: 11px;
  color: #888;
  border: 1px solid var(--border);
}

.post-featured-img {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  max-height: 380px;
  background: #ddd;
}
.post-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content-box {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  line-height: 1.75;
  color: #555;
  font-size: 14px;
}
.post-content-box h2, .post-content-box h3 {
  color: var(--dark);
  margin: 20px 0 10px;
}
.post-content-box p { margin-bottom: 14px; }
.post-content-box ul, .post-content-box ol {
  margin: 10px 0 14px 20px;
}
.post-content-box ul li { list-style: disc; margin-bottom: 5px; }
.post-content-box ol li { list-style: decimal; margin-bottom: 5px; }
.post-content-box table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 13px;
}
.post-content-box table th,
.post-content-box table td {
  padding: 9px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.post-content-box table th {
  background: var(--dark);
  color: white;
  font-weight: 600;
}
.post-content-box table tr:nth-child(even) { background: var(--light-gray); }

/* Download Box */
.download-box {
  background: white;
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--red);
}
.download-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.download-box h3 i { color: var(--red); }
.download-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.download-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: var(--red);
  color: white;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-align: left;
}
.download-btn:hover { background: var(--dark-red); transform: translateY(-1px); color: white; }
.download-btn i { font-size: 18px; }
.download-btn .btn-sub { font-size: 11px; font-weight: 400; opacity: 0.85; }
.download-btn-alt {
  background: #1f2024;
}
.download-btn-alt:hover { background: #000; }
.download-warning {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 5px;
  font-size: 12px;
  color: #7a5f00;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.download-warning i { color: #f9a825; margin-top: 1px; }

/* Specs table */
.specs-box {
  background: white;
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.specs-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 14px;
}
.specs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td {
  padding: 10px 14px;
}
.specs-table td:first-child {
  font-weight: 600;
  color: var(--dark);
  width: 35%;
  background: var(--light-gray);
}

/* Social share */
.share-box {
  background: white;
  border-radius: 8px;
  padding: 18px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-box span { font-weight: 600; color: var(--dark); font-size: 13px; }
.share-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
  font-family: inherit;
}
.share-btn:hover { opacity: 0.85; }
.share-fb { background: #3b5999; }
.share-tw { background: #00acee; }
.share-wa { background: #25d366; }
.share-tg { background: #0088cc; }

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

/* ===================================================
   FOOTER
=================================================== */
#footer {
  background: var(--dark);
  color: #aaa;
  padding: 40px 0 0;
  margin-top: 10px;
}
.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-about .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: var(--red);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
}
.footer-logo .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
}
.footer-logo .logo-text span { color: var(--red); }
.footer-about p {
  font-size: 13px;
  line-height: 1.7;
  color: #888;
  margin-bottom: 16px;
}
.footer-socials {
  display: flex;
  gap: 8px;
}
.footer-social-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  transition: opacity 0.2s;
}
.footer-social-btn:hover { opacity: 0.8; color: white; }
.fs-fb { background: #3b5999; }
.fs-yt { background: #db4a39; }
.fs-tg { background: #0088cc; }
.fs-wa { background: #25d366; }
.footer-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--red);
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a {
  color: #888;
  font-size: 13px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-col ul li a i { font-size: 10px; color: var(--red); }
.footer-col ul li a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 16px 20px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}
.footer-bottom a { color: #666; }
.footer-bottom a:hover { color: var(--red); }
.footer-bar {
  background: rgba(0,0,0,0.2);
}

/* ===================================================
   LOADING SPINNER
=================================================== */
.spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.spinner::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #bbb;
}
.empty-state i {
  font-size: 42px;
  display: block;
  margin-bottom: 12px;
  color: #ddd;
}
.empty-state p { font-size: 14px; }

/* ===================================================
   BACK TO TOP
=================================================== */
#back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: var(--red);
  color: white;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(206,32,32,0.4);
  transition: background 0.2s;
  z-index: 500;
}
#back-top.visible { display: flex; }
#back-top:hover { background: var(--dark-red); }

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 900px) {
  .main-layout { flex-direction: column; }
  #sidebar { width: 100%; }
  #main-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .featured-slider { height: 240px; }
  .slide-title { font-size: 16px; }
  .post-list-thumb { width: 110px; height: 95px; }
  .related-posts-grid { grid-template-columns: 1fr; }
  .header-inner { gap: 10px; }
  .post-header h1 { font-size: 18px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

/* Mobile Nav Drawer */
#mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  height: 100vh;
  background: white;
  z-index: 2000;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
#mobile-nav.open { transform: translateX(0); display: block; }
.mobile-nav-header {
  background: var(--dark);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav-header .logo-text { color: white; font-size: 18px; font-weight: 700; }
.mobile-nav-header .logo-text span { color: var(--red); }
.mobile-close { color: white; background: none; border: none; font-size: 22px; cursor: pointer; }
.mobile-nav-list { padding: 10px 0; }
.mobile-nav-list li a {
  display: block;
  padding: 12px 20px;
  color: var(--dark);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.mobile-nav-list li a:hover { color: var(--red); background: #fef5f5; }

.nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
}
.nav-overlay.open { display: block; }
