/* ========== Articles Page Styles ========== */

/* Hero Section */
.articles-hero {
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 50%, #90e0ef 100%);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.articles-hero::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.articles-hero::after {
  content: "";
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite reverse;
}

.hero-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--white);
  clip-path: ellipse(75% 100% at 50% 100%);
}

.articles-hero .hero-content {
  position: relative;
  z-index: 2;
}

.articles-hero .badge {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.articles-hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Active Nav Link */
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  width: 100%;
}

/* Articles Section */
.articles-section {
  background: var(--bg-light);
  min-height: 50vh;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 35px;
}

/* Article Card */
.article-card {
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.article-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 60px rgba(0, 119, 182, 0.2);
}

.article-card:hover::before {
  transform: scaleX(1);
}

/* Article Image */
.article-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f4f8 0%, #f8fbff 100%);
}

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

.article-card:hover .article-image img {
  transform: scale(1.08);
}

.article-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f4f8 0%, #caf0f8 100%);
}

.article-image-placeholder i {
  font-size: 4rem;
  color: var(--secondary);
  opacity: 0.6;
}

/* Article Date Badge */
.article-date-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.article-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

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

.article-summary {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Read More Button */
.article-read-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(0, 119, 182, 0.1) 0%, rgba(0, 180, 216, 0.1) 100%);
  color: var(--primary);
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.article-read-more i {
  transition: transform 0.3s ease;
}

.article-read-more:hover {
  background: var(--gradient-1);
  color: var(--white);
  box-shadow: 0 8px 25px rgba(0, 119, 182, 0.3);
}

.article-read-more:hover i {
  transform: translateX(-5px);
}

/* Loading State */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 0;
}

.loading-spinner {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(0, 119, 182, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner p {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 600;
}

/* Empty State */
.empty-state,
.error-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.empty-state i,
.error-state i {
  font-size: 5rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 25px;
  display: block;
}

.empty-state h3,
.error-state h3 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.empty-state p,
.error-state p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.pagination-btn {
  min-width: 48px;
  height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid rgba(0, 119, 182, 0.15);
  border-radius: 12px;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Cairo", sans-serif;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pagination-btn.active {
  background: var(--gradient-1);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 8px 25px rgba(0, 119, 182, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  padding: 0 20px;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Animations */
.article-card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.article-card:nth-child(1) {
  animation-delay: 0.1s;
}

.article-card:nth-child(2) {
  animation-delay: 0.2s;
}

.article-card:nth-child(3) {
  animation-delay: 0.3s;
}

.article-card:nth-child(4) {
  animation-delay: 0.4s;
}

.article-card:nth-child(5) {
  animation-delay: 0.5s;
}

.article-card:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer Logo Fix */
.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Hamburger Menu Styles ========== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 110;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.hamburger:hover {
  background: rgba(0, 119, 182, 0.1);
}

.hamburger-line {
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger Active State - X Animation */
.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive Design */
@media (max-width: 968px) {
  .hamburger {
    display: flex;
  }

  .mobile-menu-overlay {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 100px 30px 40px;
    gap: 0;
    z-index: 100;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 119, 182, 0.1);
  }

  .nav-links li:last-child {
    border-bottom: none;
    margin-top: 20px;
  }

  .nav-links a {
    display: block;
    padding: 18px 10px;
    font-size: 1.1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--primary);
    background: rgba(0, 119, 182, 0.05);
    padding-right: 20px;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links .btn-nav {
    display: block;
    text-align: center;
    padding: 16px 30px;
    background: var(--gradient-1);
    color: var(--white) !important;
    border-radius: 50px;
    margin-top: 10px;
  }

  .nav-links .btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 119, 182, 0.3);
    padding-right: 30px;
    background: var(--gradient-1);
  }
}

@media (max-width: 600px) {
  .articles-hero {
    padding: 100px 0 60px;
  }

  .articles-hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 20px;
  }

  .hero-decoration {
    height: 50px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article-image {
    height: 180px;
  }

  .article-content {
    padding: 22px;
  }

  .article-title {
    font-size: 1.2rem;
  }

  .pagination-container {
    gap: 8px;
  }

  .pagination-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    font-size: 0.9rem;
  }
}

/* Shimmer Loading Effect for Images */
.article-image-loading {
  background: linear-gradient(90deg,
      #e8f4f8 0%,
      #caf0f8 50%,
      #e8f4f8 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}