/* ===== BLOG SPECIFIC CSS - EFG AFRO MARKET ===== */
/* Note: Header and Footer styles removed - using global header.css and footer.css */

/* ===== ADDITIONAL BLOG-SPECIFIC VARIABLES ===== */
:root {
  /* Blog-specific colors */
  --agriculture-color: #22c55e;
  --trade-color: #3b82f6;
  --market-insights-color: #8b5cf6;
  --success-stories-color: #f59e0b;
  --technology-color: #ef4444;
  --sustainability-color: #10b981;
  
  /* Blog overlay colors */
  --blog-overlay-1: rgba(5, 84, 64, 0.9);
  --blog-overlay-2: rgba(100, 57, 25, 0.8);
  
  /* Enhanced featured article colors */
  --featured-glow: rgba(5, 84, 64, 0.4);
  --featured-accent: rgba(232, 136, 36, 0.6);
}

/* ===== PAGE HERO SECTION ===== */
.page-hero-section {
  padding: 150px 0 80px;
  text-align: center;
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--background-white) 0%, var(--background-light) 100%);
  margin-top: 80px;
}

.hero-content {
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 84, 64, 0.1);
  border: 1px solid rgba(5, 84, 64, 0.2);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(5, 84, 64, 0.1);
  animation: fadeInDown 1s ease-out;
  backdrop-filter: blur(10px);
}

.hero-badge i {
  animation: pulse 2s infinite;
  color: var(--accent-orange);
}

.page-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem;
  animation: fadeInUp 1s ease-out 0.4s both;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-stats .stat-item {
  text-align: center;
}

.hero-stats .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-stats .stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== SECTION COMMON STYLES ===== */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 84, 64, 0.1);
  border: 1px solid rgba(5, 84, 64, 0.2);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(5, 84, 64, 0.1);
}

.section-badge i {
  font-size: 0.8rem;
  color: var(--accent-orange);
}

/* ===== FEATURED ARTICLE SECTION - ENHANCED ===== */
.featured-article-section {
  padding: 100px 0;
  background: var(--background-light);
  position: relative;
  overflow: hidden;
}

.featured-article-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(5, 84, 64, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.featured-article-card {
  background: var(--background-white);
  border: 2px solid rgba(5, 84, 64, 0.1);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  position: relative;
  box-shadow: 0 15px 40px rgba(5, 84, 64, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.featured-article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(5, 84, 64, 0.05) 0%, 
    rgba(232, 136, 36, 0.05) 50%, 
    rgba(5, 84, 64, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
  border-radius: var(--border-radius-xl);
}

.featured-article-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 70%);
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.8s ease;
  z-index: 2;
  pointer-events: none;
}

.featured-article-card:hover {
  transform: translateY(-15px) rotateX(2deg) rotateY(2deg);
  border-color: rgba(5, 84, 64, 0.4);
  box-shadow: 
    0 25px 60px rgba(5, 84, 64, 0.2),
    0 0 0 1px rgba(5, 84, 64, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.featured-article-card:hover::before {
  opacity: 1;
}

.featured-article-card:hover::after {
  transform: translateX(100%) translateY(100%) rotate(45deg);
}

.featured-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  border-radius: var(--border-radius-xl);
}

.featured-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1.1) contrast(1.1);
}

.featured-article-card:hover .featured-bg img {
  transform: scale(1.08) rotate(1deg);
  filter: brightness(1.2) contrast(1.2) saturate(1.1);
}

.featured-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(5, 84, 64, 0.85) 0%, 
    rgba(100, 57, 25, 0.75) 50%,
    rgba(5, 84, 64, 0.9) 100%);
  z-index: 1;
  transition: all 0.5s ease;
  border-radius: var(--border-radius-xl);
}

.featured-article-card:hover .featured-overlay {
  background: linear-gradient(135deg, 
    rgba(5, 84, 64, 0.75) 0%, 
    rgba(100, 57, 25, 0.65) 30%,
    rgba(232, 136, 36, 0.7) 70%,
    rgba(5, 84, 64, 0.8) 100%);
}

.featured-content {
  padding: 3rem;
  position: relative;
  z-index: 3;
  color: white;
  transform: translateZ(20px);
  transition: transform 0.5s ease;
}

.featured-article-card:hover .featured-content {
  transform: translateZ(30px) translateY(-5px);
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  opacity: 0.95;
  transition: opacity 0.3s ease;
}

.featured-article-card:hover .featured-meta {
  opacity: 1;
}

.featured-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  position: relative;
}

.featured-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-orange), transparent);
  transition: width 0.5s ease 0.2s;
}

.featured-article-card:hover .featured-title::after {
  width: 60px;
}

.featured-excerpt {
  font-size: 1.2rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
  max-width: 600px;
  opacity: 0.95;
  transition: all 0.3s ease;
}

.featured-article-card:hover .featured-excerpt {
  opacity: 1;
  transform: translateY(-2px);
}

.featured-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.featured-read-btn {
  background: linear-gradient(135deg, white 0%, rgba(255, 255, 255, 0.95) 100%);
  color: var(--primary-green);
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 15px 30px;
  border-radius: var(--border-radius-xl);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.featured-read-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-orange), var(--primary-green));
  transition: left 0.4s ease;
  z-index: -1;
}

.featured-read-btn:hover {
  color: white;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(232, 136, 36, 0.4);
  border-color: var(--accent-orange);
}

.featured-read-btn:hover::before {
  left: 0;
}

.featured-read-btn i {
  transition: transform 0.3s ease;
}

.featured-read-btn:hover i {
  transform: translateX(5px);
}

.featured-stats {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.featured-article-card:hover .featured-stats {
  opacity: 1;
  transform: translateY(-2px);
}

.featured-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.featured-stats .stat-item:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.featured-stats .stat-item i {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.featured-stats .stat-item:hover i {
  opacity: 1;
}

.date-tag,
.read-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.date-tag:hover,
.read-time:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Enhanced category tag in featured section */
.featured-meta .category-tag {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  color: white;
}

.featured-meta .category-tag:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

/* ===== BLOG CATEGORIES SECTION ===== */
.blog-categories-section {
  padding: 100px 0;
  background: var(--background-white);
}

/* Desktop Categories Grid - Fixed to show 4 cards in single row */
.categories-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 2rem;
  margin-top: 3rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure category cards don't break to new lines */
.categories-grid .category-card {
  min-width: 0;
  max-width: none;
}

/* Responsive adjustments for categories */
@media (max-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem;
  }
}

@media (max-width: 992px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
  }
}

.d-none {
  display: none !important;
}

.d-md-grid {
  display: none !important;
}

@media (min-width: 768px) {
  .d-md-grid {
    display: grid !important;
  }
  .d-block.d-md-none {
    display: none !important;
  }
}

.categories-grid .category-card {
  background: var(--background-white);
  border: 1px solid rgba(5, 84, 64, 0.1);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  cursor: pointer;
}

.categories-grid .category-card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: rgba(5, 84, 64, 0.3);
  box-shadow: var(--card-shadow-hover);
}

.categories-grid .category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(5, 84, 64, 0.05), transparent);
  transition: left 0.6s;
}

.categories-grid .category-card:hover::before {
  left: 100%;
}

.categories-grid .category-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-green), var(--accent-orange));
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: white;
  transition: var(--transition-smooth);
  box-shadow: 0 8px 25px rgba(5, 84, 64, 0.2);
}

.categories-grid .category-card:hover .category-icon {
  transform: rotate(5deg) scale(1.1);
  box-shadow: 0 12px 35px rgba(5, 84, 64, 0.3);
}

.categories-grid .category-card h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.categories-grid .category-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.article-count {
  display: inline-block;
  background: rgba(5, 84, 64, 0.1);
  color: var(--primary-green);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(5, 84, 64, 0.2);
}

/* Mobile Categories Carousel */
.categories-carousel {
  margin-top: 3rem;
}

.categories-owl .category-card {
  background: var(--background-white);
  border: 1px solid rgba(5, 84, 64, 0.1);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  margin: 0 10px;
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.categories-owl .category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(5, 84, 64, 0.3);
  box-shadow: var(--card-shadow-hover);
}

.categories-owl .category-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-green), var(--accent-orange));
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: white;
  transition: var(--transition-smooth);
  box-shadow: 0 8px 25px rgba(5, 84, 64, 0.2);
}

.categories-owl .category-card h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.categories-owl .category-card p {
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  flex-grow: 1;
}

/* ===== BLOG ARTICLES SECTION - REDESIGNED TO MATCH REFERENCE ===== */
.blog-articles-section {
  padding: 100px 0;
  background: var(--background-light);
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--background-white);
  border: 1px solid rgba(5, 84, 64, 0.2);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(5, 84, 64, 0.1);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-green);
  color: white;
  border-color: var(--primary-green);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(5, 84, 64, 0.3);
}

.articles-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
}

/* Desktop: 3 columns */
@media (min-width: 992px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 2x2 grid - Fixed */
@media (max-width: 767px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
    display: grid !important;
  }
}

/* Small Mobile: Single column */
@media (max-width: 480px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.articles-grid.filtering {
  opacity: 0.7;
  pointer-events: none;
}

/* ===== ARTICLE CARD STYLES - MATCHING REFERENCE DESIGN ===== */
.article-card {
  background: var(--background-white);
  border: 1px solid rgba(5, 84, 64, 0.1);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  position: relative;
  box-shadow: var(--card-shadow);
  opacity: 1;
  transform: scale(1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-10px);
  border-color: rgba(5, 84, 64, 0.3);
  box-shadow: var(--card-shadow-hover);
}

.article-card.hidden {
  display: none !important;
}

.article-card.filtered {
  animation: slideInUp 0.6s ease-out;
}

.article-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

@media (max-width: 767px) {
  .article-image {
    height: 150px;
  }
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.article-card:hover .article-image img {
  transform: scale(1.1);
}

.article-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card:hover .article-overlay {
  opacity: 1;
}

.overlay-actions {
  display: flex;
  gap: 1rem;
}

.action-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0 !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
}

.action-btn:before,
.action-btn:after {
  content: '' !important;
  font-size: 0 !important;
}

.action-btn * {
  font-size: 0 !important;
}

.action-btn i {
  font-size: 14px !important;
  text-indent: 0 !important;
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
}

@media (max-width: 767px) {
  .action-btn {
    width: 35px;
    height: 35px;
  }
  
  .action-btn i {
    font-size: 12px;
  }
}

.action-btn:hover {
  background: var(--primary-green);
  border-color: var(--primary-green);
  transform: scale(1.1);
}

.action-btn.bookmarked {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
}

.article-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

@media (max-width: 767px) {
  .article-content {
    padding: 1rem;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.category-tag {
  padding: 4px 8px;
  border-radius: 15px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
  color: white;
}

@media (max-width: 767px) {
  .category-tag {
    padding: 3px 6px;
    font-size: 0.6rem;
  }
}

.category-tag.agriculture { 
  background: var(--agriculture-color);
  border-color: var(--agriculture-color);
}
.category-tag.trade { 
  background: var(--trade-color);
  border-color: var(--trade-color);
}
.category-tag.market-insights { 
  background: var(--market-insights-color);
  border-color: var(--market-insights-color);
}
.category-tag.success-stories { 
  background: var(--success-stories-color);
  border-color: var(--success-stories-color);
}
.category-tag.technology { 
  background: var(--technology-color);
  border-color: var(--technology-color);
}
.category-tag.sustainability { 
  background: var(--sustainability-color);
  border-color: var(--sustainability-color);
}

.article-title {
  margin-bottom: 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  transition: var(--transition-smooth);
  cursor: pointer;
}

@media (max-width: 767px) {
  .article-title {
    font-size: 0.9rem;
    line-height: 1.2;
  }
}

.article-title:hover {
  color: var(--primary-green);
}

.article-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

@media (max-width: 767px) {
  .article-excerpt {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    margin-bottom: 0.75rem;
  }
}

/* MOBILE RESPONSIVE: Hide article footer on mobile */
@media (max-width: 767px) {
  .article-footer {
    display: none !important;
  }
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(5, 84, 64, 0.1);
  margin-bottom: 1rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-green), var(--accent-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(5, 84, 64, 0.2);
}

@media (max-width: 767px) {
  .author-avatar {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
  }
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8rem;
}

@media (max-width: 767px) {
  .author-name {
    font-size: 0.7rem;
  }
}

.article-date {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

@media (max-width: 767px) {
  .article-date {
    font-size: 0.6rem;
  }
}

.article-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.7rem;
}

@media (max-width: 767px) {
  .article-stats .stat-item {
    font-size: 0.6rem;
  }
}

.article-stats .stat-item i {
  color: var(--primary-green);
  font-size: 0.6rem;
}

.read-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.7rem;
}

/* ===== READ MORE BUTTON SECTION ===== */
.read-more-section {
  margin-top: auto;
  padding-top: 1rem;
}

.read-more-btn {
  background: linear-gradient(135deg, var(--primary-green), var(--accent-orange));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  width: 100%;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(5, 84, 64, 0.2);
}

@media (max-width: 767px) {
  .read-more-btn {
    padding: 8px 16px;
    font-size: 0.75rem;
    gap: 6px;
  }
}

.read-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(5, 84, 64, 0.3);
  background: linear-gradient(135deg, var(--accent-orange), var(--primary-green));
}

.read-more-btn i {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.read-more-btn:hover i {
  transform: translateX(3px);
}

.load-more-section {
  margin-top: 4rem;
}

.load-more-btn {
  background: var(--background-white);
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
  padding: 15px 30px;
  border-radius: var(--border-radius-xl);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(5, 84, 64, 0.1);
}

.load-more-btn:hover {
  background: var(--primary-green);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(5, 84, 64, 0.3);
}

.load-more-btn.btn-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ===== RESULTS COUNT ===== */
.results-count {
  text-align: center;
  margin: 1rem 0 2rem 0;
  padding: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== ARTICLE MODAL - FIXED IMAGE SIZE ===== */
.modal-xl {
  max-width: 90%;
  margin: 1rem auto;
}

@media (min-width: 1200px) {
  .modal-xl {
    max-width: 1140px;
  }
}

.modal-header {
  border-bottom: 1px solid rgba(5, 84, 64, 0.1);
  padding: 1.5rem 2rem;
}

.modal-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-body {
  padding: 2rem;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  border-top: 1px solid rgba(5, 84, 64, 0.1);
  padding: 1rem 2rem;
  justify-content: space-between;
}

.article-actions {
  display: flex;
  gap: 1rem;
}

.btn-outline-primary {
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.btn-outline-primary:hover {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.btn-outline-secondary {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background-color: var(--text-secondary);
  border-color: var(--text-secondary);
}

/* Fixed Article Modal Image Size */
.article-modal-image {
  max-height: 400px;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.article-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(5, 84, 64, 0.15);
}

.article-modal-content .article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-modal-content .category-tag {
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

.article-modal-content .date-tag,
.article-modal-content .read-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 6px 12px;
  background: rgba(5, 84, 64, 0.1);
  border-radius: 15px;
}

/* ===== TAGS SECTION ===== */
.tags-section {
  padding: 100px 0;
  background: var(--background-light);
  position: relative;
  overflow: hidden;
}

.tags-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 30% 70%, rgba(5, 84, 64, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(232, 136, 36, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.tags-section .container {
  position: relative;
  z-index: 2;
}

.tags-section .section-header {
  margin-bottom: 4rem;
  text-align: center;
}

.tags-section .section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 84, 64, 0.1);
  border: 1px solid rgba(5, 84, 64, 0.2);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(5, 84, 64, 0.1);
  backdrop-filter: blur(10px);
}

.tags-section .section-badge i {
  font-size: 0.8rem;
  color: var(--accent-orange);
  animation: tagPulse 2s infinite;
}

@keyframes tagPulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    opacity: 0.8;
  }
}

.tags-section .section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.2;
  text-align: center;
  position: relative;
}

.tags-section .section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-orange));
  border-radius: 2px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(5, 84, 64, 0.1);
  border-radius: 25px;
  box-shadow: 0 15px 35px rgba(5, 84, 64, 0.1);
  position: relative;
  overflow: hidden;
}

.tags-cloud::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.tag-item {
  background: var(--background-white);
  border: 2px solid rgba(5, 84, 64, 0.15);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 25px;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(5, 84, 64, 0.08);
  position: relative;
  overflow: hidden;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.3px;
  backdrop-filter: blur(10px);
}

.tag-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-green), var(--accent-orange));
  transition: left 0.4s ease;
  z-index: -1;
}

.tag-item.small {
  padding: 10px 18px;
  font-size: 0.85rem;
  border-width: 1.5px;
}

.tag-item.medium {
  padding: 12px 22px;
  font-size: 1rem;
  border-width: 2px;
  font-weight: 700;
}

.tag-item.large {
  padding: 14px 26px;
  font-size: 1.15rem;
  border-width: 2.5px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(5, 84, 64, 0.12);
}

.tag-item:hover,
.tag-item.active {
  color: white;
  border-color: var(--accent-orange);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 30px rgba(232, 136, 36, 0.25);
  text-decoration: none;
}

.tag-item:hover::before,
.tag-item.active::before {
  left: 0;
}

/* Special styling for trending tags */
.tag-item:nth-child(1),
.tag-item:nth-child(4),
.tag-item:nth-child(8) {
  background: linear-gradient(135deg, rgba(5, 84, 64, 0.05), rgba(232, 136, 36, 0.05));
  border-color: var(--accent-orange);
  font-weight: 700;
}

.tag-item:nth-child(1):hover,
.tag-item:nth-child(4):hover,
.tag-item:nth-child(8):hover {
  transform: translateY(-8px) scale(1.08);
  box-shadow: 0 15px 35px rgba(232, 136, 36, 0.3);
}

/* Mobile responsive tags */
@media (max-width: 768px) {
  .tags-cloud {
    gap: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
  }

  .tag-item.large {
    padding: 12px 20px;
    font-size: 1rem;
  }

  .tag-item.medium {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .tag-item.small {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-green);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(5, 84, 64, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-orange);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 15px 35px rgba(232, 136, 36, 0.4);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(5, 84, 64, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(5, 84, 64, 0.4);
  }
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-200px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes rippleEffect {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out;
}

.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease-out;
}

.animate-in {
  animation: fadeInUp 0.8s ease-out;
}

.count-up {
  animation: countUp 0.8s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */

/* ===== TABLET (768px - 991px) ===== */
@media (max-width: 991.98px) {
  .page-hero-section {
    padding: 120px 0 60px;
    min-height: 40vh;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  .featured-article-section,
  .blog-categories-section,
  .blog-articles-section,
  .tags-section {
    padding: 60px 0;
  }

  .featured-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .featured-stats {
    justify-content: flex-start;
  }

  .featured-article-card:hover {
    transform: translateY(-10px) rotateX(1deg) rotateY(1deg);
  }
}

/* ===== MOBILE (max-width: 767px) ===== */
@media (max-width: 767.98px) {
  .page-hero-section {
    padding: 100px 0 50px;
    min-height: 35vh;
  }
  
  .page-title {
    font-size: 2.5rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .featured-article-section,
  .blog-categories-section,
  .blog-articles-section,
  .tags-section {
    padding: 50px 0;
  }

  .featured-content {
    padding: 2rem 1.5rem;
  }

  .featured-title {
    font-size: 1.8rem;
  }

  .featured-excerpt {
    font-size: 1rem;
  }

  .filter-tabs {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .featured-article-card:hover {
    transform: translateY(-8px);
  }

  .featured-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .featured-read-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}

/* ===== SMALL MOBILE (max-width: 575px) ===== */
@media (max-width: 575.98px) {
  .page-hero-section {
    padding: 90px 0 40px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .featured-content {
    padding: 1.5rem 1rem;
  }

  .featured-title {
    font-size: 1.5rem;
  }

  .featured-excerpt {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .modal-xl {
    max-width: 95%;
    margin: 0.5rem auto;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .featured-meta {
    gap: 0.5rem;
  }

  .featured-actions {
    gap: 1.5rem;
  }
}

/* ===== OWL CAROUSEL CUSTOMIZATION ===== */
.owl-carousel .owl-nav {
  margin-top: 20px;
  text-align: center;
}

.owl-carousel .owl-nav button {
  background: var(--primary-green) !important;
  color: white !important;
  border-radius: 50% !important;
  width: 45px !important;
  height: 45px !important;
  font-size: 16px !important;
  margin: 0 10px !important;
  transition: all 0.3s ease !important;
}

.owl-carousel .owl-nav button:hover {
  background: var(--accent-orange) !important;
  transform: scale(1.1) !important;
}

.owl-carousel .owl-dots {
  text-align: center;
  margin-top: 20px;
}

.owl-carousel .owl-dots .owl-dot {
  display: inline-block;
  margin: 0 5px;
}

.owl-carousel .owl-dots .owl-dot span {
  width: 12px;
  height: 12px;
  background: rgba(5, 84, 64, 0.3);
  border-radius: 50%;
  display: block;
  transition: all 0.3s ease;
}

.owl-carousel .owl-dots .owl-dot.active span,
.owl-carousel .owl-dots .owl-dot:hover span {
  background: var(--primary-green);
  transform: scale(1.2);
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== KEYBOARD FOCUS STYLES ===== */
.keyboard-focus {
  outline: 2px solid var(--primary-green) !important;
  outline-offset: 2px !important;
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
.touch-device .categories-grid .category-card:active,
.touch-device .article-card:active,
.touch-device .filter-btn:active,
.touch-device .tag-item:active,
.touch-device .featured-article-card:active {
  transform: scale(0.98);
}

.touch-active {
  background: rgba(5, 84, 64, 0.05) !important;
  border-color: var(--primary-green) !important;
}

/* ===== PRINT STYLES ===== */
@media print {
  .page-hero-section {
    padding: 2rem 0 1rem;
  }

  section {
    padding: 2rem 0;
  }

  .tags-section {
    display: none;
  }

  .modal,
  .owl-carousel .owl-nav,
  .owl-carousel .owl-dots,
  .back-to-top,
  .filter-tabs,
  .load-more-section {
    display: none;
  }
  
  .article-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ===== LANGUAGE-SPECIFIC STYLES ===== */
.lang-ar .article-title,
.lang-ar .featured-title {
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

.lang-zh .article-title,
.lang-zh .featured-title {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

.lang-fr .article-title,
.lang-fr .featured-title {
  font-family: 'Marianne', 'Space Grotesk', sans-serif;
}

.lang-es .article-title,
.lang-es .featured-title {
  font-family: 'Inter', 'Space Grotesk', sans-serif;
}

/* Mobile text adjustments for specific languages */
.mobile-text-adjust.lang-ar {
  font-size: 1.05rem;
  line-height: 1.7;
}

.mobile-text-adjust.lang-zh {
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-green);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ===== ERROR STATES ===== */
.error-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.error-state i {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* ===== EMPTY STATES ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 4rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}