/* ==========================================================================
   1. Theme Variables
   ========================================================================== */
:root {
  --bg-main:             #060a07;
  --bg-card:             rgba(14, 22, 16, 0.7);
  --border-glass:        rgba(255, 255, 255, 0.05);
  --text-primary:        #e2e8f0;
  --text-muted:          #8fa394;
  --accent-neon:         #39ff14;
  --accent-glow:         rgba(57, 255, 20, 0.3);
  --accent-glow-intense: rgba(57, 255, 20, 0.7);
  --font-en:             'Space Grotesk', sans-serif;
  --font-ar:             'Cairo', sans-serif;
  --transition-speed:    0.3s;
}

/* ==========================================================================
   2. Reset & Global
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-en);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 80px;
}

body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background:
    radial-gradient(circle at 80% 20%, rgba(57, 255, 20, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(10, 35, 15, 0.15) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

html[dir="rtl"] body {
  font-family: var(--font-ar);
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   3. Navigation
   ========================================================================== */
.navbar {
  background: rgba(6, 10, 7, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  background: linear-gradient(to right, #ffffff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.lang-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-speed) ease;
}

.lang-btn:hover {
  background: var(--accent-neon);
  color: #000;
  border-color: var(--accent-neon);
  box-shadow: 0 0 15px var(--accent-glow);
  font-weight: 700;
}

/* ==========================================================================
   4. Layout
   ========================================================================== */
.main-container {
  max-width: 1300px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  flex-grow: 1;
}

@media (min-width: 992px) {
  .main-container {
    grid-template-columns: 1fr 1.2fr;
  }
}

.column-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent-neon);
  box-shadow: 0 0 10px var(--accent-neon);
  border-radius: 2px;
}

html[dir="rtl"] .section-title::after {
  left: auto;
  right: 0;
}

/* ==========================================================================
   5. Cards
   ========================================================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition:
    transform var(--transition-speed) cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(57, 255, 20, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(57, 255, 20, 0.1);
}

/* ==========================================================================
   6. About
   ========================================================================== */
.about-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
  text-align: justify;
}

/* ==========================================================================
   7. Contact
   ========================================================================== */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-icon-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-icon {
  font-size: 1.25rem;
  width: 42px;
  height: 42px;
  background: rgba(57, 255, 20, 0.1);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-speed) ease;
}

.contact-card:hover .card-icon {
  background: var(--accent-neon);
  color: #000;
  box-shadow: 0 0 15px var(--accent-glow-intense);
}

.card-details h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.15rem;
}

.card-details .handle {
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.btn-connect {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-connect:hover {
  background: var(--accent-neon);
  color: #000;
  border-color: var(--accent-neon);
  box-shadow: 0 0 15px var(--accent-glow);
  font-weight: 700;
}

@media (max-width: 400px) {
  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-connect {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   8. Book Showcase
   ========================================================================== */
.column-right {
  display: flex;
  flex-direction: column;
}

.showcase-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.showcase-content {
  display: flex;
  flex-direction: column;
}

.book-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 30%, var(--accent-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(57, 255, 20, 0.2);
}

html[dir="rtl"] .book-title {
  font-size: 2.4rem;
  letter-spacing: 0;
}

.book-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.4;
  border-left: 3px solid var(--accent-neon);
  padding-left: 0.75rem;
}

html[dir="rtl"] .book-subtitle {
  border-left: none;
  border-right: 3px solid var(--accent-neon);
  padding-left: 0;
  padding-right: 0.75rem;
}

.book-synopsis {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.6;
  text-align: justify;
  margin-bottom: 1.25rem;
}

.book-info-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(57, 255, 20, 0.15);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.info-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(57, 255, 20, 0.1);
  color: #a3ffb4;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(57, 255, 20, 0.2);
}

.price-tag {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px var(--accent-glow);
}

.order-instruction {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
}

.book-cover-container {
  width: 100%;
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-cover-placeholder {
  width: 100%;
  background: linear-gradient(135deg, rgba(14, 22, 16, 0.6) 0%, rgba(6, 10, 7, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0; /* أزلنا الـ padding لتعود الصورة بحجمها الكامل الفخم */
}

.book-mockup-img {
  width: 100%;
  height: auto;
  max-height: 550px; /* تم رفع الطول الأقصى ليعود الغلاف ضخماً وواضحاً على الـ Desktop */
  object-fit: cover; /* تجعل الغلاف يملأ المساحة بشكل انسيابي دون تمطيط */
  display: block;
  transition: transform var(--transition-speed) ease;
}

.showcase-card:hover .book-mockup-img {
  transform: scale(1.03); /* تأثير زووم رائع وتفاعلي */
}

/* ==========================================================================
   9. Footer
   ========================================================================== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.85rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border-glass);
  background: rgba(6, 10, 7, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.85rem;
  color: var(--text-muted);
  z-index: 999;
}

.footer p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
}

.footer-logo {
  height: 18px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-logo-link:hover .footer-logo {
  transform: scale(1.05);
  filter: drop-shadow(0 0 8px var(--accent-glow-intense));
}

/* ==========================================================================
   10. Responsive
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-bottom: 90px;
  }

  .main-container {
    margin: 1rem auto;
    gap: 1.5rem;
  }

  .card {
    padding: 1.25rem;
  }

  .book-title {
    font-size: 1.8rem;
  }

  html[dir="rtl"] .book-title {
    font-size: 2rem;
  }

  .book-mockup-img {
    max-height: 380px; /* حجم متناسق وتجاوبي ممتاز جداً لشاشات الموبايل */
  }
}