/* =========================
   القواعد العامة للموقع
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #ffffff;
  color: #1f2937;
  direction: rtl;
  line-height: 1.6;
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* =========================
   الأزرار
   ========================= */
.btn {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease,
    color 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.primary-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.secondary-btn {
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #e5e7eb;
}

.secondary-btn:hover {
  background: #e5e7eb;
  border-color: #10b981;
  color: #059669;
}

.subtle-btn {
  background: transparent;
  color: #6b7280;
  border-radius: 999px;
  padding-inline: 1.1rem;
  border: 1px solid #e5e7eb;
}

.subtle-btn:hover {
  background: #f9fafb;
  color: #059669;
  border-color: #10b981;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

/* =========================
   الهيدر
   ========================= */
.main-header {
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-content {
  padding-block: 1.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.site-logo:hover {
  transform: scale(1.05);
}

.site-logo-left {
  order: 1;
}

.header-text {
  flex: 1;
  order: 2;
  text-align: center;
}

.site-logo-right {
  order: 3;
}

.logos-mobile-wrapper {
  display: none;
}

.site-title {
  margin: 0 0 0.3rem;
  font-size: clamp(1.2rem, 1.5vw + 0.8rem, 1.6rem);
  letter-spacing: 0.03em;
  color: #065f46;
  font-weight: 700;
  white-space: nowrap;
}

.site-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
  text-align: center;
}

/* =========================
   القسم الرئيسي
   ========================= */
.main-content {
  min-height: calc(100vh - 140px);
  background: #fafafa;
}

.hero-section {
  padding-block: 2.3rem 1.4rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.hero-text h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: #065f46;
  font-weight: 700;
}

.hero-text p {
  margin: 0;
  color: #6b7280;
  max-width: 36rem;
  line-height: 1.7;
}

.cards-section {
  padding-block: 0 3rem;
  background: #ffffff;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.entity-card {
  background: #ffffff;
  border-radius: 1.4rem;
  padding: 1.4rem 1.4rem 1.2rem;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: cardFloatIn 0.6s ease forwards;
  transition: all 0.3s ease;
}

.entity-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: -1;
}

.entity-card:hover::before {
  opacity: 1;
}

.entity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.entity-card--disabled {
  opacity: 0.7;
  background: #f9fafb;
}

.entity-card--disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: #e5e7eb;
}

.card-icon {
  font-size: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 1px solid #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.card-body h3 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  color: #065f46;
  font-weight: 700;
}

.card-body p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.7;
}

.card-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.4rem;
}

/* =========================
   قسم التجمع
   ========================= */
.community-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.community-card .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.community-title {
  margin: 0;
  font-size: 1rem;
  color: #065f46;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.community-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #f9fafb;
  padding: 0.3rem;
  width: 100%;
  max-width: 200px;
}

.community-image {
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
  transition: transform 0.3s ease;
}

.community-image:hover {
  transform: scale(1.05);
}

/* =========================
   الفوتر
   ========================= */
.main-footer {
  border-top: 2px solid #e5e7eb;
  padding-block: 1.5rem 1.2rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 2rem;
}

.footer-content {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: flex-start;
  gap: 2rem;
  text-align: center;
  flex-wrap: nowrap;
}

.footer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.footer-label {
  margin: 0 0 0.2rem;
  color: #065f46;
  font-weight: 700;
  font-size: 0.9rem;
}

.footer-text {
  margin: 0;
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-link {
  color: #059669;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #047857;
  text-decoration: underline;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.footer-social-link:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.instagram-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* =========================
   استجابة الشاشات
   ========================= */
@media (max-width: 640px) {
  .header-content {
    padding-block: 1.2rem 0.7rem;
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
    align-items: center;
  }

  .site-title {
    font-size: clamp(0.9rem, 3vw + 0.5rem, 1.1rem);
    white-space: normal;
    line-height: 1.3;
  }

  .site-logo-left,
  .site-logo-right {
    display: none;
  }

  .logos-mobile-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    order: 2;
  }

  .site-logo-mobile {
    max-width: 60px;
    max-height: 60px;
    display: block;
  }

  .header-text {
    order: 1;
    width: 100%;
  }
}

  .hero-section {
    padding-block: 1.7rem 1rem;
  }

  .entity-card {
    padding: 1.2rem 1.1rem 1.1rem;
  }

  .footer-content {
    flex-direction: row;
    gap: 1rem;
    text-align: center;
    flex-wrap: wrap;
  }

  .footer-section {
    min-width: 150px;
    max-width: none;
    flex: 1 1 auto;
  }

  .footer-section {
    gap: 0.2rem;
  }

  .community-title {
    font-size: 0.9rem;
  }

  .community-image-wrapper {
    max-width: 150px;
  }
}

/* =========================
   حركات بسيطة
   ========================= */
@keyframes cardFloatIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
