/* ===== Reset & Custom Properties ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f4f0;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #6b6963;
  --text-muted: #9e9a91;
  --border: #e5e3dd;
  --border-light: #eeedea;
  --teal: #0f6e56;
  --teal-dark: #0a5543;
  --teal-light: #e8f5f0;
  --teal-glow: rgba(15, 110, 86, 0.12);
  --accent-warm: #f0e6d3;
  --accent-hot: #e85d3a;
  --font-display: 'Inter', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 16px 48px rgba(0,0,0,0.06);
  --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Header ===== */
.site-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 1px;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.logo:hover { opacity: 0.7; }

.logo-ai {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
}
.logo-news {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--teal);
  letter-spacing: -0.04em;
}
.logo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-hot);
  border-radius: 50%;
  margin-left: 2px;
  margin-bottom: 2px;
  vertical-align: baseline;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
}

.nav-cat {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-cat:hover {
  background: var(--teal-light);
  color: var(--teal);
}
.nav-cat.active {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 2px 8px var(--teal-glow);
}

/* Lang Switch */
.header-actions {
  display: flex;
  gap: 2px;
  margin-left: auto;
  background: var(--bg);
  border-radius: 10px;
  padding: 3px;
}

.lang-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all var(--transition);
  letter-spacing: 0.03em;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}
.mobile-menu-btn svg { width: 22px; height: 22px; }

/* ===== Main ===== */
.main-content {
  min-height: calc(100vh - 68px - 80px);
  padding: 2.5rem 0 4rem;
}

/* ===== Hero ===== */
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-sub {
  color: var(--teal);
  display: block;
}

.hero-desc {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.6;
}

.hero-stats {
  flex-shrink: 0;
  display: flex;
  gap: 1.5rem;
}

.stat-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  min-width: 100px;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
  display: block;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.filter-active {
  background: var(--teal);
  color: #fff;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
}

.filter-clear {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition);
}
.filter-clear:hover { background: var(--border-light); color: var(--accent-hot); }

/* ===== Articles Grid ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}

.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--teal-glow);
}

.article-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-card:hover .article-thumb img {
  transform: scale(1.06);
}

.article-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(0,0,0,0.15));
  pointer-events: none;
}

.article-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 110, 86, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 1;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.play-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--teal);
  margin-left: 2px;
}

.article-card:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.article-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.article-title a { transition: color var(--transition); }
.article-title a:hover { color: var(--teal); }

.article-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.article-meta .dot {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
}

.read-more {
  margin-left: auto;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.read-more:hover { gap: 8px; }

/* ===== Article Detail ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.article-header { margin-bottom: 2rem; }

.article-cats { margin-bottom: 0.75rem; }

.cat-tag {
  background: var(--teal-light);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
}

.article-full-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.article-full-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.lang-switch-inline {
  display: flex;
  gap: 4px;
  margin-left: auto;
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
}

.lang-switch-inline a {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.lang-switch-inline a:hover { color: var(--text); }
.lang-switch-inline a.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Video */
.video-wrapper {
  position: relative;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-wrapper iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

.video-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Summary */
.summary-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.summary-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.summary-content h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

.summary-content h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.4rem;
  color: var(--text);
}

.summary-content p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.summary-content ul, .summary-content ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.summary-content li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

/* Expert Hint */
.expert-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 1rem 1.25rem;
  background: var(--accent-warm);
  border-radius: var(--radius);
  border: 1px solid #e5d9c4;
}
.expert-hint a {
  color: var(--teal);
  font-weight: 600;
  transition: color var(--transition);
}
.expert-hint a:hover { color: var(--teal-dark); }

/* ===== Sidebar ===== */
.article-sidebar {
  position: sticky;
  top: 84px;
}

.sidebar-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.sidebar-block h3 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.related-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition);
}
.related-item:last-child { border-bottom: none; }
.related-item:hover { padding-left: 4px; }

.related-item img {
  width: 64px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.related-item span {
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text);
  font-weight: 500;
}
.related-item:hover span { color: var(--teal); }

.sidebar-cat {
  display: block;
  padding: 9px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.sidebar-cat:last-child { border-bottom: none; }
.sidebar-cat:hover { color: var(--teal); padding-left: 6px; }

/* ===== Legal Pages ===== */
.legal-page {
  max-width: 720px;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
}

.legal-page p, .legal-page li {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.legal-page ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.legal-page hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.legal-page a { color: var(--teal); text-decoration: underline; }
.legal-date { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.legal-note { font-size: 0.82rem; color: var(--text-muted); font-style: italic; }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand { display: flex; align-items: baseline; gap: 1px; }
.footer-brand .tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 1rem;
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--teal); }

/* ===== Empty State ===== */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state p { font-size: 1.1rem; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-card {
  animation: fadeInUp 0.5s ease both;
}

.article-card:nth-child(1) { animation-delay: 0.05s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.15s; }
.article-card:nth-child(4) { animation-delay: 0.2s; }
.article-card:nth-child(5) { animation-delay: 0.25s; }
.article-card:nth-child(6) { animation-delay: 0.3s; }

.hero { animation: fadeInUp 0.6s ease both; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}

@media (max-width: 768px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .hero-stats { align-self: flex-start; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    z-index: 99;
    animation: fadeInUp 0.2s ease;
  }
  .mobile-menu-btn { display: block; }
  .header-inner { gap: 1rem; }
  .articles-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .article-body { padding: 1rem 1.25rem 1.25rem; }
  .summary-block { padding: 1.25rem; }
  .hero h1 { font-size: 2rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
