@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #f9fafc;
  color: #1f2937;
  height: auto;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 80px 20px;
  height: 70vh;
  background: url("img/hero-blog.jpeg") no-repeat center/cover;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
}

.hero-content {
  position: relative;
  max-width: 800px;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  background: #ffffffb8;
  color: #374151;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 20px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-badge .hero-badge-awesome {
  color: #3b82f6;
}

.hero h1 {
  font-size: 5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.hero h1 span {
  background: linear-gradient(90deg, #4f46e5, #9333ea, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  color: #4b5563;
  margin: 20px 0 40px;
  line-height: 1.6;
}

.search-box {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.search-box input {
  width: 60%;
  max-width: 400px;
  padding: 14px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 9999px 0 0 9999px;
  outline: none;
  font-size: 16px;
}

.search-box button {
  background: linear-gradient(90deg, #3b82f6, #6366f1, #9333ea);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 0 9999px 9999px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.search-box button:hover {
  opacity: 0.9;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 20px;
}

.hero-stats div {
  text-align: center;
}

.hero-stats h3 {
  font-size: 28px;
  margin: 0;
  font-weight: 700;
}

.hero-stats h3.blue {
  color: #3b82f6;
}

.hero-stats h3.orange {
  color: #f97316;
}

.hero-stats h3.purple {
  color: #9333ea;
}

.hero-stats p {
  margin: 6px 0 0;
  font-size: 14px;
  color: #6b7280;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }
  .search-box {
    flex-direction: column;
  }
  .search-box input,
  .search-box button {
    width: 100%;
    border-radius: 9999px;
    margin: 5px 0;
  }
  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }
}

/* ===== Section Header ===== */
.articles-section {
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.articles-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5px;
}

.articles-header p {
  color: #777;
  font-size: 15px;
  margin-bottom: 20px;
}

.articles-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.articles-filter button {
  border: none;
  outline: none;
  padding: 8px 16px;
  border-radius: 20px;
  background: #f5f7fa;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.articles-filter button.active,
.articles-filter button:hover {
  background: #2563eb;
  color: #fff;
}

.articles-filter button span {
  opacity: 0.7;
  margin-left: 6px;
}

/* ===== Grid Layout ===== */
/* ===== Articles Grid ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* ===== Card Styles ===== */
.article-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

/* ===== Card Image ===== */
.card-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  color: #fff;
}

.category.public-speaking,
.category.communication,
.category.tips {
  background: #0ea5e9;
}

/* ===== Card Content ===== */
.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 10px;
}

.card-meta .dot {
  margin: 0 6px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #111827;
  transition: color 0.3s ease;
}

/* Hanya judul berubah biru saat hover */
.article-card:hover .card-title {
  color: #0ea5e9;
}

.card-desc {
  font-size: 15px;
  color: #4b5563;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* ===== Footer ===== */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.read-more {
  color: #2563eb;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.3s ease;
}

/* Tablet (max 1024px) */
@media (max-width: 1024px) {
  .hero {
    height: auto;
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .search-box input {
    width: 70%;
  }

  .articles-grid {
    gap: 20px;
  }

  .card-image {
    height: 160px;
  }
}

/* Mobile sedang (max 768px) */
@media (max-width: 768px) {
  .hero {
    padding: 50px 20px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 16px;
    margin: 15px 0 30px;
  }

  .search-box {
    flex-direction: column;
    gap: 10px;
  }

  .search-box input,
  .search-box button {
    width: 100%;
    border-radius: 9999px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .articles-filter {
    flex-direction: column;
    gap: 8px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-desc {
    font-size: 14px;
  }
}

/* Mobile kecil (max 480px) */
@media (max-width: 480px) {
  .hero {
    padding: 40px 16px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 14px;
  }

  .search-box input {
    font-size: 14px;
    padding: 10px 14px;
  }

  .search-box button {
    font-size: 14px;
    padding: 12px 18px;
  }

  .hero-stats h3 {
    font-size: 22px;
  }

  .articles-header h2 {
    font-size: 22px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-image {
    height: 150px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-desc {
    font-size: 13px;
  }
}
