:root {
  --ham-green: #1a5c2a;
  --ham-green-2: #2d8a4e;
  --ham-green-3: #3dab66;
  --ham-gold: #f0c040;
  --ham-dark: #0f1923;
  --ham-dark-2: #162030;
  --ham-dark-3: #1e2d3d;
}

body {
  font-family: 'Sarabun', sans-serif;
  background-color: #f4f6f9;
  color: #2c3e50;
  font-size: 16px;
}

/* Navbar */
.bg-ham {
  background: linear-gradient(135deg, #0d1f0d 0%, #1a3a1a 100%) !important;
  border-bottom: 2px solid var(--ham-gold);
}

.text-ham-gold { color: var(--ham-gold) !important; }
.bg-ham-green { background-color: var(--ham-green) !important; }
.bg-ham-dark-2 { background-color: var(--ham-dark-2) !important; }

.btn-ham-gold {
  background-color: var(--ham-gold);
  color: #1a1a00;
  font-weight: 600;
  border: none;
  transition: all 0.2s;
}
.btn-ham-gold:hover {
  background-color: #d4aa30;
  color: #0d0d00;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240, 192, 64, 0.3);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, #0d1f0d 0%, #1a3a1a 50%, #0d1f0d 100%);
  color: white;
  padding: 60px 0;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f0c040' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section h1 { font-size: 2.5rem; font-weight: 700; }
.hero-callsign {
  font-size: 1.1rem;
  background: rgba(240,192,64,0.15);
  border: 1px solid rgba(240,192,64,0.3);
  border-radius: 8px;
  padding: 8px 16px;
  display: inline-block;
  color: var(--ham-gold);
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}

/* Cards */
.article-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e8edf2;
  transition: all 0.3s;
  overflow: hidden;
  height: 100%;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  border-color: var(--ham-green-3);
}
.article-card .card-img-top {
  height: 180px;
  object-fit: cover;
}
.article-card .card-placeholder {
  height: 180px;
  background: linear-gradient(135deg, var(--ham-green) 0%, var(--ham-green-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-card .category-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(26,92,42,0.1);
  color: var(--ham-green);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.article-card h5 a { color: #2c3e50; text-decoration: none; font-weight: 600; }
.article-card h5 a:hover { color: var(--ham-green); }
.article-card .meta { font-size: 13px; color: #7f8c8d; }

/* Section headings */
.section-title {
  font-weight: 700;
  color: var(--ham-green);
  border-left: 4px solid var(--ham-gold);
  padding-left: 12px;
  margin-bottom: 24px;
}

/* Sidebar */
.sidebar-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e8edf2;
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-card h6 {
  font-weight: 700;
  color: var(--ham-green);
  border-bottom: 2px solid var(--ham-gold);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.sidebar-list a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #2c3e50;
  text-decoration: none;
  font-size: 14px;
}
.sidebar-list a:hover { color: var(--ham-green); }
.sidebar-list a img {
  width: 48px; height: 36px; object-fit: cover; border-radius: 4px; flex-shrink: 0;
}

/* Category cards */
.cat-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e8edf2;
  padding: 20px;
  text-align: center;
  transition: all 0.3s;
  text-decoration: none;
  color: #2c3e50;
  display: block;
  height: 100%;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-color: var(--ham-green-3);
  color: var(--ham-green);
}
.cat-card .cat-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--ham-green), var(--ham-green-2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 22px; color: white;
}
.cat-card .cat-count {
  font-size: 12px; color: #7f8c8d; margin-top: 4px;
}

/* Article content */
.article-content {
  background: white;
  border-radius: 12px;
  padding: 32px;
  line-height: 1.9;
  font-size: 17px;
}
.article-content img { max-width: 100%; border-radius: 8px; }
.article-content h2, .article-content h3 { color: var(--ham-green); margin-top: 32px; }
.article-content blockquote {
  border-left: 4px solid var(--ham-gold);
  background: #fffdf0;
  padding: 12px 20px;
  border-radius: 0 8px 8px 0;
  color: #7f6000;
}

/* Profile */
.profile-header {
  background: linear-gradient(135deg, #0d1f0d 0%, #1a3a1a 100%);
  border-radius: 12px;
  padding: 32px;
  color: white;
}
.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ham-gold);
}
.profile-avatar-placeholder {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(240,192,64,0.2);
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--ham-gold);
  font-size: 40px;
  color: var(--ham-gold);
}
.callsign-badge {
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ham-gold);
  letter-spacing: 2px;
}

/* Login/Register */
.auth-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  max-width: 460px;
  margin: 60px auto;
}
.auth-card .auth-logo { text-align: center; margin-bottom: 28px; }
.auth-card .auth-logo i { font-size: 48px; color: var(--ham-green); }

/* Form controls */
.form-control:focus, .form-select:focus {
  border-color: var(--ham-green-3);
  box-shadow: 0 0 0 3px rgba(61,171,102,0.15);
}
.btn-ham {
  background: linear-gradient(135deg, var(--ham-green), var(--ham-green-2));
  color: white;
  border: none;
  font-weight: 600;
}
.btn-ham:hover {
  background: linear-gradient(135deg, var(--ham-green-2), var(--ham-green-3));
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26,92,42,0.3);
}

/* Stats */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border-left: 4px solid var(--ham-green);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.stat-card.gold { border-left-color: var(--ham-gold); }
.stat-card.danger { border-left-color: #e74c3c; }
.stat-card.info { border-left-color: #3498db; }
.stat-card h2 { font-size: 2.2rem; font-weight: 700; color: var(--ham-green); margin: 0; }
.stat-card.gold h2 { color: #d4a017; }

/* Admin */
.admin-table th { background: #f8f9fa; font-weight: 600; font-size: 13px; color: #555; }
.admin-table td { vertical-align: middle; font-size: 14px; }

/* Footer */
.footer-ham {
  background: #0d1117;
  color: #8b9eb0;
  border-top: 2px solid var(--ham-gold);
}
.footer-link {
  color: #8b9eb0;
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 3px 0;
}
.footer-link:hover { color: var(--ham-gold); }

/* Wave animation badge */
.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(240,192,64,0.1);
  border: 1px solid rgba(240,192,64,0.3);
  color: var(--ham-gold);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.signal-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ham-gold);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section h1 { font-size: 1.8rem; }
  .article-content { padding: 20px; }
  .auth-card { margin: 20px; padding: 24px; }
}
