@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --primary:      #0A2463;
  --secondary:    #3E92CC;
  --accent:       #D8315B;
  --teal:         #00B4D8;
  --text:         #1E1E1E;
  --text-muted:   #666;
  --bg:           #F5F5F5;
  --white:        #ffffff;
  --shadow:       rgba(10, 36, 99, 0.08);
  --shadow-hover: rgba(10, 36, 99, 0.15);
  --radius:       12px;
  --article-width: 740px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

/* ── Header ── */

.site-header {
  background: var(--white);
  box-shadow: 0 2px 8px var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--secondary); }

.lang-switch {
  padding: 6px 14px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary) !important;
}

/* ── Main ── */

.main {
  padding-top: 76px;
  min-height: calc(100vh - 180px);
}

/* ── Blog Hero ── */

.blog-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 56px 0 52px;
  text-align: center;
  position: relative;
}

.blog-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent);
}

.blog-hero h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 10px;
}

.blog-hero p {
  font-size: 18px;
  opacity: 0.88;
}

/* ── Posts Grid ── */

.posts-section {
  padding: 56px 0 80px;
}

.section-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 14px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* ── Post Card ── */

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow);
  border-top: 4px solid var(--primary);
  transition: transform 0.25s, box-shadow 0.25s;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-hover);
}

.post-card-inner {
  padding: 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-card-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.post-card-title a:hover { color: var(--secondary); }

.post-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 20px;
}

.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid #E8E8E8;
  padding-top: 14px;
  margin-top: auto;
}

/* ── Tags ── */

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  background: #E3F2FD;
  color: var(--secondary);
  border-radius: 4px;
  text-transform: lowercase;
}

/* ── Single Post ── */

.post {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.post-header {
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid #E0E0E0;
}

.post-title {
  font-size: 38px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.lang-link {
  padding: 3px 10px;
  background: var(--bg);
  border-radius: 4px;
  text-decoration: none;
  color: var(--secondary);
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
}

.lang-link:hover { background: #E3F2FD; }

/* ── Article Body ── */

.post-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}

.post-body h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin: 48px 0 18px;
  position: relative;
  padding-bottom: 10px;
}

.post-body h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 44px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.post-body h3 {
  font-size: 21px;
  font-weight: 600;
  color: var(--primary);
  margin: 36px 0 14px;
}

.post-body p { margin-bottom: 20px; }

.post-body ul,
.post-body ol {
  margin: 0 0 20px 24px;
}

.post-body li { margin-bottom: 8px; }

.post-body strong { color: var(--primary); }

.post-body a {
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover { color: var(--primary); }

.post-body hr {
  border: none;
  border-top: 2px solid #E8E8E8;
  margin: 44px 0;
}

.post-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 28px 0;
  background: var(--bg);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-body code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 14px;
  background: #E3F2FD;
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-body pre {
  background: #1E1E1E;
  color: #F5F5F5;
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 28px 0;
}

.post-body pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 14px;
}

/* ── Post Footer ── */

.post-footer {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid #E0E0E0;
}

.back-link {
  text-decoration: none;
  color: var(--secondary);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}

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

/* ── Footer CTA ── */

.footer-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 48px 40px;
  text-align: center;
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.footer-cta p {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.cta-button {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
}

.cta-button:hover {
  background: #c02850;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(216, 49, 91, 0.3);
}

/* ── Site Footer ── */

.site-footer {
  background: var(--primary);
  color: var(--white);
  padding: 48px 0 32px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
  color: var(--secondary);
  text-decoration: none;
}

.footer-bottom a:hover { color: var(--white); }

/* ── Responsive ── */

@media (max-width: 768px) {
  .blog-hero h1 { font-size: 28px; }
  .blog-hero p  { font-size: 16px; }

  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }

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

  .post { padding: 40px 20px 60px; }
  .post-title { font-size: 26px; }
  .post-body { font-size: 16px; }
  .post-body h2 { font-size: 21px; }
  .post-body h3 { font-size: 18px; }

  .footer-cta { padding: 32px 20px; }
  .footer-cta p { font-size: 17px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
