/* CSS Variables */
:root {
  --color-primary: #059669;
  --color-primary-dark: #047857;
  --color-primary-light: #ECFDF5;
  --color-text: #171717;
  --color-text-light: #525252;
  --color-text-muted: #A3A3A3;
  --color-border: #E5E5E5;
  --color-bg: #FAFAFA;
  --color-white: #FFFFFF;
  --font-display: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --border-radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

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

.navbar {
  padding: 16px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  color: var(--color-text-light);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: 0.2s;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-white) 100%);
  padding: 80px 0;
  text-align: center;
}

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

.hero p {
  font-size: 18px;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

/* Sections */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
}

.view-all {
  font-weight: 500;
}

.featured-posts,
.blog-list {
  padding: 64px 0;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
}

.blog-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 24px;
}

.card-category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-title a {
  color: var(--color-text);
}

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

.card-excerpt {
  color: var(--color-text-light);
  font-size: 14px;
  margin-bottom: 16px;
}

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

/* Category Nav */
.category-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.category-link {
  padding: 8px 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 14px;
  color: var(--color-text-light);
  transition: all 0.2s;
}

.category-link:hover,
.category-link.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

/* Blog Post */
.blog-post {
  padding: 40px 0 80px;
}

.blog-post .container {
  max-width: 800px;
}

/* Breadcrumb */
.breadcrumb ol {
  display: flex;
  list-style: none;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 24px;
}

.breadcrumb li::after {
  content: '/';
  margin-left: 8px;
  color: var(--color-text-muted);
}

.breadcrumb li:last-child::after {
  display: none;
}

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

.breadcrumb .active {
  color: var(--color-text-light);
}

/* Post Header */
.post-header {
  margin-bottom: 32px;
}

.post-category {
  display: inline-block;
  padding: 6px 16px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 16px;
}

.post-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.post-title-bn {
  font-size: 24px;
  font-weight: 500;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  font-size: 13px;
  color: var(--color-text-light);
}

.tag:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Featured Image */
.post-featured-image {
  margin: 32px 0;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
}

/* Post Excerpt */
.post-excerpt {
  padding: 24px;
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin-bottom: 32px;
  font-size: 18px;
  color: var(--color-text-light);
}

/* Post Content */
.post-content {
  font-size: 17px;
  line-height: 1.8;
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin: 40px 0 16px;
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 12px;
}

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

.post-content ul, .post-content ol {
  margin: 20px 0;
  padding-left: 24px;
}

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

.post-content blockquote {
  padding: 20px 24px;
  background: var(--color-bg);
  border-left: 4px solid var(--color-primary);
  margin: 24px 0;
  font-style: italic;
}

.post-content pre {
  background: #1a1a2e;
  color: #f8f8f2;
  padding: 20px;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 24px 0;
}

.post-content code {
  background: var(--color-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content img {
  border-radius: var(--border-radius);
  margin: 24px 0;
}

.post-content a {
  text-decoration: underline;
}

/* Bengali Content */
.content-lang-header {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 24px;
}

/* Post Footer */
.post-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text-light);
  transition: all 0.2s;
}

.share-facebook:hover {
  background: #1877F2;
  color: white;
}

.share-twitter:hover {
  background: #1DA1F2;
  color: white;
}

.share-linkedin:hover {
  background: #0A66C2;
  color: white;
}

.author-bio {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--color-bg);
  border-radius: var(--border-radius);
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 600;
}

.author-info strong {
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
}

.author-info p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

/* Related Posts */
.related-posts {
  margin-top: 48px;
}

.related-posts h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 24px;
}

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

.related-card {
  display: block;
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

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

.related-card img {
  aspect-ratio: 16/9;
  object-fit: cover;
}

.related-card-content {
  padding: 16px;
}

.related-card h4 {
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--color-text);
}

.related-card .date {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* CTA Section */
.cta-section {
  background: var(--color-primary);
  color: white;
  padding: 64px 0;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: 32px;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

.cta-section .btn-primary {
  background: white;
  color: var(--color-primary);
}

.cta-section .btn-primary:hover {
  background: var(--color-primary-light);
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: white;
  padding: 64px 0 32px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

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

.footer-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-links h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

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

.pagination .page-item {
  list-style: none;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text-light);
  transition: all 0.2s;
}

.pagination .page-link:hover,
.pagination .page-item.active .page-link {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu,
  .nav-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

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

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

  .post-title {
    font-size: 28px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ==================== QUESTION PAGES ==================== */

/* Question Page */
.question-page {
  padding: 40px 0 80px;
}

.question-page .container {
  max-width: 900px;
}

/* Question Card */
.question-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.meta-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.meta-tag.subject {
  background: #DBEAFE;
  color: #1D4ED8;
}

.meta-tag.topic {
  background: #F3E8FF;
  color: #7C3AED;
}

.meta-tag.year {
  background: #FEF3C7;
  color: #D97706;
}

.meta-tag.exam-taker {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.question-text {
  margin-bottom: 24px;
}

.question-text h1 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-text);
}

/* Options */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.option {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  background: var(--color-bg);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.option:hover {
  background: var(--color-white);
  border-color: var(--color-border);
}

.option.correct {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  font-weight: 600;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}

.option.correct .option-letter {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.option-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
}

.correct-indicator {
  color: var(--color-primary);
  margin-left: 12px;
}

/* Answer Section */
.answer-section {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}

.show-answer-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.show-answer-btn:hover {
  background: var(--color-primary-dark);
}

.answer-content {
  margin-top: 24px;
}

.correct-answer {
  padding: 16px;
  background: var(--color-primary-light);
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 20px;
}

.correct-answer strong {
  color: var(--color-primary);
}

.explanation {
  margin-bottom: 24px;
}

.explanation h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 12px;
}

.explanation-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-light);
}

.option-explanations h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 16px;
}

.option-explanation {
  padding: 12px 16px;
  background: var(--color-bg);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.option-explanation.correct {
  background: var(--color-primary-light);
}

.option-explanation strong {
  display: block;
  margin-bottom: 4px;
}

/* Source Info */
.source-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.source-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Related Questions */
.related-questions {
  margin-top: 48px;
}

.related-questions h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 24px;
}

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

.related-question-card {
  display: block;
  padding: 20px;
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

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

.question-preview {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: 12px;
}

.question-meta-small {
  display: flex;
  gap: 8px;
}

.question-meta-small span {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Question CTA */
.question-cta {
  text-align: center;
  padding: 48px;
  background: var(--color-primary-light);
  border-radius: var(--border-radius);
  margin-top: 48px;
}

.question-cta h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 12px;
}

.question-cta p {
  color: var(--color-text-light);
  margin-bottom: 24px;
}

/* Questions List Page */
.questions-list {
  padding: 64px 0;
}

.filters-section {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.filter-select {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--color-white);
  min-width: 150px;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.questions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.question-card-item {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.2s;
}

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

.question-card-item a {
  display: block;
  padding: 20px;
  color: inherit;
}

.question-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.question-meta-tags .tag {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.question-meta-tags .tag.subject {
  background: #DBEAFE;
  color: #1D4ED8;
}

.question-meta-tags .tag.year {
  background: #FEF3C7;
  color: #D97706;
}

.question-meta-tags .tag.exam-taker {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Responsive for Questions */
@media (max-width: 768px) {
  .question-card {
    padding: 20px;
  }

  .option {
    padding: 12px;
  }

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

  .filters-section {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }
}
