:root {
  --primary: #0066cc;
  --primary-dark: #004a99;
  --primary-light: #e8f2ff;
  --bg: #f5f7fa;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #555;
  --text-muted: #888;
  --border: #e0e4ea;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* Header */
.header {
  background: linear-gradient(135deg, #0055aa 0%, #0077dd 50%, #0099ee 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.header-logo svg {
  width: 32px;
  height: 32px;
}

.header-nav {
  display: flex;
  gap: 24px;
}

.header-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
  color: white;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0055aa 0%, #0077dd 50%, #0099ee 100%);
  color: white;
  text-align: center;
  padding: 48px 24px 56px;
}

.hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 28px;
}

/* Search */
.search-wrap {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  background: white;
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  outline: none;
  transition: box-shadow var(--transition);
}

.search-wrap input:focus {
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.search-wrap input::placeholder {
  color: #aaa;
}

.search-wrap svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #999;
}

/* Main */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Categories grid */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
}

.category-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.category-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.category-card .icon.ski { background: #e3f0ff; }
.category-card .icon.bike { background: #e8f8e8; }

.category-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.category-sections {
  list-style: none;
}

.category-sections li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.category-sections li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
}

.category-sections li a:hover {
  color: var(--primary);
}

.category-sections li a .count {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

.category-sections li a::after {
  content: "\203A";
  font-size: 18px;
  color: var(--text-muted);
  margin-left: 8px;
}

/* Section view */
.section-header {
  margin-bottom: 24px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #ccc; }

.section-header h1 {
  font-size: 26px;
  font-weight: 700;
}

.article-list {
  list-style: none;
}

.article-list li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: box-shadow var(--transition);
}

.article-list li:hover {
  box-shadow: var(--shadow);
}

.article-list li a {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  gap: 12px;
}

.article-list li a svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.article-list li a:hover {
  color: var(--primary);
}

/* Article view */
.article-container {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 780px;
}

.article-container h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.3;
}

.article-body h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 20px 0 10px;
}

.article-body p {
  margin-bottom: 14px;
  color: #333;
}

.article-body ul, .article-body ol {
  margin: 0 0 16px 24px;
}

.article-body li {
  margin-bottom: 6px;
  color: #333;
}

.article-body li ul, .article-body li ol {
  margin-top: 6px;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body strong {
  font-weight: 600;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-body figure {
  margin: 16px 0;
  text-align: center;
}

.article-body figure img {
  max-width: 340px;
}

.article-body .wysiwyg-text-align-center {
  text-align: center;
}

.article-body .wysiwyg-text-align-left {
  text-align: left;
}

.article-body h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 24px 0 12px;
}

.article-body h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 10px;
}

/* Search results */
.search-results {
  max-width: 780px;
}

.search-results h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.search-results .no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.search-results .result-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow var(--transition);
}

.search-results .result-item:hover {
  box-shadow: var(--shadow);
}

.search-results .result-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--primary);
}

.search-results .result-item .meta {
  font-size: 12px;
  color: var(--text-muted);
}

.search-results .result-item .snippet {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 500;
}

.back-link:hover { color: var(--primary); }

/* Footer */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--primary); }

/* Contact banner */
.contact-banner {
  background: var(--primary-light);
  border: 1px solid #c8ddf5;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 40px;
  text-align: center;
}

.contact-banner h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.contact-banner p {
  font-size: 14px;
  color: var(--text-secondary);
}

.contact-banner a.btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition);
}

.contact-banner a.btn:hover {
  background: var(--primary-dark);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .hero { padding: 32px 16px 40px; }
  .hero h1 { font-size: 24px; }
  .main { padding: 24px 16px 60px; }
  .categories { grid-template-columns: 1fr; }
  .article-container { padding: 24px 20px; }
  .header-nav { display: none; }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}
