/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: #2d3748;
  background-color: #ffffff;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  color: #4a5568;
}

a {
  color: #4299e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #2b6cb0;
}

/* Header */
.header {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  padding-left: 1rem;
  padding-right: 1rem;
}

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

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

.nav-brand .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2b6cb0;
  margin-bottom: 0;
}

.nav-brand .tagline {
  font-size: 0.875rem;
  color: #718096;
  margin-bottom: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: #4a5568;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link.active,
.nav-link:hover {
  color: #2b6cb0;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #4299e1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: #4a5568;
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #e6f3ff 0%, #f0f9ff 100%);
  padding: 4rem 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.125rem;
  color: #4a5568;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  background: #4299e1;
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(66, 153, 225, 0.3);
}

.cta-button:hover {
  background: #2b6cb0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
  color: white;
}

.download-button {
  display: inline-block;
  background: #48bb78;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(72, 187, 120, 0.3);
}

.download-button:hover {
  background: #38a169;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.download-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Sections */
.featured-articles,
.categories,
.recent-articles {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: #1a202c;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.article-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card.featured .article-image {
  height: 100%;
}

.article-content {
  padding: 1.5rem;
}

.article-category {
  display: inline-block;
  background: #e6f3ff;
  color: #2b6cb0;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.article-title a {
  color: #1a202c;
  font-weight: 600;
}

.article-title a:hover {
  color: #2b6cb0;
}

.article-excerpt {
  color: #4a5568;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #718096;
}

.read-time {
  background: #f7fafc;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Categories */
.categories {
  background: #f7fafc;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.category-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  color: #1a202c;
  margin-bottom: 1rem;
}

.category-card p {
  color: #4a5568;
  margin-bottom: 1.5rem;
}

.category-link {
  color: #4299e1;
  font-weight: 600;
}

/* Recent Articles */
.articles-list {
  max-width: 800px;
  margin: 0 auto;
}

.article-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item .article-meta {
  margin-bottom: 0.5rem;
}

.article-item .article-title {
  margin-bottom: 0.5rem;
}

.view-all {
  text-align: center;
  margin-top: 2rem;
}

.view-all-link {
  color: #4299e1;
  font-weight: 600;
  font-size: 1.125rem;
}

/* Footer */
.footer {
  background: #1a202c;
  color: white;
  padding: 3rem 0 1rem;
}

.footer .container {
  background: #1a202c !important;
}

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

.footer-brand h3 {
  color: #4299e1;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #a0aec0;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-column h4 {
  color: white;
  margin-bottom: 1rem;
}

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

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column ul li a {
  color: #a0aec0;
}

.footer-column ul li a:hover {
  color: #4299e1;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #2d3748;
  color: #a0aec0;
}

/* Article Page Styles */
.page-header {
  background: linear-gradient(135deg, #e6f3ff 0%, #f0f9ff 100%);
  padding: 3rem 0;
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  color: #1a202c;
  margin-bottom: 1rem;
}

.page-description {
  font-size: 1.125rem;
  color: #4a5568;
  max-width: 600px;
  margin: 0 auto;
}

.article-page {
  padding: 4rem 0;
}

.article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.article-page .article-title {
  font-size: 2.5rem;
  color: #1a202c;
  margin-bottom: 1rem;
}

.article-page .article-meta {
  justify-content: center;
  gap: 2rem;
}

.article-page .article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.8;
}

.article-page .article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1a202c;
}

.article-page .article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #2d3748;
}

.article-page .article-content p {
  margin-bottom: 1.5rem;
}

.article-page .article-content ul,
.article-page .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-page .article-content li {
  margin-bottom: 0.5rem;
}

.article-page .article-content blockquote {
  border-left: 4px solid #4299e1;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #4a5568;
}

/* Filter Tabs */
.articles-filter {
  padding: 2rem 0;
  background: #f7fafc;
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: white;
  border: 2px solid #e2e8f0;
  color: #4a5568;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-tab:hover,
.filter-tab.active {
  background: #4299e1;
  border-color: #4299e1;
  color: white;
}

.articles-listing {
  padding: 4rem 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.pagination-btn {
  background: #4299e1;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: #2b6cb0;
}

.pagination-btn:disabled {
  background: #e2e8f0;
  color: #a0aec0;
  cursor: not-allowed;
}

.pagination-info {
  color: #4a5568;
  font-weight: 500;
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 10000;
  animation: slideIn 0.3s ease;
}

.notification-success {
  background: #48bb78;
}

.notification-error {
  background: #f56565;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: #4299e1;
  z-index: 1000;
  transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height, 64px);
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
    pointer-events: none;
    min-height: calc(100vh - var(--header-height, 64px));
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    min-height: calc(100vh - var(--header-height, 64px));
    z-index: 2000;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .download-button {
    width: 100%;
    margin-left: 0;
    margin-top: 1rem;
  }

  .article-card.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 1rem;
  }

  .filter-tab {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero {
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .featured-articles,
  .categories,
  .recent-articles {
    padding: 2rem 0;
  }

  .article-content {
    padding: 1rem;
  }

  .category-card {
    padding: 1.5rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .article-page .article-title {
    font-size: 2rem;
  }

  .header {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
a:focus,
button:focus {
  outline: 2px solid #4299e1;
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print styles */
@media print {
  .header,
  .footer,
  .download-button,
  .nav-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .article-page .article-content {
    max-width: none;
  }
}

/* Resources Page Styles */
.resources-content {
  background: #f7fafc;
  padding: 4rem 0;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.resource-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem 2rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.3s, transform 0.3s;
}

.resource-section:hover {
  box-shadow: 0 8px 30px rgba(66, 153, 225, 0.12);
  transform: translateY(-4px);
}

.resource-title {
  font-size: 1.5rem;
  color: #2b6cb0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resource-list {
  list-style: disc inside;
  color: #4a5568;
  font-size: 1.05rem;
  margin-left: 0.5rem;
}

.resource-list li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .resources-content {
    padding: 2rem 0;
  }
  .resources-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .resource-section {
    padding: 1.25rem 1rem;
  }
  .resource-title {
    font-size: 1.3rem;
  }
}

/* Popular Books Section */
.books-section {
  background: #f7fafc;
  padding: 4rem 0 2rem 0;
}
.books-title {
  text-align: center;
  color: #2b6cb0;
  font-size: 2rem;
  margin-bottom: 2.5rem;
  font-weight: 700;
}
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.book-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.3s, transform 0.3s;
}
.book-card:hover {
  box-shadow: 0 8px 30px rgba(66, 153, 225, 0.12);
  transform: translateY(-4px);
}
.book-title {
  font-size: 1.15rem;
  color: #1a202c;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.book-author {
  color: #4299e1;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.book-desc {
  color: #4a5568;
  font-size: 1rem;
  line-height: 1.6;
}
@media (max-width: 768px) {
  .books-section {
    padding: 2rem 0 1rem 0;
  }
  .books-title {
    font-size: 1.3rem;
  }
  .books-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .book-card {
    padding: 1.25rem 1rem;
  }
}

/* Icon SVG styles for resource sections and book cards */
.icon-svg {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.5em;
  margin-right: 0.5em;
  line-height: 1;
}
.resource-title .icon-svg {
  margin-left: 0.5em;
  margin-right: 0;
}
.book-card .icon-svg {
  display: block;
  margin: 0 auto 0.5em auto;
  width: 32px;
  height: 32px;
}
@media (max-width: 600px) {
  .book-card .icon-svg {
    width: 24px;
    height: 24px;
    margin-bottom: 0.25em;
  }
}

:root {
  --header-height: 64px;
}
