html,
body {
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  color: #212529;
  width: auto;
  margin: 0;
  text-align: left;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.section-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-heading {
  width: 100%;
  max-width: 1280px;
  margin: 32px auto 16px auto;
  padding: 0 16px;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

#maincontent {
  width: 100%;
}

#maincontent {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 16px;
  padding-right: 16px;
}

#maincontent #blog,
#maincontent #news,
#maincontent #faq,
#maincontent #quickwizard {
  float: none !important;
  width: 100% !important;
  max-width: 1200px;
  margin: 1.25rem auto;
  height: auto !important;
  overflow: visible !important;
}

#maincontent #hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

#maincontent #quickwizard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#maincontent #qrcode {
  float: none !important;
  width: auto;
  margin: 1rem auto;
  text-align: center;
}

.navbar {
  width: 100%;
}

#hero {
  background-color: #f8f9fa;
}

#hero .swiper {
  width: 100vw;
  height: 460px;
  position: relative;
  overflow: hidden;
}

/* Force slide width to viewport to avoid miscalculation */
#hero .swiper-slide {
  width: 100vw !important;
}

/* Fallback styles if Swiper CSS fails to load */
#hero .swiper-wrapper {
  display: flex;
}

#hero .swiper-slide {
  flex: 0 0 100%;
}

#hero .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.quick-panel select {
  width: 100%;
  max-width: 420px;
}

.footer {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-top: 1px solid #334155;
  padding-top: 3rem;
}

/* Global Footer Overrides for Dark Theme */
footer.bg-light {
    background-color: #1e293b !important; /* Dark Slate */
    color: #e2e8f0 !important;
}

footer .text-dark {
    color: #cbd5e1 !important; /* Light Gray text for links */
}

footer .text-dark:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

footer .text-primary {
    color: #60a5fa !important; /* Lighter Blue for headings/icons on dark bg */
}

footer .text-muted {
    color: #94a3b8 !important;
}

footer hr {
    border-color: rgba(255,255,255,0.1);
}

.navbar-draytek {
  background: #f4f6f8;
}

.navbar-draytek .nav-link {
  color: #344054;
  font-weight: 500;
}

.navbar-draytek .nav-link:hover {
  color: #d72631;
}

.navbar-draytek .navbar-toggler {
  border: none;
}

.navbar-draytek .nav-link.active {
  color: #d72631;
  font-weight: 600;
  border-bottom: 2px solid #d72631;
}

.cards-grid {
  width: 100%;
  max-width: 1280px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 992px) {
  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: #fcfcfd;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.04);
  border: 1px solid #eef2f7;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.08), 0 2px 6px rgba(16, 24, 40, 0.06);
  transform: translateY(-1px);
}

.card-section {
  padding: 24px;
}

.card-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-section ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.card-section li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
}

.card-section a {
  color: #1f2937;
  text-decoration: none;
  font-weight: 500;
}

.card-section a:hover {
  color: #d72631;
}

.card-hero {
  position: relative;
  height: 220px;
  min-height: 220px;
  overflow: hidden;
  width: 100%;
  display: block;
  flex: 0 0 auto;
}

.card-hero {
  background: #1f2937;
}

.card-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 100%);
}

/* Consistent placeholder hero styles */
.hero-blog {
  background: radial-gradient(80% 120% at 20% 10%, rgba(215, 38, 49, 0.25) 0%, rgba(215, 38, 49, 0.05) 40%, rgba(31, 41, 55, 0.9) 100%),
    linear-gradient(135deg, #1f2937 0%, #0f172a 100%) !important;
}

.hero-latest {
  background: radial-gradient(80% 120% at 80% 20%, rgba(124, 58, 237, 0.25) 0%, rgba(124, 58, 237, 0.05) 40%, rgba(31, 41, 55, 0.9) 100%),
    linear-gradient(135deg, #1f2937 0%, #0b1020 100%) !important;
}

.hero-news {
  background: radial-gradient(80% 120% at 30% 70%, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0.05) 40%, rgba(31, 41, 55, 0.9) 100%),
    linear-gradient(135deg, #1f2937 0%, #0f172a 100%) !important;
}

.hero-quick {
  background: radial-gradient(80% 120% at 60% 30%, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.05) 40%, rgba(31, 41, 55, 0.9) 100%),
    linear-gradient(135deg, #1f2937 0%, #0b1020 100%) !important;
}

.hero-follow {
  background: radial-gradient(80% 120% at 40% 40%, rgba(234, 88, 12, 0.25) 0%, rgba(234, 88, 12, 0.05) 40%, rgba(31, 41, 55, 0.9) 100%),
    linear-gradient(135deg, #1f2937 0%, #0f172a 100%) !important;
}

.tag {
  position: absolute;
  left: 16px;
  top: 16px;
  background: #fff0f2;
  color: #d72631;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 9999px;
  letter-spacing: .02em;
}

.timestamp {
  color: #98a2b3;
  margin-left: 8px;
  font-size: 12px;
}

.card-section h2 i,
.card-section h3 i {
  color: #d72631;
  margin-right: 8px;
}

.new-icon {
  color: #d72631;
  margin-left: 8px;
}

.card-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.card-titlebar i {
  color: #d72631;
}

.card-titlebar .title-text {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

section#blog .card-hero {
  background: radial-gradient(80% 120% at 20% 10%, rgba(215, 38, 49, 0.25) 0%, rgba(215, 38, 49, 0.05) 40%, rgba(31, 41, 55, 0.9) 100%), linear-gradient(135deg, #1f2937 0%, #0f172a 100%) !important;
}

section#faq .card-hero {
  background: radial-gradient(80% 120% at 80% 20%, rgba(124, 58, 237, 0.25) 0%, rgba(124, 58, 237, 0.05) 40%, rgba(31, 41, 55, 0.9) 100%), linear-gradient(135deg, #1f2937 0%, #0b1020 100%) !important;
}

section#news .card-hero {
  background: radial-gradient(80% 120% at 30% 70%, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0.05) 40%, rgba(31, 41, 55, 0.9) 100%), linear-gradient(135deg, #1f2937 0%, #0f172a 100%) !important;
}

section#quickwizard .card-hero {
  background: radial-gradient(80% 120% at 60% 30%, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.05) 40%, rgba(31, 41, 55, 0.9) 100%), linear-gradient(135deg, #1f2937 0%, #0b1020 100%) !important;
}

section#quickwizard .card-hero {
  width: 100% !important;
  display: block !important;
}

/* Generated Hero Images */
.hero-blog,
section#blog .card-hero {
  background: linear-gradient(rgba(30, 64, 175, 0.2), rgba(15, 23, 42, 0.4)), url('../../images/hero/blog.png') center/cover no-repeat !important;
}

.hero-latest,
section#faq .card-hero {
  background: linear-gradient(rgba(124, 58, 237, 0.2), rgba(15, 23, 42, 0.4)), url('../../images/hero/latest.png') center/cover no-repeat !important;
}

.hero-news,
section#news .card-hero {
  background: linear-gradient(rgba(14, 165, 233, 0.2), rgba(15, 23, 42, 0.4)), url('../../images/hero/news.png') center/cover no-repeat !important;
}

.hero-quick,
section#quickwizard .card-hero {
  background: linear-gradient(rgba(22, 163, 74, 0.2), rgba(15, 23, 42, 0.4)), url('../../images/hero/quick.png') center/cover no-repeat !important;
}