/* ======================================
   Articles Page - Enhanced Design
   No Save Button, Modern & Clean
====================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Tajawal', sans-serif;
}

/* ===== Hero Section - Enhanced ===== */
.articles-hero {
  position: relative;
  background: linear-gradient(135deg, #062141 0%, #0a4d4d 100%);
  color: white;
  padding: 130px 25px 70px;
  text-align: center;
  overflow: hidden;
}

/* Animated Background Shapes */
.hero-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: float 20s infinite ease-in-out;
}

.shape-1 {
  width: 400px;
  height: 400px;
  top: -150px;
  right: -100px;
  animation-delay: 0s;
}

.shape-2 {
  width: 250px;
  height: 250px;
  bottom: -80px;
  left: 15%;
  animation-delay: 7s;
}

.shape-3 {
  width: 180px;
  height: 180px;
  top: 40%;
  left: -50px;
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-40px) rotate(180deg);
    opacity: 0.6;
  }
}

.articles-hero-inner {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  z-index: 1;
}

/* Hero Icon - Enhanced */
.hero-icon {
  font-size: 70px;
  margin-bottom: 25px;
  animation: pulse 2.5s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: 19px;
  opacity: 0.92;
  margin-bottom: 45px;
  line-height: 1.7;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

/* Search Bar - Enhanced */
.articles-searchbar {
  max-width: 800px;
  margin: 0 auto 30px;
  animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.search-input {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 18px 25px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-input:focus-within {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.search-input i {
  color: rgba(255, 255, 255, 0.85);
  font-size: 20px;
  transition: transform 0.3s ease;
}

.search-input:focus-within i {
  transform: scale(1.15);
  color: white;
}

.search-input input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 17px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
}

.search-input input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Filters - Enhanced */
.search-filters {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease-out 0.6s backwards;
}

.filter-select {
  flex: 1;
  min-width: 200px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 15px 22px;
  padding-left: 45px;
  outline: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Tajawal', sans-serif;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='white' d='M6 8L0 2l1.5-1.5L6 5 10.5.5 12 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 22px center;
}

.filter-select:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.filter-select:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.filter-select option {
  background: #062141;
  color: white;
  padding: 12px;
}

/* ===== Articles Section ===== */
.articles-section {
  padding: 80px 20px;
  background: #ffffff;
}

.articles-container {
  max-width: 1300px;
  margin: 0 auto;
}

/* Section Header - Enhanced */
.section-header-academic {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 70px;
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #0a4d4d;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 18px;
  position: relative;
}

.section-label::before,
.section-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, #062141, #0a4d4d);
}

.section-label::before {
  right: -50px;
}

.section-label::after {
  left: -50px;
}

.section-title-clean {
  font-size: 44px;
  font-weight: 800;
  color: #062141;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.section-description {
  font-size: 18px;
  color: #64748b;
  line-height: 1.7;
  font-weight: 400;
}

/* ===== Articles Grid - Enhanced ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 32px;
  margin-top: 50px;
}

/* Article Card - Completely Redesigned */
.article-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(6, 33, 65, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

/* Gradient accent on bottom */
.article-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, #062141, #0a4d4d);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.article-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 45px rgba(6, 33, 65, 0.15);
  border-color: rgba(10, 77, 77, 0.2);
}

.article-card:hover::after {
  transform: scaleX(1);
}

.article-card.hidden {
  display: none;
}

/* Cover Image - Enhanced */
.article-cover {
  position: relative;
  display: block;
  height: 220px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  overflow: hidden;
}

.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.1);
}

/* Overlay Icon - Enhanced */
.article-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 33, 65, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  opacity: 0;
}

.article-overlay i {
  color: white;
  font-size: 36px;
  transform: translateX(15px);
  transition: transform 0.4s ease;
}

.article-card:hover .article-overlay {
  background: rgba(6, 33, 65, 0.80);
  opacity: 1;
}

.article-card:hover .article-overlay i {
  transform: translateX(0);
}

/* Badge - Enhanced */
.article-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
  border: 1px solid rgba(6, 33, 65, 0.12);
  color: #062141;
  font-weight: 800;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.article-card:hover .article-badge {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Article Body - Enhanced */
.article-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
}

.meta-item i {
  font-size: 15px;
  color: #0a4d4d;
}

/* Level Pills - Enhanced */
.level-pill {
  padding: 7px 14px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: auto;
}

.level-beginner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.level-intermediate {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.level-advanced {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Title - Enhanced */
.article-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
  min-height: 62px;
}

.article-title a {
  color: #062141;
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-title a:hover {
  color: #0a4d4d;
}

/* Excerpt - Enhanced */
.article-excerpt {
  margin: 0 0 22px;
  color: #475569;
  line-height: 1.8;
  font-size: 15px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Actions - Read Button Only (NO SAVE BUTTON) */
.article-actions {
  margin-top: auto;
  display: flex;
}

.btn-read {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #062141, #0a4d4d);
  color: #fff;
  padding: 16px 24px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(6, 33, 65, 0.25);
  position: relative;
  overflow: hidden;
}

/* Ripple effect */
.btn-read::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.btn-read:hover::before {
  width: 300px;
  height: 300px;
}

.btn-read:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(6, 33, 65, 0.35);
  gap: 14px;
}

.btn-read i {
  transition: transform 0.3s ease;
}

.btn-read:hover i {
  transform: translateX(-3px);
}

/* Hide save button if it exists */
.btn-save {
  display: none !important;
}

/* No Results - Enhanced */
.no-results {
  text-align: center;
  padding: 100px 20px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  margin-top: 50px;
  border: 1px solid rgba(6, 33, 65, 0.06);
}

.no-results i {
  font-size: 80px;
  color: #e2e8f0;
  margin-bottom: 30px;
  opacity: 0.6;
}

.no-results h3 {
  font-size: 28px;
  font-weight: 800;
  color: #062141;
  margin-bottom: 14px;
}

.no-results p {
  font-size: 17px;
  color: #64748b;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .articles-hero {
    padding: 110px 20px 60px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .hero-icon {
    font-size: 55px;
  }

  .search-filters {
    flex-direction: column;
  }

  .filter-select {
    min-width: 100%;
  }

  .section-title-clean {
    font-size: 36px;
  }

  .section-label::before,
  .section-label::after {
    width: 30px;
    right: -40px;
  }

  .section-label::after {
    left: -40px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-cover {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 30px;
  }

  .section-title-clean {
    font-size: 30px;
  }

  .section-label::before,
  .section-label::after {
    display: none;
  }

  .article-body {
    padding: 24px;
  }

  .article-title {
    font-size: 20px;
    min-height: auto;
  }
}


/* ===== Article Card Without Image ===== */
.article-card-no-image {
  min-height: auto;
}

.article-card-no-image .article-cover {
  display: none;
}

.article-card-no-image .article-body {
  padding: 35px;
}

/* Icon Header */
.article-icon-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}

.article-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 33, 65, 0.08), rgba(10, 77, 77, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(6, 33, 65, 0.12);
  transition: all 0.3s ease;
}

.article-card-no-image:hover .article-icon {
  transform: scale(1.08) rotate(5deg);
  background: linear-gradient(135deg, rgba(6, 33, 65, 0.12), rgba(10, 77, 77, 0.08));
  border-color: rgba(6, 33, 65, 0.2);
}

.article-icon i {
  font-size: 36px;
  color: #062141;
}

/* Adjust badge for no-image cards */
.article-card-no-image .article-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Article Highlights */
.article-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(6, 33, 65, 0.03), rgba(10, 77, 77, 0.02));
  border-radius: 12px;
  border: 1px solid rgba(6, 33, 65, 0.08);
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
}

.highlight-item i {
  font-size: 18px;
  color: #0a4d4d;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.article-card-no-image .article-title {
  min-height: auto;
  margin-bottom: 18px;
}

.article-card-no-image .article-excerpt {
  margin-bottom: 20px;
}

/* Center single article */
@media (min-width: 769px) {
  .articles-grid:has(.article-card-no-image:only-child) {
    justify-content: center;
  }
  
  .article-card-no-image:only-child {
    max-width: 800px;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .article-card-no-image .article-body {
    padding: 28px;
  }
  
  .article-icon {
    width: 70px;
    height: 70px;
  }
  
  .article-icon i {
    font-size: 30px;
  }
  
  .article-icon-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .article-highlights {
    padding: 16px;
  }
  
  .highlight-item {
    font-size: 14px;
  }
}