/* ======================================
   Articles Page — Option A
   Horizontal hero + side filters + 3-col grid
====================================== */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Tajawal', sans-serif; }

/* ===== HERO ===== */
.articles-hero {
  position: relative;
  background: #062141;
  color: white;
  padding: 140px 60px 60px;
  overflow: hidden;
}

.articles-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

/* Glow orbs */
.hero-shapes { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.shape {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,122,122,0.28), transparent 70%);
  filter: blur(50px);
  animation: float 18s infinite ease-in-out;
}
.shape-1 { width:500px; height:500px; top:-160px; right:-120px; animation-delay:0s; }
.shape-2 { width:360px; height:360px; bottom:-80px; left:3%; animation-delay:7s; }
.shape-3 { width:240px; height:240px; top:40%; left:-60px; animation-delay:14s; }

@keyframes float {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-36px) scale(1.1); }
}

/* Hero inner: left text col + right filter col */
.articles-hero-inner {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
}

/* ── Text column ── */
.hero-text-col { flex: 1; min-width: 0; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.8);
  font-size: 13px; font-weight: 700;
  padding: 6px 18px; border-radius: 999px;
  margin-bottom: 20px; letter-spacing: 0.4px;
}

.hero-title {
  font-size: 46px; font-weight: 800;
  line-height: 1.25; letter-spacing: -1px;
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}

.hero-subtitle {
  font-size: 16px; color: rgba(255,255,255,0.62);
  line-height: 1.75; margin-bottom: 32px;
  max-width: 540px;
  animation: fadeInUp 0.6s ease-out 0.15s backwards;
}

/* Search bar */
.articles-searchbar {
  max-width: 540px;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.search-input {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.11);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 15px 22px;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
}
.search-input:focus-within {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 10px 32px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}
.search-input i { color: rgba(255,255,255,0.6); font-size: 16px; flex-shrink: 0; }
.search-input:focus-within i { color: white; }
.search-input input {
  width: 100%; background: transparent; border: none; outline: none;
  color: white; font-size: 15px; font-family: 'Tajawal', sans-serif; font-weight: 500;
}
.search-input input::placeholder { color: rgba(255,255,255,0.45); }

/* ── Filter column ── */
.hero-filters-col {
  flex-shrink: 0;
  width: 240px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 22px 20px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.filter-col-label {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px; text-transform: uppercase;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.filter-group { display: flex; flex-direction: column; gap: 6px; }

.filter-group-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.55);
}
.filter-group-label i { font-size: 12px; }

.filter-select-pill {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  font-family: 'Tajawal', sans-serif;
  outline: none; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M5 6L0 1.5 1.2.3 5 4.2 8.8.3 10 1.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  transition: all 0.2s ease;
}
.filter-select-pill:hover {
  background-color: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.25);
}
.filter-select-pill option { background: #062141; color: white; }

/* ===== ARTICLES SECTION ===== */
.articles-section { padding: 70px 60px 100px; background: #f8fafc; }
.articles-container { max-width: 1280px; margin: 0 auto; }

.articles-section-header { margin-bottom: 40px; }
.articles-section-header h2 {
  font-size: 30px; font-weight: 800; color: #062141;
  margin-bottom: 6px; letter-spacing: -0.4px;
}
.articles-section-header p { font-size: 15px; color: #64748b; line-height: 1.6; }

/* ===== GRID ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ===== ARTICLE CARD ===== */
.article-card {
  background: white;
  border-radius: 18px;
  border: 1px solid rgba(6,33,65,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  display: flex; flex-direction: column;
  transition: all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  position: relative; overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.55s ease forwards;
}

.article-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #062141, #0a4d4d);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s ease;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 46px rgba(6,33,65,0.13);
  border-color: rgba(10,77,77,0.18);
}
.article-card:hover::after { transform: scaleX(1); }
.article-card.hidden { display: none; }

/* Card with cover image */
.article-cover {
  height: 200px; overflow: hidden;
  background: linear-gradient(135deg, #062141, #0a4d4d);
  border-radius: 18px 18px 0 0;
  position: relative; display: block;
}
.article-cover img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform 0.5s ease;
}
.article-card:hover .article-cover img { transform: scale(1.07); }
.article-overlay {
  position: absolute; inset: 0; border-radius: 18px 18px 0 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,33,65,0); opacity: 0;
  transition: all 0.35s ease;
}
.article-overlay i { font-size: 28px; color: white; transform: scale(0.8); transition: transform 0.3s ease; }
.article-card:hover .article-overlay { background: rgba(6,33,65,0.72); opacity: 1; }
.article-card:hover .article-overlay i { transform: scale(1); }

/* Badge on cover */
.article-cover .article-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
}

/* Card top row (no-image cards) */
.article-card-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 22px 0;
}

/* Icon */
.article-icon {
  width: 58px; height: 58px; border-radius: 14px;
  background: linear-gradient(135deg, #062141, #0a4d4d);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(6,33,65,0.2);
  transition: all 0.35s ease;
}
.article-icon i { font-size: 24px; color: white; }
.article-card:hover .article-icon { transform: scale(1.08) rotate(-5deg); }

/* Badge */
.article-badge {
  display: inline-block;
  background: #e1f5ee; color: #085041;
  font-size: 11px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(8,80,65,0.12);
}

/* Body */
.article-body,
.article-card > .article-meta,
.article-card > .article-title,
.article-card > .article-excerpt,
.article-card > .article-highlights,
.article-card > .article-actions {
  padding-left: 22px; padding-right: 22px;
}

.article-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px 22px 0;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px; margin-bottom: 0;
}

.meta-item { display: flex; align-items: center; gap: 6px; color: #64748b; font-size: 13px; font-weight: 600; }
.meta-item i { font-size: 12px; color: #0a4d4d; }

.level-pill { padding: 4px 11px; border-radius: 999px; font-weight: 700; font-size: 11px; margin-right: auto; }
.level-beginner    { background: #dcfce7; color: #166534; }
.level-intermediate{ background: #dbeafe; color: #1e40af; }
.level-advanced    { background: #fee2e2; color: #991b1b; }

.article-title {
  margin: 14px 22px 10px;
  font-size: 18px; font-weight: 800;
  color: #062141; line-height: 1.45;
}
.article-title a { color: inherit; text-decoration: none; transition: color 0.25s ease; }
.article-title a:hover { color: #0a4d4d; }

.article-excerpt {
  margin: 0 22px 16px;
  color: #475569; font-size: 13px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Highlights */
.article-highlights {
  margin: 0 22px 18px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px;
  background: #f8fafc; border-radius: 10px;
  border: 1px solid rgba(6,33,65,0.06);
}
.highlight-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: #374151;
}
.highlight-item i { font-size: 14px; color: #0a4d4d; width: 18px; flex-shrink: 0; }

/* Read button */
.article-actions { padding: 0 22px 22px; margin-top: auto; }

.btn-read {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 20px; border-radius: 12px;
  background: linear-gradient(135deg, #062141, #0a4d4d);
  color: white; font-size: 14px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(6,33,65,0.2);
  transition: all 0.3s ease;
}
.btn-read:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(6,33,65,0.3); gap: 12px; }
.btn-read i { transition: transform 0.3s ease; }
.btn-read:hover i { transform: translateX(-3px); }
.btn-save { display: none !important; }

/* No results */
.no-results {
  text-align: center; padding: 80px 20px;
  background: white; border-radius: 18px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  border: 1px solid rgba(6,33,65,0.06);
  margin-top: 32px;
}
.no-results i { font-size: 56px; color: #e2e8f0; margin-bottom: 20px; display: block; }
.no-results h3 { font-size: 22px; font-weight: 800; color: #062141; margin-bottom: 8px; }
.no-results p  { font-size: 15px; color: #64748b; }

/* Single card centering */
@media (min-width: 769px) {
  .articles-grid:has(.article-card:only-child) { justify-content: center; }
  .article-card:only-child { max-width: 700px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .articles-hero { padding: 130px 40px 60px; }
  .articles-section { padding: 60px 40px 80px; }
  .articles-hero-inner { gap: 40px; }
  .hero-filters-col { width: 210px; }
}

@media (max-width: 768px) {
  .articles-hero { padding: 120px 24px 50px; }
  .articles-hero-inner { flex-direction: column; gap: 28px; }
  .hero-text-col { text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .articles-searchbar { max-width: 100%; }
  .hero-filters-col { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 12px; padding: 16px 18px; }
  .filter-col-label { display: none; }
  .filter-group { flex: 1; min-width: 140px; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 15px; }
  .articles-section { padding: 40px 20px 60px; }
  .articles-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 480px) {
  .articles-hero { padding: 110px 20px 44px; }
  .hero-title { font-size: 28px; }
  .hero-filters-col { flex-direction: column; }
  .filter-group { min-width: 100%; }
}