/* =========================
   Base
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: #f9fafb;
  color: #1e293b;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

/* =========================
   NAV
========================= */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

/* Text Logo (no image) */
.logo {
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.logo a {
  text-decoration: none;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
}

.logo a:hover {
  color: #2563eb;
  background: #f1f5f9;
}

/* Nav links */
nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  text-decoration: none;
  color: #475569;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 8px;
}

nav a:hover {
  color: #2563eb;
  background: #f1f5f9;
}

/* =========================
   HERO
========================= */
.hero {
  padding: 60px 0;
  text-align: center;
  background: #ffffff;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 15px 0;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 720px;
  margin: 0 auto;
  color: #475569;
  font-size: 16px;
}

.hero-buttons {
  margin-top: 25px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* mobile tap target */
  font-weight: 600;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  filter: brightness(0.95);
}

.btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-secondary:hover {
  filter: brightness(0.98);
}

.trust-line {
  margin-top: 18px;
  font-size: 13px;
  color: #64748b;
}

/* =========================
   CATEGORIES
========================= */
.categories {
  padding: 50px 0;
}

.categories h2 {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.card {
  background: #ffffff;
  padding: 18px;
  border-radius: 12px;
  text-decoration: none;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  transition: 0.2s ease;
  min-height: 56px; /* feels better on mobile */
  display: flex;
  align-items: center;
}

.card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
}

/* =========================
   FEATURED
========================= */
.featured {
  padding: 50px 0;
  background: #f1f5f9;
  margin-top: 20px;
}

.featured h2 {
  margin: 0 0 22px 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.featured-card {
  background: #ffffff;
  padding: 22px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: 0.25s ease;
}

.featured-card:hover {
  transform: translateY(-3px);
  border-color: #2563eb;
}

.featured-card .rank {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.2px;
}

.featured-card h3 {
  margin: 8px 0 8px 0;
  font-size: 18px;
  line-height: 1.35;
}

.featured-card p {
  margin: 0;
  font-size: 14px;
  color: #475569;
}

.featured-card a {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.featured-card a:hover {
  text-decoration: underline;
}

/* =========================
   LATEST + TOP ARTICLES
========================= */
.content {
  padding: 50px 0;
  background: #ffffff;
  margin-top: 20px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
  align-items: start;
}

.section-title {
  margin: 0 0 18px 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.article-list {
  display: grid;
  gap: 14px;
}

.article-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: 0.2s ease;
  background: #ffffff;
}

.article-card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
}

.article-card h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  line-height: 1.4;
}

.article-card p {
  margin: 0;
  font-size: 14px;
  color: #475569;
}

.article-meta {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
}

.article-card a {
  text-decoration: none;
  color: #1e293b;
  display: block;
}

.article-card a:hover {
  color: #2563eb;
}

/* Sidebar */
.sidebar {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  position: sticky;
  top: 78px; /* below sticky navbar */
}

.sidebar-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.top-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.top-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 10px;
  transition: 0.2s ease;
}

.top-item:hover {
  background: #ffffff;
}

.top-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #e2e8f0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #1e293b;
}

.top-item a {
  text-decoration: none;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}

.top-item a:hover {
  color: #2563eb;
}

.top-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

/* =========================
   ABOUT
========================= */
.about {
  padding: 50px 0;
  background: #ffffff;
  margin-top: 20px;
}

/* =========================
   FOOTER
========================= */
footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  margin-left: 20px;
  color: #cbd5e1;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* =========================
   MOBILE FRIENDLY
========================= */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    top: auto;
  }
}

@media (max-width: 680px) {
  .container {
    width: 92%;
  }

  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  nav a {
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
  }

  .hero {
    padding: 42px 0;
    text-align: left;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 15px;
    margin: 0;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .logo {
    font-size: 17px;
  }
}