/* ==========================================
   CSS لصفحة المقال - article.php
   NiceChat - متعدد اللغات (English/Arabic)
   ========================================== */

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-green: #77bd20;
  --dark-green: #39a750;
  --text-color: #39a750;
  --gradient-green: linear-gradient(135deg, #77bd20, #39a750);
  --mysterious-gradient: linear-gradient(
    135deg,
    #000000,
    #1a3d2e,
    #39a750,
    #77bd20
  );
  --glow-green: #77bd20;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --shadow: rgba(57, 167, 80, 0.1);
  --dark-shadow: rgba(0, 0, 0, 0.3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #1a3d2e, #39a750);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-green);
  border-radius: 10px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #77bd20, #39a750);
}

/* تعريف خط Bahij TheSansArabic */
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/alfont_com_ArbFONTS-Bahij_TheSansArabic-Plain.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/ArbFONTS-Bahij_TheSansArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* حماية شاملة للخط - تطبيق على جميع العناصر */
* {
  font-family: inherit;
}

body,
html {
  font-family: "Bahij TheSansArabic", -apple-system, BlinkMacSystemFont,
    sans-serif !important;
}

/* تطبيق الخط على جميع الأزرار والنماذج */
button,
input,
textarea,
select,
.cta-button,
.hero-btn,
.form-btn,
.faq-question,
.nav-link,
.mobile-menu-btn,
.language-toggle,
.close {
  font-family: "Bahij TheSansArabic", -apple-system, BlinkMacSystemFont,
    sans-serif !important;
}

/* تطبيق على العربي والإنجليزي */
body[dir="rtl"] *,
body[dir="ltr"] * {
  font-family: "Bahij TheSansArabic", -apple-system, BlinkMacSystemFont,
    sans-serif !important;
}

body {
  font-family: "Bahij TheSansArabic", -apple-system, BlinkMacSystemFont,
    sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
  background: #000;
  position: relative;
  text-align: left;
}

/* Arabic Font Support */
body[dir="rtl"] {
  font-family: "Bahij TheSansArabic", -apple-system, BlinkMacSystemFont,
    sans-serif !important;
}

body[dir="rtl"] .content-body {
  text-align: justify;
}

/* Animated Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--mysterious-gradient);
  z-index: -2;
  animation: backgroundShift 25s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="g1"><stop offset="0%" stop-color="%2377bd20" stop-opacity="0.15"/><stop offset="100%" stop-color="%2377bd20" stop-opacity="0"/></radialGradient><radialGradient id="g2"><stop offset="0%" stop-color="%2339a750" stop-opacity="0.08"/><stop offset="100%" stop-color="%2339a750" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="400" fill="url(%23g1)" opacity="0.8"><animate attributeName="cx" values="200;800;200" dur="35s" repeatCount="indefinite"/><animate attributeName="cy" values="200;600;200" dur="30s" repeatCount="indefinite"/></circle><circle cx="800" cy="800" r="350" fill="url(%23g2)" opacity="0.6"><animate attributeName="cy" values="800;200;800" dur="28s" repeatCount="indefinite"/><animate attributeName="r" values="350;500;350" dur="32s" repeatCount="indefinite"/></circle><circle cx="500" cy="500" r="450" fill="url(%23g1)" opacity="0.4"><animate attributeName="r" values="450;650;450" dur="40s" repeatCount="indefinite"/><animate attributeName="cx" values="500;300;500" dur="25s" repeatCount="indefinite"/></circle></svg>')
    center/cover;
  z-index: -1;
  opacity: 0.7;
}

@keyframes backgroundShift {
  0%,
  100% {
    background: linear-gradient(
      135deg,
      #000000 0%,
      #1a3d2e 25%,
      #39a750 75%,
      #77bd20 100%
    );
  }
  25% {
    background: linear-gradient(
      225deg,
      #082611 0%,
      #1a3d2e 35%,
      #39a750 65%,
      #77bd20 100%
    );
  }
  50% {
    background: linear-gradient(
      315deg,
      #000000 0%,
      #082611 30%,
      #1a3d2e 70%,
      #39a750 100%
    );
  }
  75% {
    background: linear-gradient(
      45deg,
      #1a3d2e 0%,
      #39a750 40%,
      #77bd20 80%,
      #39a750 100%
    );
  }
}

/* ==========================================
   HEADER STYLES
   ========================================== */
header {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(119, 189, 32, 0.2);
  box-shadow: 0 4px 30px rgba(119, 189, 32, 0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LTR Layout */
body[dir="ltr"] .header-container {
  flex-direction: row;
}

/* RTL Layout */
body[dir="rtl"] .header-container {
  flex-direction: row-reverse;
}

.logo {
  cursor: pointer;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(119, 189, 32, 0.5));
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px rgba(119, 189, 32, 0.8));
}

.logo img {
  height: clamp(60px, 7vw, 90px);
  width: auto;
  max-width: clamp(200px, 35vw, 350px);
  object-fit: contain;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 5px;
}

.logo-text {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--primary-green);
  text-shadow: 0 0 10px rgba(119, 189, 32, 0.3);
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

body[dir="rtl"] .nav-menu {
  flex-direction: row-reverse;
}

.nav-link {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  padding: 0.8rem 0 0.5rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border-bottom: 3px solid transparent;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px; /* ✅ تم تقليل المسافة من 0 إلى 2px */
  width: 0;
  height: 3px;
  background: var(--gradient-green);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(119, 189, 32, 0.5);
  border-radius: 2px;
}

body[dir="ltr"] .nav-link::after {
  left: 0; /* ✅ للإنجليزي من اليسار */
}

body[dir="rtl"] .nav-link::after {
  right: 0; /* ✅ للعربي من اليمين */
}

.nav-link:hover,
.nav-link.active {
  color: var(--glow-green);
  text-shadow: 0 0 15px rgba(119, 189, 32, 0.8);
  border-bottom: 3px solid var(--primary-green);
}

.cta-button {
  background: var(--gradient-green);
  color: var(--white);
  padding: 1rem 2rem;
  border: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.4s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(119, 189, 32, 0.4);
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 35px rgba(119, 189, 32, 0.6);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

body[dir="rtl"] .header-actions {
  flex-direction: row-reverse;
}

.language-toggle {
  background: rgba(119, 189, 32, 0.1);
  border: 1px solid rgba(119, 189, 32, 0.3);
  border-radius: 25px;
  padding: 0.6rem 1.2rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.language-toggle:hover {
  background: rgba(119, 189, 32, 0.2);
  border-color: rgba(119, 189, 32, 0.5);
  transform: translateY(-2px);
}

.globe-icon {
  width: 20px;
  height: 20px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  color: var(--primary-green);
  transform: scale(1.1);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: 2rem;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  display: block;
  transform: translateY(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

.mobile-nav-links .nav-link {
  font-size: 1.2rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(119, 189, 32, 0.2);
}

/* ==========================================
   READING PROGRESS BAR
   ========================================== */
.reading-progress {
  position: fixed;
  top: clamp(70px, 12vh, 120px);
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #77bd20, #39a750);
  z-index: 1001;
  transition: width 0.1s ease;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */
.main-container {
  max-width: clamp(800px, 85vw, 1200px);
  margin: 0 auto;
  /* ✅ تم زيادة padding-top من 100px إلى 140px لإظهار زر العودة بالكامل */
  padding: clamp(140px, 18vh, 160px) clamp(15px, 3vw, 20px)
    clamp(40px, 8vh, 60px);
}

@media (max-width: 768px) {
  .main-container {
    /* ✅ زيادة padding-top للموبايل أيضاً */
    padding: 130px 20px 40px;
  }
}

@media (max-width: 480px) {
  .main-container {
    /* ✅ padding-top أكبر للشاشات الصغيرة جداً */
    padding: 120px 15px 30px;
  }
}
/* ==========================================
   BACK BUTTON
   ========================================== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-green);
  color: white;
  text-decoration: none;
  padding: clamp(10px, 1.5vw, 12px) clamp(15px, 2.5vw, 20px);
  border-radius: 30px;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(119, 189, 32, 0.3);
  margin-bottom: clamp(20px, 3vw, 25px);
}

body[dir="rtl"] .back-btn {
  flex-direction: row-reverse;
}

body[dir="rtl"] .back-btn i {
  transform: rotate(180deg);
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(119, 189, 32, 0.4);
}

/* ==========================================
   ARTICLE CONTAINER
   ========================================== */
.article-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: clamp(15px, 3vw, 25px);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(119, 189, 32, 0.1);
  border: 2px solid rgba(119, 189, 32, 0.1);
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-content {
  padding: clamp(25px, 5vw, 40px);
}

.article-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: clamp(20px, 3vw, 25px);
  line-height: 1.3;
  text-align: center;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2vw, 20px);
  font-size: clamp(0.8rem, 1.1vw, 0.9rem);
  color: #666;
  margin-bottom: clamp(25px, 4vw, 30px);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(119, 189, 32, 0.08);
  padding: clamp(8px, 1.5vw, 10px) clamp(12px, 2.5vw, 18px);
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.meta-item:hover {
  background: rgba(119, 189, 32, 0.12);
  transform: translateY(-1px);
}

.meta-item i {
  color: var(--primary-green);
}

/* ==========================================
   FEATURED IMAGE
   ========================================== */
.featured-image-container {
  position: relative;
  width: 100%;
  margin-bottom: clamp(25px, 4vw, 30px);
  border-radius: clamp(12px, 2.5vw, 20px);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(119, 189, 32, 0.1);
  background: #ffffff;
}

.featured-image {
  width: 100%;
  height: auto;
  max-height: clamp(300px, 45vh, 450px);
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
  background: #ffffff;
  padding: clamp(15px, 2.5vw, 20px);
}

.featured-image:hover {
  transform: scale(1.02);
}

/* ==========================================
   CONTENT BODY
   ========================================== */
.content-body {
  color: #444;
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  line-height: 1.8;
}

body[dir="ltr"] .content-body {
  text-align: left;
}

body[dir="rtl"] .content-body {
  text-align: justify;
}

.content-body h1,
.content-body h2 {
  color: var(--primary-green);
  font-weight: 700;
  margin: clamp(25px, 4vw, 35px) 0 clamp(15px, 2.5vw, 20px);
}

.content-body h1 {
  font-size: clamp(1.4rem, 2.8vw, 1.8rem);
  border-bottom: 3px solid var(--dark-green);
  padding-bottom: 8px;
}

.content-body h2 {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  border-bottom: 2px solid var(--primary-green);
  padding-bottom: 6px;
}

.content-body h3 {
  color: var(--dark-green);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  margin: clamp(20px, 3vw, 30px) 0 clamp(12px, 2vw, 15px);
}

.content-body p {
  margin-bottom: clamp(15px, 2.5vw, 20px);
}

.content-body ul,
.content-body ol {
  margin: clamp(15px, 2.5vw, 20px) 0;
}

body[dir="ltr"] .content-body ul,
body[dir="ltr"] .content-body ol {
  padding-left: clamp(20px, 3vw, 25px);
}

body[dir="rtl"] .content-body ul,
body[dir="rtl"] .content-body ol {
  padding-right: clamp(20px, 3vw, 25px);
}

.content-body li {
  margin-bottom: clamp(8px, 1.5vw, 10px);
  line-height: 1.7;
}

.content-body blockquote {
  background: linear-gradient(
    135deg,
    rgba(119, 189, 32, 0.1),
    rgba(57, 167, 80, 0.05)
  );
  padding: clamp(20px, 3vw, 25px);
  margin: clamp(20px, 3vw, 25px) 0;
  border-radius: 15px;
  font-style: italic;
  position: relative;
  box-shadow: 0 5px 20px rgba(119, 189, 32, 0.08);
}

body[dir="ltr"] .content-body blockquote {
  border-left: 4px solid var(--primary-green);
}

body[dir="rtl"] .content-body blockquote {
  border-right: 4px solid var(--primary-green);
}

.content-body blockquote::before {
  content: '"';
  font-size: clamp(40px, 8vw, 60px);
  color: var(--primary-green);
  position: absolute;
  top: -10px;
  font-family: serif;
  opacity: 0.3;
}

body[dir="ltr"] .content-body blockquote::before {
  left: 20px;
}

body[dir="rtl"] .content-body blockquote::before {
  right: 20px;
}

.content-body img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  margin: clamp(15px, 2.5vw, 20px) auto;
  box-shadow: 0 8px 25px rgba(119, 189, 32, 0.1);
  display: block;
  background: #ffffff;
  padding: clamp(12px, 2vw, 15px);
}

/* ==========================================
   ENHANCED SECTIONS
   ========================================== */
.enhanced-section {
  margin: clamp(25px, 4vw, 35px) 0;
  padding: clamp(20px, 3vw, 25px);
  background: rgba(255, 255, 255, 0.9);
  border-radius: clamp(12px, 2.5vw, 20px);
  border: 1px solid rgba(119, 189, 32, 0.08);
  box-shadow: 0 5px 20px rgba(119, 189, 32, 0.05);
}

.section-title {
  color: var(--primary-green);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  margin-bottom: clamp(15px, 2.5vw, 20px);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ==========================================
   VIDEO CONTAINER
   ========================================== */
.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(119, 189, 32, 0.15);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================
   IMAGES GALLERY
   ========================================== */
.images-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(clamp(200px, 40vw, 250px), 1fr)
  );
  gap: clamp(15px, 2.5vw, 20px);
}

.gallery-image {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(119, 189, 32, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-image:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 40px rgba(119, 189, 32, 0.2);
}

.gallery-image img {
  width: 100%;
  height: clamp(150px, 25vw, 220px);
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-image:hover img {
  transform: scale(1.05);
}

/* ==========================================
   SHARE BUTTONS
   ========================================== */
.share-buttons {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(clamp(140px, 30vw, 180px), 1fr)
  );
  gap: clamp(10px, 2vw, 15px);
  max-width: 700px;
  margin: 0 auto;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: clamp(10px, 1.5vw, 12px) clamp(12px, 2vw, 16px);
  border-radius: 30px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
}

.share-btn.facebook {
  background: linear-gradient(135deg, #3b5998, #8b9dc3);
}

.share-btn.twitter {
  background: linear-gradient(135deg, #1da1f2, #aab8c2);
}

.share-btn.linkedin {
  background: linear-gradient(135deg, #0077b5, #00a0dc);
}

.share-btn.whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.share-btn.copy {
  background: var(--gradient-green);
}

.share-btn.print {
  background: linear-gradient(135deg, #6c757d, #495057);
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* ==========================================
   RELATED ARTICLES
   ========================================== */
.related-section {
  margin-top: clamp(40px, 6vw, 50px);
  padding: clamp(30px, 5vw, 40px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: clamp(15px, 3vw, 25px);
  box-shadow: 0 15px 40px rgba(119, 189, 32, 0.1);
  border: 2px solid rgba(119, 189, 32, 0.1);
}

.related-title {
  color: var(--primary-green);
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: clamp(25px, 4vw, 30px);
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(clamp(280px, 45vw, 300px), 1fr)
  );
  gap: clamp(20px, 3vw, 25px);
}

.related-card {
  background: white;
  border-radius: clamp(12px, 2.5vw, 20px);
  overflow: hidden;
  transition: all 0.4s ease;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 25px rgba(119, 189, 32, 0.1);
  border: 1px solid #f0f0f0;
}

.related-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(119, 189, 32, 0.2);
}

.related-image {
  height: clamp(140px, 20vw, 180px);
  background: var(--gradient-green);
  position: relative;
  overflow: hidden;
}

.related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover .related-image img {
  transform: scale(1.05);
}

.related-content {
  padding: clamp(20px, 3vw, 25px);
}

.related-card-title {
  font-weight: 600;
  margin-bottom: 12px;
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.4;
  color: var(--primary-green);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-date {
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================
   LIGHTBOX
   ========================================== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  padding: clamp(15px, 2vw, 20px);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: clamp(15px, 2vw, 20px);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: clamp(35px, 6vw, 45px);
  height: clamp(35px, 6vw, 45px);
  border-radius: 50%;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  cursor: pointer;
  transition: all 0.3s ease;
}

body[dir="ltr"] .lightbox-close {
  right: clamp(15px, 2vw, 20px);
}

body[dir="rtl"] .lightbox-close {
  left: clamp(15px, 2vw, 20px);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* ==========================================
   MODAL STYLES
   ========================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  margin: clamp(2%, 3vh, 3%) auto;
  padding: 0;
  border-radius: clamp(20px, 4vw, 30px);
  width: clamp(300px, 85vw, 600px);
  position: relative;
  animation: modalSlideIn 0.4s ease-out;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(119, 189, 32, 0.3);
  box-shadow: 0 0 80px rgba(119, 189, 32, 0.3);
}

.modal-header {
  background: var(--gradient-green);
  color: white;
  padding: clamp(1.5rem, 3vw, 2rem) clamp(2rem, 4vw, 2.5rem);
  border-radius: clamp(20px, 4vw, 30px) clamp(20px, 4vw, 30px) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
}

.close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  cursor: pointer;
  padding: 0;
  width: clamp(30px, 6vw, 40px);
  height: clamp(30px, 6vw, 40px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg) scale(1.1);
}

.modal-body {
  padding: clamp(2rem, 4vw, 2.5rem);
}

.form-group {
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.form-label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: var(--white);
  font-size: clamp(1rem, 1.8vw, 1.1rem);
}

.form-input {
  width: 100%;
  padding: clamp(0.8rem, 1.5vw, 1rem) clamp(1.2rem, 2vw, 1.5rem);
  border: 2px solid rgba(119, 189, 32, 0.3);
  border-radius: 15px;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  transition: all 0.3s ease;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(10px);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 4px rgba(119, 189, 32, 0.2);
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
  margin-top: clamp(2rem, 4vw, 3rem);
  flex-wrap: wrap;
}

body[dir="rtl"] .form-buttons {
  flex-direction: row-reverse;
}

.form-btn {
  padding: clamp(0.8rem, 1.5vw, 1rem) clamp(1.5rem, 2.5vw, 2rem);
  border: none;
  border-radius: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  min-width: clamp(120px, 25vw, 140px);
}

.form-btn-primary {
  background: var(--gradient-green);
  color: white;
  box-shadow: 0 0 20px rgba(119, 189, 32, 0.3);
}

.form-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.form-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-60px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================
   FOOTER STYLES
   ========================================== */
footer {
  background: linear-gradient(135deg, #000, #1a1a1a);
  color: white;
  padding: clamp(3rem, 6vw, 4rem) clamp(1.5rem, 3vw, 2rem)
    clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid rgba(119, 189, 32, 0.2);
  margin-top: clamp(40px, 8vw, 60px);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(clamp(250px, 45vw, 280px), 1fr)
  );
  gap: clamp(2rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  text-align: center;
}

@media (min-width: 769px) {
  .footer-container {
    text-align: left;
  }

  body[dir="rtl"] .footer-container {
    text-align: right;
  }
}

.footer-section h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-green);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.footer-section p {
  line-height: 1.6;
  opacity: 0.9;
  font-size: clamp(0.9rem, 1.4vw, 1rem);
}

body[dir="ltr"] .footer-section p {
  text-align: left;
}

body[dir="rtl"] .footer-section p {
  text-align: justify;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 1rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  font-size: clamp(0.9rem, 1.4vw, 1rem);
}

.footer-links a:hover {
  color: var(--primary-green);
  text-shadow: 0 0 10px rgba(119, 189, 32, 0.3);
}

body[dir="ltr"] .footer-links a:hover {
  transform: translateX(-5px);
}

body[dir="rtl"] .footer-links a:hover {
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 2rem;
  text-align: center;
  color: #999;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
}

.footer-bottom a {
  color: var(--primary-green);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-bottom a:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(119, 189, 32, 0.5);
}

.social-links {
  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(35px, 6vw, 45px);
  height: clamp(35px, 6vw, 45px);
  background: rgba(119, 189, 32, 0.1);
  border-radius: 50%;
  transition: all 0.4s ease;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.social-links a:hover {
  background: var(--gradient-green);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 25px rgba(119, 189, 32, 0.4);
}

.social-links svg {
  width: clamp(16px, 3vw, 20px);
  height: clamp(16px, 3vw, 20px);
  fill: #fff;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu {
    display: block;
  }

  .header-container {
    padding: 1rem;
  }

  .main-container {
    padding: 120px 20px 40px;
  }

  .article-content {
    padding: 30px 25px;
  }

  .article-meta {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .share-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .images-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.8rem 1rem;
  }

  .logo img {
    height: 55px;
    max-width: 200px;
  }

  .main-container {
    padding: 110px 15px 30px;
  }

  .article-content {
    padding: 25px 20px;
  }

  .share-buttons {
    grid-template-columns: 1fr;
  }

  .images-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
  }

  .form-buttons {
    flex-direction: column;
  }

  .form-btn {
    width: 100%;
  }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
  header,
  .back-btn,
  .enhanced-section:has(.share-buttons),
  .related-section,
  .reading-progress,
  .mobile-menu,
  .language-toggle {
    display: none !important;
  }

  body::before,
  body::after {
    display: none !important;
  }

  * {
    background: white !important;
    color: black !important;
  }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
