/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif; font-size: 16px; color: #212121; background: #ffffff; line-height: 1.6; }

/* Header */
header { background: #226E93; color: #ffffff; padding: 0; }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 18px 24px; }
.site-title { color: #ffffff; text-decoration: none; font-size: 1.6rem; font-weight: 700; letter-spacing: 0.5px; }

/* Nav */
nav { background: #1a5a7a; }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; padding: 0 24px; }
.nav-item { position: relative; }
.nav-link { display: block; color: #e0f0ff; text-decoration: none; padding: 12px 16px; font-size: 0.95rem; font-weight: 600; }
.nav-link:hover { background: #226E93; color: #ffffff; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; background: #1a5a7a; min-width: 220px; z-index: 100; box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
.nav-item:hover .dropdown { display: block; }
.dropdown a { display: block; color: #cce8ff; text-decoration: none; padding: 10px 16px; font-size: 0.9rem; border-top: 1px solid #226E93; }
.dropdown a:hover { background: #226E93; color: #ffffff; }

/* Main content */
.container { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
h1 { font-size: 2rem; font-weight: 700; color: #212121; margin-bottom: 20px; }
h2 { font-size: 1.5rem; font-weight: 700; color: #226E93; margin-top: 32px; margin-bottom: 12px; }
h3 { font-size: 1.2rem; font-weight: 600; color: #333; margin-top: 24px; margin-bottom: 8px; }
p { margin-bottom: 16px; }
a { color: #226E93; }
a:hover { color: #1a5a7a; }
ul, ol { margin: 0 0 16px 24px; }
li { margin-bottom: 4px; }

/* Code */
code { background: #f5f5f5; padding: 2px 6px; border-radius: 3px; font-family: 'Courier New', monospace; font-size: 0.9em; color: #c62828; }
pre { background: #f5f5f5; padding: 20px; border-radius: 4px; overflow-x: auto; margin: 16px 0; border-left: 4px solid #226E93; }
pre code { background: none; padding: 0; color: #212121; font-size: 0.88em; line-height: 1.5; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 16px 0; }
th { background: #226E93; color: #ffffff; padding: 10px 14px; text-align: left; }
td { padding: 9px 14px; border-bottom: 1px solid #eee; }
tr:hover td { background: #f0f7ff; }

/* Home two-column layout */
.home-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.home-content {
  flex: 1 1 0;
  min-width: 0;
  font-size: 1.1rem;
}

/* News sidebar */
.news-panel {
  flex: 0 0 280px;
  width: 280px;
  position: sticky;
  top: 20px;
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid #c8dcea;
  border-radius: 4px;
}
.news-panel-title {
  position: sticky;
  top: 0;
  background: #226E93;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 8px 12px;
  z-index: 1;
}
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-list li {
  padding: 8px 12px;
  border-bottom: 1px solid #eef3f7;
}
.news-list li:last-child { border-bottom: none; }
.news-list li a {
  display: block;
  color: #226E93;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 3px;
}
.news-list li a:hover { color: #1a5a7a; text-decoration: underline; }
.news-meta {
  display: block;
  font-size: 0.72rem;
  color: #999;
}
.news-source {
  color: #1a5a7a;
  font-weight: 600;
}

/* Page list */
.page-list { list-style: none; margin: 0; padding: 0; }
.page-list li { border-bottom: 1px solid #eee; }
.page-list li a { display: block; padding: 10px 0; color: #226E93; text-decoration: none; }
.page-list li a:hover { color: #1a5a7a; text-decoration: underline; }

/* Footer */
footer { background: #1a5a7a; color: #cce8ff; padding: 24px; text-align: center; margin-top: 40px; }
footer a { color: #a8d8f0; text-decoration: none; }
footer a:hover { color: #ffffff; }
footer p { margin: 4px 0; font-size: 0.9rem; }

/* Visitor ticker */
.ticker-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #0d3547;
  color: #7dd4f8;
  overflow: hidden;
  white-space: nowrap;
  z-index: 9999;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  padding: 5px 0;
  border-top: 1px solid #226E93;
}
.ticker-inner {
  display: inline-block;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-text { display: inline; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* push page content above fixed ticker */
body { padding-bottom: 32px; }

/* Responsive */
@media (max-width: 768px) {
  .nav-inner { flex-direction: column; }
  .dropdown { position: static; box-shadow: none; }
  .home-layout { flex-direction: column; }
  .news-panel { flex: none; width: 100%; position: static; max-height: 320px; }
}
