/*
Theme Name: ArtemBolnica2 MedPortal
Description: High-performance Medical Equipment Catalog & SEO Portal Theme
Version: 2.0.0
Author: Antigravity
*/

:root {
  --bg-primary: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #151f32;
  --bg-card-hover: #1e293b;
  --border-color: #1e293b;
  --border-accent: #0ea5e9;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.25);
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.15s, opacity 0.15s;
}

a:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}

.brand-icon {
  font-size: 28px;
  background: rgba(2, 132, 199, 0.15);
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.main-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-decoration: none !important;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: var(--bg-card);
}

/* Hero */
.hero {
  padding: 64px 0 48px;
  background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.15), transparent 70%);
  border-bottom: 1px solid var(--border-color);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: #ffffff;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 840px;
  margin: 0 auto 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
}

.stat-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent-cyan);
  display: block;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Categories Section */
.section-title-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 48px 0 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.cat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  text-decoration: none !important;
}

.cat-card:hover {
  background: var(--bg-card);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.cat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cat-card-icon {
  font-size: 24px;
}

.cat-card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(2, 132, 199, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.cat-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.cat-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: auto;
}

/* Complete 3000-link Accordions (Level 2 Links) */
.full-catalog-accordion {
  margin-top: 40px;
}

.catalog-cat-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
}

.catalog-cat-block summary {
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  user-select: none;
  transition: background 0.2s;
}

.catalog-cat-block summary:hover {
  background: var(--bg-card-hover);
}

.cat-count-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px 16px;
  padding: 20px 24px;
}

.catalog-link-item {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalog-link-item:hover {
  color: var(--accent-cyan);
}

.final-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  flex-shrink: 0;
  display: inline-block;
}

/* Article Shell */
.article-shell {
  max-width: 980px;
  margin: 36px auto 60px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
}

.breadcrumbs {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.article-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.article-header h1 {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.25;
  color: #ffffff;
  margin-top: 12px;
}

.article-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-verified {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-category {
  background: rgba(2, 132, 199, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.article-content {
  font-size: 16px;
  line-height: 1.75;
  color: #cbd5e1;
}

.article-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 28px 0 12px;
}

.article-content p {
  margin-bottom: 18px;
}

.article-content ul, .article-content ol {
  margin: 0 0 20px 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.med-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.med-specs-table th {
  background: #1e293b;
  color: #f8fafc;
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
}

.med-specs-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  color: #cbd5e1;
}

.med-specs-table tr:last-child td {
  border-bottom: none;
}

/* Cross linking */
.related-box {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.related-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.2s;
  display: block;
}

.related-card:hover {
  background: var(--bg-card-hover);
  color: var(--accent-cyan);
  border-color: var(--border-accent);
}

/* Footer */
.site-footer {
  background: #060911;
  border-top: 1px solid var(--border-color);
  padding: 48px 0 32px;
  margin-top: 64px;
  color: var(--text-dim);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.sape-container {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 28px; }
  .article-shell { padding: 24px; margin: 16px; }
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 12px; }
  .links-grid { grid-template-columns: 1fr; }
}
