:root {
  --cw-navy: #0b192c;
  --cw-navy-2: #122642;
  --cw-primary: #0284c7;
  --cw-primary-hover: #0369a1;
  --cw-accent: #0ea5e9;
  --cw-bg: #f8fafc;
  --cw-surface: #ffffff;
  --cw-text: #1e293b;
  --cw-muted: #64748b;
  --cw-border: #e2e8f0;
  --cw-radius: 12px;
  --cw-shadow: 0 4px 20px rgba(11, 25, 44, 0.06);
  --cw-shadow-lg: 0 12px 32px rgba(11, 25, 44, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--cw-text);
  background: var(--cw-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cw-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--cw-primary-hover); }
img { max-width: 100%; height: auto; display: block; }

.cw-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.cw-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 25, 44, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cw-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}
.cw-brand { flex-shrink: 0; }
.cw-logo-link {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; font-size: 21px; white-space: nowrap;
}
.cw-logo-link:hover { color: #fff; }
.cw-logo-img, .custom-logo { max-height: 38px; width: auto; display: block; }
.cw-logo-mark {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 18px;
}
.cw-logo-text { display: inline-flex; align-items: baseline; white-space: nowrap; }
.cw-logo-text small { font-size: 12px; color: #94a3b8; font-weight: 500; margin-left: 6px; }

.cw-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.cw-nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 4px;
}
.cw-nav-list > li { position: relative; }
.cw-nav-list > li > a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; color: #e2e8f0; font-size: 14px; font-weight: 500;
  border-radius: 8px; white-space: nowrap;
}
.cw-nav-list > li > a:hover,
.cw-nav-list > li:hover > a,
.cw-nav-list > li.current-menu-item > a {
  background: rgba(255, 255, 255, 0.1); color: #fff;
}
.cw-nav-list > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.75;
  transition: transform .2s ease;
}
.cw-nav-list > li.menu-item-has-children:hover > a::after {
  transform: rotate(225deg) translateY(-1px);
}

/* Dropdown Sub-Menus */
.cw-nav-list .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  min-width: 240px;
  max-height: 72vh;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: #0f213a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}
.cw-nav-list > li:hover > .sub-menu,
.cw-nav-list > li:focus-within > .sub-menu {
  display: block;
}
.cw-nav-list .sub-menu.cw-mega-2col {
  min-width: 460px;
}
.cw-nav-list > li:hover > .sub-menu.cw-mega-2col,
.cw-nav-list > li:focus-within > .sub-menu.cw-mega-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
}
.cw-nav-list .sub-menu li { margin: 0; padding: 0; }
.cw-nav-list .sub-menu a {
  display: block;
  padding: 8px 12px;
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 7px;
  line-height: 1.4;
  transition: background .15s ease, color .15s ease;
}
.cw-nav-list .sub-menu a:hover,
.cw-nav-list .sub-menu li.current-menu-item > a {
  background: rgba(14, 165, 233, 0.16);
  color: #ffffff;
}

.cw-header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Buttons */
.cw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 8px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: all .2s ease;
  white-space: nowrap; flex-shrink: 0;
}
.cw-btn-sm { padding: 8px 16px; font-size: 13px; }
.cw-btn-primary { background: var(--cw-primary); color: #fff; }
.cw-btn-primary:hover { background: var(--cw-primary-hover); color: #fff; transform: translateY(-1px); }
.cw-btn-outline { background: transparent; border-color: var(--cw-border); color: var(--cw-text); }
.cw-btn-outline:hover { border-color: var(--cw-primary); color: var(--cw-primary); }

/* Mobile Toggle */
.cw-mobile-toggle {
  display: none; flex-direction: column; gap: 5px; background: transparent; border: 0; padding: 6px; cursor: pointer;
}
.cw-mobile-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; }
.cw-mobile-menu { background: var(--cw-navy-2); border-top: 1px solid rgba(255,255,255,0.08); padding: 12px 0; }
.cw-mobile-nav-list { list-style: none; margin: 0; padding: 0; max-height: 75vh; overflow-y: auto; }
.cw-mobile-nav-list li { position: relative; }
.cw-mobile-nav-list a { display: block; padding: 11px 0; color: #e2e8f0; font-size: 14.5px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cw-mobile-nav-list .sub-menu {
  display: none; list-style: none; margin: 0; padding: 4px 0 8px 16px;
  background: rgba(0, 0, 0, 0.15); border-radius: 8px;
}
.cw-mobile-nav-list li.is-open > .sub-menu { display: block; }
.cw-mobile-nav-list .sub-menu a { font-size: 13.5px; color: #cbd5e1; padding: 8px 0; }
.cw-mobile-sub-toggle {
  position: absolute; right: 0; top: 6px; width: 34px; height: 34px;
  background: rgba(255,255,255,0.08); border: 0; border-radius: 6px;
  color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}

/* Hero */
.cw-hero {
  background: radial-gradient(circle at top right, #1e3a5f, #0b192c 65%);
  color: #fff;
  padding: 84px 0 110px;
  text-align: center;
}
.cw-hero-pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(14, 165, 233, 0.16); color: #7dd3fc; font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.cw-hero-title { margin: 0 0 14px; font-size: clamp(32px, 5vw, 48px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.cw-hero-subtitle { margin: 0 auto 32px; max-width: 640px; color: #cbd5e1; font-size: 17px; }

.cw-search-box { max-width: 680px; margin: 0 auto; position: relative; }
.cw-search-input-wrap {
  display: flex; align-items: center; background: #fff; border-radius: 12px; padding: 6px 6px 6px 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.cw-search-icon { color: var(--cw-muted); flex-shrink: 0; }
.cw-search-input-wrap input {
  flex: 1; border: 0; outline: 0; padding: 12px; font-size: 15px; color: var(--cw-text); background: transparent;
}
.cw-live-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 50;
  background: #fff; border-radius: 12px; box-shadow: var(--cw-shadow-lg); border: 1px solid var(--cw-border);
  text-align: left; overflow: hidden;
}
.cw-live-item {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 16px;
  border-bottom: 1px solid var(--cw-border); color: var(--cw-text); font-size: 14px;
}
.cw-live-item:last-child { border-bottom: 0; }
.cw-live-item:hover { background: #f1f5f9; }
.cw-live-cat { font-size: 12px; color: var(--cw-primary); font-weight: 600; }

/* Sections & Grids */
.cw-section { padding: 72px 0; }
.cw-categories-overlap { padding-top: 0; margin-top: -56px; position: relative; z-index: 10; }
.cw-section-head { text-align: center; margin-bottom: 40px; }
.cw-section-head h2 { margin: 0 0 8px; font-size: 28px; font-weight: 800; color: var(--cw-navy); }
.cw-section-head p { margin: 0; color: var(--cw-muted); }
.cw-section-head-light h2 { color: #fff; }
.cw-section-head-light p { color: #cbd5e1; }

.cw-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cw-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Feature Category Cards */
.cw-feature-card {
  background: var(--cw-surface); border: 1px solid var(--cw-border); border-radius: var(--cw-radius);
  padding: 32px 24px; text-align: center; box-shadow: var(--cw-shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.cw-feature-card:hover { transform: translateY(-4px); box-shadow: var(--cw-shadow-lg); }
.cw-feature-icon {
  width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.cw-accent-emerald .cw-feature-icon { background: linear-gradient(135deg, #10b981, #059669); }
.cw-accent-sky .cw-feature-icon { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.cw-accent-indigo .cw-feature-icon { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.cw-feature-card h3 { margin: 0 0 10px; font-size: 19px; color: var(--cw-navy); }
.cw-feature-card p { margin: 0 0 20px; color: var(--cw-muted); font-size: 14px; }

/* Dark Band */
.cw-section-dark { background: linear-gradient(180deg, #0b192c, #122642); color: #fff; }
.cw-dark-card {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--cw-radius); overflow: hidden; display: flex; flex-direction: column;
}
.cw-dark-card-thumb img { width: 100%; height: 150px; object-fit: cover; }
.cw-dark-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.cw-dark-card h3 { margin: 0 0 10px; font-size: 16px; line-height: 1.4; }
.cw-dark-card h3 a { color: #fff; }
.cw-dark-card p { margin: 0 0 14px; font-size: 13px; color: #cbd5e1; flex: 1; }
.cw-dark-link { font-size: 13px; font-weight: 600; color: #38bdf8; }

/* Post Cards */
.cw-card {
  background: var(--cw-surface); border: 1px solid var(--cw-border); border-radius: var(--cw-radius);
  overflow: hidden; box-shadow: var(--cw-shadow); display: flex; flex-direction: column;
}
.cw-card-media img { width: 100%; height: 200px; object-fit: cover; }
.cw-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.cw-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--cw-muted); margin-bottom: 10px; }
.cw-badge {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  background: #e0f2fe; color: #0369a1; font-weight: 600; font-size: 12px;
}
.cw-card-title { margin: 0 0 10px; font-size: 18px; line-height: 1.35; }
.cw-card-title a { color: var(--cw-navy); }
.cw-card-title a:hover { color: var(--cw-primary); }
.cw-card-excerpt { font-size: 14px; color: var(--cw-muted); flex: 1; margin-bottom: 16px; }
.cw-card-excerpt p { margin: 0; }
.cw-read-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }

/* Inner Pages & Layout */
.cw-page-banner { background: var(--cw-navy); color: #fff; padding: 48px 0; }
.cw-page-title { margin: 0 0 10px; font-size: clamp(24px, 3.5vw, 34px); line-height: 1.25; }
.cw-page-desc, .cw-single-meta { color: #cbd5e1; font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.cw-breadcrumb { font-size: 13px; color: #94a3b8; margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.cw-breadcrumb a { color: #7dd3fc; }

.cw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; padding: 48px 20px; }
.cw-layout-full { padding: 48px 20px; }
.cw-post-list { display: grid; gap: 24px; }

/* Single Article */
.cw-single-article {
  background: var(--cw-surface); border: 1px solid var(--cw-border); border-radius: var(--cw-radius);
  padding: 32px; box-shadow: var(--cw-shadow);
}
.cw-promo-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(135deg, #0b192c, #16325b); color: #fff;
  padding: 20px 24px; border-radius: 10px; margin-bottom: 24px;
}
.cw-promo-text strong { display: block; font-size: 17px; margin-bottom: 4px; }
.cw-promo-text span { font-size: 13px; color: #cbd5e1; }
.cw-single-thumb { margin-bottom: 24px; border-radius: 10px; overflow: hidden; }
.cw-entry-content { font-size: 16px; line-height: 1.75; }
.cw-entry-content h2, .cw-entry-content h3 { color: var(--cw-navy); margin-top: 28px; }
.cw-entry-content pre, .cw-entry-content code {
  font-family: "JetBrains Mono", Consolas, Monaco, monospace; font-size: 14px;
}
.cw-entry-content pre {
  background: #0f172a; color: #e2e8f0; padding: 18px; border-radius: 10px; overflow-x: auto;
}
.cw-entry-content code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; color: #0f172a; }
.cw-entry-content pre code { background: transparent; color: inherit; padding: 0; }
.cw-tags { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--cw-border); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cw-tags a { background: #f1f5f9; color: var(--cw-text); padding: 4px 10px; border-radius: 6px; font-size: 13px; }

/* Sidebar & Widgets */
.cw-widget {
  background: var(--cw-surface); border: 1px solid var(--cw-border); border-radius: var(--cw-radius);
  padding: 22px; margin-bottom: 24px; box-shadow: var(--cw-shadow);
}
.cw-widget-title { margin: 0 0 14px; font-size: 17px; color: var(--cw-navy); padding-bottom: 10px; border-bottom: 2px solid #e0f2fe; }
.cw-widget-list { list-style: none; margin: 0; padding: 0; }
.cw-widget-list li { padding: 8px 0; border-bottom: 1px solid var(--cw-border); font-size: 14px; }
.cw-widget-list li:last-child { border-bottom: 0; }
.cw-inline-search { display: flex; gap: 8px; }
.cw-inline-search input { flex: 1; padding: 9px 12px; border: 1px solid var(--cw-border); border-radius: 8px; }

/* KB Box */
.cw-kb-box {
  background: var(--cw-surface); border: 1px solid var(--cw-border); border-radius: var(--cw-radius);
  padding: 24px; box-shadow: var(--cw-shadow);
}
.cw-kb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cw-kb-head h3 { margin: 0; font-size: 18px; }

/* Pagination & Comments */
.cw-pagination { margin-top: 32px; display: flex; justify-content: center; gap: 8px; }
.cw-pagination .page-numbers { padding: 8px 14px; background: #fff; border: 1px solid var(--cw-border); border-radius: 8px; font-size: 14px; }
.cw-pagination .page-numbers.current { background: var(--cw-primary); color: #fff; border-color: var(--cw-primary); }
.cw-comments { margin-top: 32px; background: #fff; border: 1px solid var(--cw-border); border-radius: var(--cw-radius); padding: 28px; }
.cw-comment-list { list-style: none; padding: 0; }
.cw-comments input[type="text"], .cw-comments input[type="email"], .cw-comments textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--cw-border); border-radius: 8px; margin-top: 6px;
}

/* Empty & 404 */
.cw-empty-state { text-align: center; background: #fff; padding: 56px 24px; border-radius: var(--cw-radius); border: 1px solid var(--cw-border); }
.cw-404-code { font-size: 64px; font-weight: 800; color: var(--cw-primary); display: block; line-height: 1; margin-bottom: 12px; }

/* Footer */
.cw-footer { background: var(--cw-navy); color: #cbd5e1; margin-top: 40px; }
.cw-footer-top { padding: 56px 0 40px; }
.cw-footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.cw-footer-title { color: #fff; margin: 0 0 16px; font-size: 16px; }
.cw-footer-desc { font-size: 14px; color: #94a3b8; }
.cw-footer .cw-widget-list li { border-color: rgba(255,255,255,0.08); }
.cw-footer .cw-widget-list a { color: #cbd5e1; }
.cw-footer .cw-widget-list a:hover { color: #38bdf8; }
.cw-footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; font-size: 13px; }
.cw-footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.cw-copyright { margin: 0; }
.cw-footer-nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.cw-footer-nav-list a { color: #94a3b8; }

/* Back to top */
.cw-back-to-top {
  position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 10px;
  background: var(--cw-primary); color: #fff; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--cw-shadow-lg);
}

/* Responsive */
@media (max-width: 992px) {
  .cw-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cw-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cw-layout { grid-template-columns: 1fr; }
  .cw-footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .cw-nav { display: none; }
  .cw-mobile-toggle { display: flex; }
}
@media (max-width: 768px) {
  .cw-grid-3, .cw-grid-4, .cw-footer-grid { grid-template-columns: 1fr; }
  .cw-promo-banner { flex-direction: column; align-items: flex-start; }
  .cw-single-article { padding: 20px; }
}
