/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  line-height: 1.65;
  color: #0f172a;
  background: #f1f5f9;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0891b2; text-decoration: none; transition: color 0.2s; }
a:hover { color: #0e7490; }
h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.25;
  color: #0f172a;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
  background: #334155;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.header-brand { display: flex; align-items: center; gap: 12px; }
.header-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: white;
  letter-spacing: 0.5px;
  text-decoration: none;
  white-space: nowrap;
}
.header-title:hover { color: #06b6d4; }

/* ===== NAVIGATION ===== */
.nav { display: flex; align-items: center; }
.nav .menu { display: flex; list-style: none; gap: 2px; align-items: center; }
.nav .menu li a {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  padding: 7px 13px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav .menu li a:hover {
  color: white;
  background: rgba(6,182,212,0.18);
}
.nav .menu li a.active { color: #06b6d4; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1a3356 55%, #334155 100%);
  padding: 64px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 40px,
    rgba(6,182,212,0.03) 40px, rgba(6,182,212,0.03) 41px
  );
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: #06b6d4;
  color: white;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  padding: 5px 18px;
  border-radius: 20px;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.hero h1 {
  font-size: 50px;
  font-weight: 700;
  color: white;
  margin-bottom: 14px;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  color: #06b6d4;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.hero-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 36px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .stat-num {
  font-family: 'Oswald', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: #06b6d4;
  line-height: 1;
}
.hero-stat .stat-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 5px;
}

/* ===== MAIN LAYOUT ===== */
.page-wrapper {
  display: flex;
  gap: 28px;
  padding: 28px 0 48px;
  align-items: flex-start;
}
.sidebar {
  width: 29%;
  flex-shrink: 0;
  order: 0;
}
.main-content {
  flex: 1;
  order: 1;
  min-width: 0;
}

/* ===== SIDEBAR / MODULETABLE ===== */
.moduletable {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}
.moduletable h3 {
  background: #475569;
  color: white;
  padding: 11px 16px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0;
}
.module-body { padding: 16px; }
.module-body p { font-size: 13px; color: #475569; line-height: 1.6; }
.module-body > ul { list-style: none; }
.module-body > ul > li {
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  line-height: 1.4;
}
.module-body > ul > li:last-child { border-bottom: none; }
.module-body > ul > li a { color: #0f172a; display: block; }
.module-body > ul > li a:hover { color: #0891b2; }
.module-body > ul > li strong { color: #334155; font-weight: 700; }

.sidebar-categories > li a {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}
.cat-count {
  background: #475569;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: 'Oswald', sans-serif;
  flex-shrink: 0;
}
.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 3px solid #475569;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: #06b6d4;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== CARD GRID (blog / category-list) ===== */
.blog, .category-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ===== ARTICLE CARD ===== */
.article-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #e2e8f0;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}
.article-card:hover .card-image img { transform: scale(1.06); }
.card-category-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #06b6d4;
  color: white;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 1;
}
.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.card-date {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 7px;
  display: block;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.5px;
}
.card-title {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 8px;
}
.card-title a { color: #0f172a; }
.card-title a:hover { color: #0891b2; }
.card-excerpt { font-size: 13px; color: #64748b; line-height: 1.5; flex: 1; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 16px;
  margin: 20px 0 0;
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.breadcrumb a { color: #0891b2; }
.breadcrumb a:hover { color: #0e7490; }
.breadcrumb .separator { margin: 0 8px; color: #94a3b8; font-size: 11px; }

/* ===== PAGE HEADER (category pages) ===== */
.page-header {
  background: linear-gradient(135deg, #334155, #475569);
  padding: 32px 20px;
  margin-bottom: 0;
}
.page-header h1 { color: white; font-size: 30px; }
.page-header .page-desc {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  margin-top: 7px;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
}

/* ===== ARTICLE PAGE (item-page) ===== */
.item-page {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 30px;
}
.article-header h1 {
  font-size: 28px;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.2;
}
.article-date {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 22px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.5px;
}
.article-image {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 26px;
}
.article-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.article-image-mid {
  border-radius: 8px;
  overflow: hidden;
  margin: 24px 0;
}
.article-image-mid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

/* Article content elements (scoped to .item-page) */
.item-page h2 {
  font-size: 22px;
  color: #0f172a;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}
.item-page h3 {
  font-size: 18px;
  color: #334155;
  margin: 22px 0 10px;
}
.item-page p { margin-bottom: 14px; }
.item-page ul, .item-page ol {
  padding-left: 24px;
  margin: 12px 0 16px;
}
.item-page li { margin-bottom: 7px; }
.item-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.item-page thead { background: #334155; color: white; }
.item-page th {
  padding: 11px 14px;
  text-align: left;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.item-page td {
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}
.item-page tbody tr:nth-child(even) { background: #f8fafc; }
.item-page tbody tr:hover { background: #f1f5f9; }
.item-page blockquote {
  border-left: 4px solid #06b6d4;
  background: #f0f9ff;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #1e3a8a;
}
.item-page blockquote p { margin-bottom: 0; color: #1e3a8a; }
.item-page .infobox {
  background: #fef9c3;
  border: 1px solid #fde047;
  border-left: 4px solid #eab308;
  padding: 16px 20px;
  border-radius: 6px;
  margin: 20px 0;
}
.item-page .stat-block {
  background: linear-gradient(135deg, #334155, #475569);
  color: white;
  padding: 24px;
  border-radius: 8px;
  text-align: center;
  margin: 20px 0;
}
.item-page .stat-block .stat-number {
  font-family: 'Oswald', sans-serif;
  font-size: 44px;
  font-weight: 700;
  color: #06b6d4;
  line-height: 1;
}
.item-page .stat-block .stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  margin-top: 6px;
}
.item-page a { color: #0891b2; }
.item-page a:hover { color: #0e7490; }
.item-page img { border-radius: 4px; }

/* ===== ARTICLE TAGS ===== */
.article-tags {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tags-label {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
a.tag-pill {
  display: inline-block;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
a.tag-pill:hover {
  background: #06b6d4;
  color: white;
}

/* ===== TAG PAGE ===== */
.tag-page-header {
  background: linear-gradient(135deg, #334155, #06b6d4);
  padding: 28px 20px;
}
.tag-page-header h1 { color: white; font-size: 28px; }

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: rgba(255,255,255,0.78);
  padding: 44px 0 20px;
  margin-top: 40px;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.25);
}
.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 36px;
  margin-bottom: 28px;
}
.footer-brand { max-width: 340px; }
.footer-brand strong {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: white;
  display: block;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.65; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 130px;
}
.footer-nav a {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  color: rgba(255,255,255,0.68);
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.footer-nav a:hover { color: #06b6d4; }
.footer-disclaimer {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  max-width: 420px;
  line-height: 1.6;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.38);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .blog, .category-list { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 42px; }
  .hero-stats { gap: 36px; }
}

@media (max-width: 768px) {
  .page-wrapper { flex-direction: column; }
  .sidebar { width: 100%; order: 2; }
  .main-content { order: 1; }
  .hero { padding: 44px 16px; }
  .hero h1 { font-size: 32px; }
  .hero-stats { gap: 20px; }
  .hero-stat .stat-num { font-size: 32px; }
  .header-inner { gap: 12px; flex-wrap: wrap; }
  .footer-main { flex-direction: column; }
  .footer-nav { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .item-page { padding: 18px; }
  .article-header h1 { font-size: 22px; }
  .article-image img { height: 260px; }
}

@media (max-width: 640px) {
  .blog, .category-list { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .hero-stats { gap: 14px; }
  .hero-stat .stat-num { font-size: 26px; }
  .nav-toggle { display: flex; }
  .nav.closed .menu { display: none; }
  .nav.open .menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #334155;
    padding: 8px 16px 12px;
    gap: 2px;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }
  .header { position: relative; }
}
