/* Page Header – Sectors Directory */

/* Page visual depth */

.sectors-landing {
  padding-top: 8px;
}

/* ==================================================
   INTRO
================================================== */

.sectors-intro {
  margin-bottom: 0;
}

.sectors-intro__text {

  margin: 0;

  padding: 1.4rem 1.75rem;

  background:
    linear-gradient(
      135deg,
      #ffffff,
      #f8fcfc
    );

  border: 1px solid #dfe9ee;

  border-radius: 18px;

  color: #364152;

  line-height: 2;

  font-size: .98rem;

  box-shadow:
    0 8px 20px rgba(0,0,0,.03);
}

/* Sectors Landing – Phase 1 */

.sectors-landing {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* كرتين في الصف */
  gap: 20px;
}

.sectors-intro {

  grid-column: 1 / -1;
}

/* ===== Sector Card – Enhanced ===== */

.sector-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid #dfe9ee;
  transition: all 0.3s ease;
  
  box-shadow:
    0 8px 20px rgba(0,0,0,.03);
}

.sector-card::before {
  content: '';
  position: absolute;
  top: 18px;
  right: 0;
  width: 4px;
  height: 40px;
  background:#1fa38f;
  border-radius: 4px;
}

.sector-card:hover {
  transform: translateY(-3px);

  box-shadow:
    0 12px 28px rgba(0,0,0,.06);
}

.sectors-landing .sector-card span {
  position: relative;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 800;
  color:#1f3f4f;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 10px;
  background: linear-gradient(
    90deg,
    rgba(107, 90, 46, 0.18),
    rgba(15, 42, 68, 0.12)
  );
}

.sector-card:hover span {
  background: linear-gradient(
    90deg,
    rgba(107, 90, 46, 0.28),
    rgba(15, 42, 68, 0.2)
  );
}


.sector-card p {
  font-size: 14.5px;
  line-height: 1.7;
  color: #5a6a7a;
}


.sector-card__preview {
  position: relative;
  background: #ffffff;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color:#1fa38f;
  padding: 7px 18px;
  border-radius: 999px;
  border:1px solid #1fa38f;
  transition: all 0.25s ease;
  z-index: 1;
}

.sector-card__preview:hover {
  background:#1fa38f;
  border-color:#1fa38f;
  color: #ffffff;
}


/* Align preview button to the left */

.sector-card__action {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end; /* من اليسار */
  align-items: center;
  position: relative;
}

/* Gradient connector line */

.sector-card__action::before {
  content: '';
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    #47c2ad 0%,      /* ذهبي */
    #1fa38f 100%    
  );
  opacity: 0.35;
  top: 50%;
  transform: translateY(-50%);
}

.sector-card:hover .sector-card__action::before {
  opacity: 0.6;
}



/* Sectors page footer */

.sectors-footer {
  margin-top: .75rem;
  padding-top: 16px;
  border-top: 1px dashed #e0e0e0;
  position: relative;
}

.sectors-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 80px;
  height: 3px;
  background:#1fa38f; /* ضربة فرشاة */
}

.sectors-footer__note {
  font-size: 14px;
  color: #555;
  max-width: 800px;
  margin-bottom: 16px;
}

.sectors-footer__links {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.sectors-footer__links a {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  color: #6b5a2e;
  text-decoration: none;
  padding: 2px 6px;
  z-index: 1;
}

.sectors-footer__links a::before {
  content: '';
  position: absolute;
  left: -4px;
  bottom: 2px;
  width: calc(100% + 8px);
  height: 8px;
  background: rgba(107, 90, 46, 0.15); /* بني خفيف */
  transform: rotate(-2deg);
  z-index: -1;
  transition: all 0.25s ease;
}

.sectors-footer__links a:hover::before {
  height: 14px;
  background: rgba(15, 42, 68, 0.18); /* أزرق غامق خفيف */
  transform: rotate(1deg);
}

.sectors-footer__links a:hover {
  text-decoration: underline;
}

.sectors-footer__meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #777;
}


/* Mobile adjustments */

@media (max-width: 768px) {

  .sectors-landing {
    grid-template-columns: 1fr; /* كرت واحد */
    gap: 20px;
  }

  .sectors-header__title {
    font-size: 24px;
  }

  .sectors-footer__meta {
    flex-direction: column;
    gap: 6px;
  }

  .sectors-footer__links {
    flex-wrap: wrap;
    gap: 10px;
  }
}


/* ===== Bottom Bar ===== */

.sectors-bottom-bar {
  margin-top: 12px;
  background: #fafcfd;
  border-radius: 999px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #444;
}

.sectors-bottom-bar__center {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stars{
color:#1fa38f;
}

.sectors-bottom-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #0b3c5d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: #0b3c5d;
  color: #ffffff;
}


@media (max-width: 768px) {

      .sectors-bottom-bar {
        flex-direction: column;
        gap: 10px;
        border-radius: 18px;
      }
      
      .sectors-bottom-bar {
      text-align: center;
    }
    
    .sectors-bottom-bar__left,
    .sectors-bottom-bar__center,
    .sectors-bottom-bar__right {
      justify-content: center;
    }
}


/*====================================النافذة المنبثقة ==============*/

/* Modal header */

/* Modal Header – stacked layout */

.sector-modal__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 14px;
}

.sector-modal__avatar img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eef1f4;
  margin-bottom: 6px;
}

.sector-modal__name {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color:#1f3f4f;
}

.sector-modal__title {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}


/* Contact info */

.sector-modal__contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
}

.sector-modal__link {
  font-size: 13px;
  color: #0b3c5d;
  text-decoration: underline;
}

.sector-modal__contact a[href^="mailto"] {
  text-decoration: none;
  color: #374151;
  cursor: default;
}



/* Modal dividers */

.sector-modal__divider {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #e5e7eb,
    transparent
  );
  margin: 14px 0; /* تقليل المسافات */
}


/* Departments section */

.sector-modal__departments {
  margin-bottom: 4px;
  padding: 6px 0;
}

.sector-modal__departments {
  max-height: 180px;
  overflow-y: auto;
  padding-left: 4px;
}

/* Scrollbar – subtle */

.sector-modal__departments::-webkit-scrollbar {
  width: 6px;
}

.sector-modal__departments::-webkit-scrollbar-thumb {
  background: rgba(107, 90, 46, 0.35);
  border-radius: 6px;
}

.sector-modal__departments::-webkit-scrollbar-track {
  background: transparent;
}


.sector-modal__section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px; /* تقليل */
  color:#1f3f4f;
}

.sector-modal__list {
  margin: 0;
  padding-right: 18px;
  font-size: 13.5px;
  color: #374151;
}

.sector-modal__list li {
  margin-bottom: 4px;
}


.sector-modal__section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  position: relative;
}

.sector-modal__section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: #0b3c5d;
  margin-top: 4px;
  opacity: 0.4;
}



/* Modal footer */

.sector-modal__footer {
  display: flex;
  justify-content: space-between; /* تفريق حقيقي */
  align-items: center;
  margin-top: 12px;
}


/* Primary action button */

.sector-modal__details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  background: #6b5a2e; /* بني مؤسسي */
  color: #ffffff;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.sector-modal__details:hover {
  background: #4f431f;
}


.sector-modal__close {
  background: none;
  border: none;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
}


.sector-modal__close:hover {
  color: #0b3c5d;
}

.sector-modal__footer {
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
}




/* Modal shell */

.sector-modal {
  position: fixed;
  inset: 0;
  display: none; /* سيتم تفعيله لاحقًا */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}


.sector-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 42, 68, 0.45);
}

.sector-modal__dialog {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 22px 24px;
  width: 100%;
  max-width: 520px;
  z-index: 1;
}



/* Modal visual enrichment */

.sector-modal__dialog {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #fafbfc 100%
  );
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  border: 1px solid #e6eaee;
}



@media (max-width: 768px) {

  .sector-modal__dialog {
    width: calc(100% - 24px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 18px 16px;
  }

  .sector-modal__departments {
    max-height: 140px;
  }

  .sector-modal__details {
    padding: 10px 22px;
    font-size: 14px;
  }
}


@media (max-width: 768px) {

  .sector-modal__dialog {
    margin: 0 auto;
    left: 0;
    right: 0;
    width: 92vw;
    max-height: 90vh;
  }
}
