:root {
  --primary: #F9F9FA;
  --accent: #f53333;
  --text: #1E1E2F;
  --secondary: #2C2C3E;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--text);
  color: var(--primary);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 1000;
  padding: 0 5rem;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  align-items: center;
  height: 100px;
}

.landing-page-container-codemate-logo {
  flex: 1;
  display: flex;
  align-items: center;
}

.landing-page-container-codemate-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.navbar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: inherit;
}

.nav-link:hover { color: var(--accent); }

.header-profile {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-profile-pic {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: block;
  border: 2px solid #fff;
  cursor: pointer;
}

.dropdown {
  position: absolute;
  top: 80px;
  right: 5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  width: 220px;
  display: none;
  z-index: 1001;
  padding: 0.8rem 0.5rem;
}

.dropdown.show { display: block; }

.dropdown a {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
  cursor: pointer;
}

.dropdown a:hover { background: #f0f0f0; }
.dropdown a i { margin-right: 10px; color: #666; }
hr { margin: 0.5rem 0.7rem; }

/* ===== HAMBURGER ===== */
.topnav {
  display: none;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-icon {
  width: 28px;
  height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.menu-icon span {
  background-color: white;
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-icon.active .bar1 { transform: translateY(9px) rotate(45deg); }
.menu-icon.active .bar2 { opacity: 0; transform: scaleX(0); }
.menu-icon.active .bar3 { transform: translateY(-9px) rotate(-45deg); }

#myLinks {
  display: none;
  position: fixed;
  top: 100px;
  left: 0;
  width: 100%;
  background: #1E1E2F;
  z-index: 998;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#myLinks.show { display: flex; }

#myLinks a {
  padding: 1rem 2rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.2s;
}

#myLinks a:hover { background: rgba(255,255,255,0.05); }

/* ===== PAGE CONTENT ===== */
.blogs-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.blogs-page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.blogs-page-heading {
  font-size: 3.5rem;
  color: black;
  padding-top: 6rem;
}

.blogs-page-subtitle {
  font-size: 1.2rem;
  color: var(--secondary);
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 1rem;
}

.languages-heading {
  padding-bottom: 2.5rem;
  font-size: 2.3rem;
  font-weight: 700;
}

.languages-heading::before {
  content: '';
  width: 4px;
  height: 35px;
  background: #667eea;
  border-radius: 2px;
  display: inline-block;
  margin-right: 0.7rem;
  vertical-align: middle;
}

/* ===== LAYOUT ===== */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  width: 100%;
}

.blog-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.blog-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.blog-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.blog-content { padding: 25px; }
.blog-link { text-decoration: none; }

.blog-title {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 10px;
  cursor: pointer;
}

.blog-title:hover { color: #667eea; }

.blog-excerpt {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #888;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.sidebar .donation-cta {
  margin: 0;
  padding: 1.5rem;
}

.donation-cta {
  border-radius: 12px;
  padding: 2rem;
  color: var(--text);
  text-align: left;
  width: 100%;
}

.cta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 2rem;
  margin-bottom: 10px;
  color: inherit;
}

.item { margin-bottom: 20px; }
.date { font-size: 14px; color: #888; margin-bottom: 5px; }

.title {
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1.4;
  color: #000;
  text-decoration: none;
}

.title:hover { color: #667eea; }
.divider { border-bottom: 1px solid var(--text); margin: 10px 0 20px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 2rem auto;
  width: 100%;
  flex-wrap: wrap;
}

.page-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #667eea;
  color: #667eea;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 45px;
}

.page-btn:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.page-btn.active {
  background: #667eea;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.page-info { color: var(--secondary); font-weight: 500; margin: 0 15px; }

/* ===== RESPONSIVE ===== */
@media (min-width: 1000px) and (max-width: 1406px) {
  .header { padding: 0 2rem; }
  .navbar { flex-wrap: nowrap; white-space: nowrap; gap: 15px; }
}

@media (max-width: 1000px) {
  .header { padding: 0 1rem; padding-left: 2rem; }
  .navbar { flex-wrap: nowrap; white-space: nowrap; gap: 15px; }
  .landing-page-container-codemate-logo { flex: 0 0 250px; margin-right: 2rem; }
  .landing-page-container-codemate-logo a span { font-size: 1.5rem !important; }
  .landing-page-container-codemate-logo a img { height: 48px !important; width: 48px !important; }
}

@media (max-width: 1024px) {
  .header { padding: 0 2rem; }
  .dropdown { right: 2rem; }
  .landing-page-container-codemate-logo a span { font-size: 1.4rem !important; }
}

@media (max-width: 900px) {
  .landing-page-container-codemate-logo { margin-right: 0.5rem; }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 850px) {
  .header { padding: 0 1.2rem; height: 70px; }
  .landing-page-container-codemate-logo { flex: 1; }
  .navbar { display: none; }
  .header-profile { flex: 0; margin-right: 1rem; }
  .topnav { display: flex; }
  #myLinks { top: 70px; }
  .dropdown { right: 1rem; top: 60px; }

  .blogs-page-heading { font-size: 2.2rem; padding-top: 5rem; }
  .blogs-page-subtitle { font-size: 1rem; padding: 0 1rem; }
  .languages-heading { font-size: 1.6rem; padding-left: 1rem; }
  .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header { padding: 0 1rem; }
  .blogs-page-heading { font-size: 1.8rem; }
  .blog-content { padding: 16px; }
  .blog-title { font-size: 1.1rem; }
  .blog-grid { grid-template-columns: 1fr; }
}

.blog-image {
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-image svg {
  flex-shrink: 0;
  margin-top: 4px;
}