/* =========================================
   GROWREACH ARTICLE HUB STYLES
   Maintains brand identity (Primary: #191BC5)
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Colors from Homepage */
  --accent-primary: #191BC5;
  --accent-primary-hover: #10129B;
  --accent-light: rgba(25, 27, 197, 0.15);

  /* Text Colors */
  --text-main: #fafafa;
  --text-muted: #c3cada;
  --text-light: #8a96b3;

  /* Backgrounds & Borders */
  --bg-page: #10141c;
  --bg-card: #161a25;
  --border-color: #242832;

  /* Utilities */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 10px 40px rgba(25, 27, 197, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   HERO SECTION
========================================= */
.article-hero {
  text-align: center;
  padding: 80px 0 40px;
}

.article-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.article-hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 32px;
}

/* Toggle Sub-menu and Search */
.article-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 60px;
  flex-wrap: wrap;
  flex-direction: column;
}

.article-search {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
  width: 620px;
  transition: all 0.3s ease;
}

.article-search:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.article-search i {
  color: var(--text-light);
  margin-right: 12px;
}

.article-search input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  width: 100%;
}

.article-search input::placeholder {
  color: var(--text-light);
}

.article-filter {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.filter-btn {
  padding: 8px 24px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn i {
  font-size: 0.85rem;
}

.filter-btn.active {
  background: var(--accent-light);
  color: var(--accent-primary);
}

.filter-btn:hover:not(.active) {
  color: var(--text-main);
  background: var(--border-color);
}

/* =========================================
   ARTICLE GRID
========================================= */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 60px;
}

/* Card Styling */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(25, 27, 197, 0.2);
}

/* Card Image */
.article-img-wrap {
  width: 100%;
  height: 220px;
  background-color: var(--bg-page);
  overflow: hidden;
  position: relative;
}

.article-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-img-wrap img {
  transform: scale(1.05);
}

/* Card Content */
.article-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* Category Badge Variants */
.article-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.badge-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.badge-orange {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
}

.article-read-time {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

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

.article-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

/* =========================================
   PAGINATION
========================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-bottom: 80px;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.page-link:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.page-link.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .article-hero h1 {
    font-size: 2.2rem;
  }

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

  .article-controls {
    flex-direction: column;
    gap: 16px;
  }

  .article-search {
    width: 100%;
  }

  .article-filter {
    width: 100%;
    border-radius: var(--radius-md);
  }

  .filter-btn {
    width: 100%;
    text-align: center;
    border-radius: var(--radius-sm);
    justify-content: center;
    height: 100%;
  }
}