/* ===== CSS Variables ===== */
:root {
  --accent-color: #e91e63;
  --accent-light: #f8bbd9;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f8f8;
  --bg-dark: #2c2c2c;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
  --gap: 24px;
}

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

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

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ===== Header ===== */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background: var(--bg-dark);
  color: #fff;
  padding: 8px 0;
  font-size: 14px;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lang-switch a {
  color: #ccc;
  margin: 0 8px;
}

.lang-switch a.active,
.lang-switch a:hover {
  color: var(--accent-light);
}

.header-main {
  padding: 16px 0;
}

.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 400;
  display: block;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  text-decoration: none;
}

.search-box {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.search-box input {
  border: none;
  padding: 10px 16px;
  width: 200px;
  outline: none;
}

.search-box button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-secondary) 100%);
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero h1 span {
  display: block;
  font-size: 24px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 8px;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 16px 0;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb span {
  color: var(--text-muted);
  margin: 0 8px;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 24px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.section-title span {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 12px;
}

/* ===== Card ===== */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-image {
  aspect-ratio: 16/10;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-title span {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 4px;
}

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

.card-text span {
  display: block;
  color: var(--text-muted);
  margin-top: 4px;
}

.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

/* ===== Grid Layouts ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

/* ===== Article List ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.article-item {
  display: flex;
  gap: var(--gap);
  padding: var(--gap);
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.article-item-image {
  width: 240px;
  height: 160px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.article-item-content {
  flex: 1;
}

.article-item-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.article-item-title span {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 4px;
}

.article-item-desc {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.8;
}

.article-item-desc span {
  display: block;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.pagination a:hover {
  background: var(--accent-color);
  color: #fff;
  text-decoration: none;
}

.pagination .current {
  background: var(--accent-color);
  color: #fff;
}

/* ===== Article Detail ===== */
.article-header {
  text-align: center;
  padding: 40px 0;
}

.article-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.article-header h1 span {
  display: block;
  font-size: 20px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 8px;
}

.article-meta {
  color: var(--text-muted);
  font-size: 14px;
}

.article-meta span {
  margin: 0 12px;
}

.article-featured-image {
  width: 100%;
  max-width: 800px;
  height: 400px;
  margin: 0 auto 40px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.bilingual-block {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent-color);
}

.bilingual-block p {
  margin-bottom: 12px;
  line-height: 1.8;
}

.bilingual-block p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
}

/* ===== Sidebar Section ===== */
.sidebar-section {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius);
}

.sidebar-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-section h3 span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 8px;
}

.sidebar-section ul {
  list-style: none;
}

.sidebar-section li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-section li:last-child {
  border-bottom: none;
}

.sidebar-section a {
  color: var(--text-primary);
  font-size: 14px;
}

.sidebar-section a:hover {
  color: var(--accent-color);
}

/* ===== Layout with Sidebar ===== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap);
}

/* ===== Section ===== */
.section {
  padding: 60px 0;
}

.section-gray {
  background: var(--bg-secondary);
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: 40px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  color: #aaa;
  font-size: 14px;
  line-height: 1.8;
}

.footer-links h4 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #fff;
}

.footer-links h4 span {
  font-size: 12px;
  color: #999;
  font-weight: 400;
  display: block;
  margin-top: 4px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #aaa;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

/* ===== 404 Page ===== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 0;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 20px;
}

.error-title {
  font-size: 28px;
  margin-bottom: 12px;
}

.error-title span {
  display: block;
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 8px;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.error-desc span {
  display: block;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
}

.btn:hover {
  background: #c2185b;
  text-decoration: none;
}

/* ===== Related Articles ===== */
.related-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-main .container {
    flex-wrap: wrap;
    gap: 16px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .article-item {
    flex-direction: column;
  }

  .article-item-image {
    width: 100%;
    height: 200px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-box input {
    width: 140px;
  }
}
