/* Public course landing (pre-enrol) */
body.masaf-shop-course-landing #region-main > .box,
body.masaf-shop-course-landing .continuebutton {
  display: none !important;
}
.masaf-shop-content-locked {
  max-width: 720px;
  margin: 1.5rem auto 3rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #f4f6f8;
  color: #5c6570;
  text-align: center;
  }

/* ===== Student panel (Maktab-like) ===== */
body.masaf-shop-panel #page-header,
body.masaf-shop-panel .page-header-headings,
body.masaf-shop-panel #page-navbar {
  display: none !important;
}
body.masaf-shop-panel #region-main {
  padding-top: 0.75rem;
}

.masaf-panel {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  max-width: none; /* width from theme main-inner */
  margin: 0 auto 3rem;
  padding: 0 0 2rem; /* horizontal gutter from theme main-inner */
  text-align: start;
}

.masaf-panel-sidebar {
  position: sticky;
  top: 5.25rem;
  background: #fff;
  border: 1px solid #ececee;
  border-radius: 0.75rem;
  box-shadow: 0 4px 18px rgba(16, 24, 40, 0.06);
  overflow: hidden;
}

.masaf-panel-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1rem;
  border-bottom: 1px solid #f0f1f3;
}

.masaf-panel-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #f2f3f5;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.masaf-panel-profile-text {
  min-width: 0;
}

.masaf-panel-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1f26;
  line-height: 1.35;
  word-break: break-word;
}

.masaf-panel-sub {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #8a93a0;
  direction: ltr;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.masaf-panel-nav {
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0 0.55rem;
}

.masaf-panel-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 1rem;
  color: #374151 !important;
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  border: 0;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.masaf-panel-nav-link:hover {
  background: #f6f7f8;
  color: #111 !important;
}

.masaf-panel-nav-link.is-active {
  background: #e8f5f1;
  color: #0b6e4f !important;
  font-weight: 600;
}

.masaf-panel-nav-link.is-active::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 3px;
  border-radius: 999px;
  background: #0b6e4f;
}

.masaf-panel-nav-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  background-color: currentColor;
  opacity: 0.75;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.masaf-panel-nav-link.is-active .masaf-panel-nav-icon {
  opacity: 1;
}

.masaf-panel-nav-icon--book {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
}
.masaf-panel-nav-icon--chart {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 20V10'/%3E%3Cpath d='M12 20V4'/%3E%3Cpath d='M6 20v-6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 20V10'/%3E%3Cpath d='M12 20V4'/%3E%3Cpath d='M6 20v-6'/%3E%3C/svg%3E");
}
.masaf-panel-nav-icon--calendar {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
}
.masaf-panel-nav-icon--receipt {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l3-2 3 2 3-2 3 2 3-2 3 2V2l-3 2-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M8 10h8'/%3E%3Cpath d='M8 14h6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l3-2 3 2 3-2 3 2 3-2 3 2V2l-3 2-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M8 10h8'/%3E%3Cpath d='M8 14h6'/%3E%3C/svg%3E");
}
.masaf-panel-nav-icon--wallet {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z'/%3E%3Cpath d='M16 12h.01'/%3E%3Cpath d='M2 7l2.5-3.5h15L22 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z'/%3E%3Cpath d='M16 12h.01'/%3E%3Cpath d='M2 7l2.5-3.5h15L22 7'/%3E%3C/svg%3E");
}
.masaf-panel-nav-icon--user {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
.masaf-panel-nav-icon--bell {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
}
.masaf-panel-nav-icon--cog {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
}
.masaf-panel-nav-icon--logout {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
}

.masaf-panel-nav-link--logout {
  margin-top: 0.25rem;
  border-top: 1px solid #f0f1f3;
}

.masaf-panel-main {
  min-width: 0;
  background: #fff;
  border: 1px solid #ececee;
  border-radius: 0.75rem;
  box-shadow: 0 4px 18px rgba(16, 24, 40, 0.04);
  padding: 1.25rem 1.35rem 1.5rem;
}

.masaf-panel-main-head {
  margin: 0 0 1.15rem;
}

.masaf-panel-main-title {
  margin: 0 0 0.3rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1f26;
}

.masaf-panel-main-sub {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.masaf-panel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.4rem 0.95rem;
  border-radius: 0.5rem;
  background: #0b6e4f;
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
}

.masaf-panel-btn:hover {
  background: #095c42;
  color: #fff !important;
}

.masaf-account-overview-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid #eef0f3;
  border-radius: 0.65rem;
  background: #fafbfc;
  margin-bottom: 1rem;
}

.masaf-account-overview-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: #eef6f3;
  color: #0b6e4f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.masaf-account-overview-body {
  flex: 1;
  min-width: 0;
}

.masaf-account-overview-name {
  font-weight: 700;
  color: #1a1f26;
}

.masaf-account-overview-meta {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: #8a93a0;
  direction: ltr;
  text-align: start;
}

.masaf-account-quick {
  display: grid;
  gap: 0.55rem;
}

.masaf-account-quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border: 1px solid #eef0f3;
  border-radius: 0.6rem;
  background: #fff;
  color: #1a1f26 !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.9rem;
}

.masaf-account-quick-link:hover {
  border-color: #cfe5dc;
  background: #f4faf7;
  color: #0b6e4f !important;
}

.masaf-account-quick-go {
  color: #9aa3af;
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 900px) {
  .masaf-panel {
    grid-template-columns: 1fr;
  }
  .masaf-panel-sidebar {
    position: static;
  }
}

/* My courses grid (inside panel main) */
.masaf-mycourses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.masaf-mycourses-card {
  display: flex;
  flex-direction: column;
}
.masaf-mycourses-card .masaf-course-card-link {
  flex: 1;
}
.masaf-mycourses-detail {
  display: block;
  padding: 0.65rem 1rem 0.9rem;
  text-align: center;
  color: #0b6e4f;
  font-weight: 600;
  text-decoration: none;
  border-top: 1px solid #eef1f4;
}
.masaf-mycourses-detail:hover {
  background: #f4f7f5;
}
.masaf-mycourses-empty {
  max-width: 420px;
  margin: 2rem auto;
  text-align: center;
  color: #5c6570;
}

/* Legacy account hub styles removed — use .masaf-panel */

/* Public info pages (about / contact / faq / …) */
.masaf-info {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem 2rem;
  text-align: start;
}
.masaf-info-head {
  margin: 1.5rem 0 1.75rem;
}
.masaf-info-title {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 700;
  color: #1a1f26;
}
.masaf-info-lead {
  margin: 0;
  color: #5c6570;
  font-size: 1.05rem;
  line-height: 1.75;
}
.masaf-info-body p {
  margin: 0 0 1rem;
  color: #2c3440;
  line-height: 1.9;
  font-size: 1rem;
}
.masaf-info-contacts {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.masaf-info-contacts li {
  padding: 1rem 1.15rem;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #fff;
}
.masaf-info-contact-label {
  display: block;
  font-size: 0.85rem;
  color: #5c6570;
  margin-bottom: 0.25rem;
}
.masaf-info-contact-value {
  color: #0b6e4f;
  font-size: 1.05rem;
}
.masaf-info-faq {
  display: grid;
  gap: 0.75rem;
}
.masaf-info-faq-item {
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #fff;
  padding: 0.85rem 1.1rem;
}
.masaf-info-faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: #1a1f26;
  list-style: none;
}
.masaf-info-faq-item summary::-webkit-details-marker {
  display: none;
}
.masaf-info-faq-item p {
  margin: 0.75rem 0 0.25rem;
  color: #2c3440;
  line-height: 1.8;
}

/* Grades hub */
.masaf-grades {
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 0 1rem 2rem;
  text-align: start;
}
.masaf-grades-head {
  margin: 1.25rem 0 1.5rem;
}
.masaf-grades-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #1a1f26;
}
.masaf-grades-subtitle {
  margin: 0;
  color: #5c6570;
}
.masaf-grades-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.masaf-grades-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #fff;
  color: #1a1f26;
  text-decoration: none;
}
.masaf-grades-link:hover {
  border-color: #0b6e4f;
  background: #f4f7f5;
  color: #0b6e4f;
}
.masaf-grades-name {
  font-weight: 600;
}
.masaf-grades-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}
.masaf-grades-score {
  color: #8a93a0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.masaf-grades-score.has-score {
  color: #0b6e4f;
}
.masaf-grades-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0b6e4f;
}
.masaf-grades-empty {
  max-width: 420px;
  margin: 2rem auto;
  text-align: center;
  color: #5c6570;
}

/* Deadlines hub */
.masaf-deadlines {
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 0 1rem 2rem;
  text-align: start;
}
.masaf-deadlines-head {
  margin: 1.25rem 0 1.5rem;
}
.masaf-deadlines-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #1a1f26;
}
.masaf-deadlines-subtitle {
  margin: 0;
  color: #5c6570;
}
.masaf-deadlines-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.masaf-deadlines-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #fff;
  color: #1a1f26;
  text-decoration: none;
}
.masaf-deadlines-link:hover {
  border-color: #0b6e4f;
  background: #f4f7f5;
  color: #0b6e4f;
}
.masaf-deadlines-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.masaf-deadlines-name {
  font-weight: 600;
}
.masaf-deadlines-course {
  font-size: 0.9rem;
  color: #5c6570;
  font-weight: 500;
}
.masaf-deadlines-when {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0b6e4f;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.masaf-deadlines-empty {
  max-width: 420px;
  margin: 2rem auto;
  text-align: center;
  color: #5c6570;
}

/* Faradars-like public course landing */
.masaf-course-landing {
  text-align: start;
  margin: 0 auto 3rem;
  padding: 0 1rem 2rem;
}
.masaf-course-landing-inner {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  gap: 1.75rem;
}
.masaf-course-landing-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.masaf-course-landing-meta-item {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #f4f7f5;
  border: 1px solid #e3ece7;
}
.masaf-course-landing-meta-label {
  display: block;
  font-size: 0.8rem;
  color: #5c6570;
  margin-bottom: 0.25rem;
}
.masaf-course-landing-meta-item strong {
  color: #1a1f26;
  font-size: 1rem;
}
.masaf-course-landing-meta-link {
  color: #0b6e4f;
  text-decoration: none;
  font-weight: 700;
}
.masaf-course-landing-meta-link:hover {
  text-decoration: underline;
}
.masaf-course-landing-video,
.masaf-course-landing-video-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #d7ebe2 0%, #eef3f0 55%, #f7faf8 100%);
}
.masaf-course-landing-video iframe,
.masaf-course-landing-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  background: #0b1f18;
}
.masaf-course-landing-video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5c6570;
  font-weight: 600;
}
.masaf-course-landing-about h2,
.masaf-course-landing-teacher h2,
.masaf-course-landing-syllabus h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #1a1f26;
}
.masaf-course-landing-about-body {
  color: #2c3440;
  line-height: 1.8;
}
.masaf-course-landing-teacher-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e3ece7;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7faf8 0%, #fff 70%);
}
.masaf-course-landing-teacher-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e7f6ef;
}
.masaf-course-landing-teacher-copy {
  min-width: 0;
  flex: 1;
}
.masaf-course-landing-teacher-name {
  display: inline-block;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #12352a;
  text-decoration: none;
}
a.masaf-course-landing-teacher-name:hover {
  color: #0b6e4f;
  text-decoration: underline;
}
.masaf-course-landing-teacher-bio,
.masaf-course-landing-accessnote {
  color: #5c6570;
  margin: 0;
  line-height: 1.7;
}
.masaf-course-landing-teacher-more {
  display: inline-flex;
  margin-top: 0.55rem;
  color: #0b6e4f;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}
.masaf-course-landing-teacher-more:hover {
  text-decoration: underline;
}
.masaf-course-landing-accessnote {
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
}
.masaf-course-landing-sections {
  display: grid;
  gap: 0.65rem;
}
.masaf-course-landing-section {
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.masaf-course-landing-section > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  font-weight: 600;
  color: #1a1f26;
}
.masaf-course-landing-section > summary::-webkit-details-marker {
  display: none;
}
.masaf-course-landing-section-count {
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #e7f6ef;
  color: #0b6e4f;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.masaf-course-landing-lessons {
  list-style: none;
  margin: 0;
  padding: 0 1.1rem 0.85rem;
  border-top: 1px solid #eef1f4;
}
.masaf-course-landing-lessons li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f2f4f7;
  color: #2c3440;
}
.masaf-course-landing-lessons li:last-child {
  border-bottom: 0;
}
.masaf-course-landing-lesson-lock,
.masaf-course-landing-lesson-open {
  flex-shrink: 0;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.masaf-course-landing-lesson-lock {
  color: #8a93a0;
  background: #f4f6f8;
}
.masaf-course-landing-lesson-open {
  color: #0b6e4f;
  background: #e7f6ef;
}
a.masaf-course-landing-lesson-name {
  color: #0b6e4f;
  font-weight: 600;
  text-decoration: none;
}
a.masaf-course-landing-lesson-name:hover {
  text-decoration: underline;
}
@media (max-width: 576px) {
  .masaf-course-landing-meta {
    grid-template-columns: 1fr;
  }
  .masaf-course-landing-lessons li {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Masaf shop — RTL commerce surfaces */
.masaf-shop {
  max-width: 960px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
  text-align: start;
  font-family: inherit;
}
.masaf-shop-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
  color: #12352a;
}
.masaf-shop-subtitle {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
}
.masaf-shop-empty {
  padding: 2.5rem 1.25rem;
  color: #5c6570;
  border: 1px dashed rgba(11, 110, 79, 0.25);
  border-radius: 1rem;
  background: #f7faf8;
  text-align: center;
}
.masaf-shop-empty-text {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.masaf-shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 900px) {
  .masaf-shop-layout {
    grid-template-columns: minmax(0, 1fr) 18.5rem;
  }
  .masaf-shop-summary {
    position: sticky;
    top: 5.25rem;
    margin-top: 0;
  }
}
.masaf-shop-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.masaf-shop-line {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.9rem 1rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(11, 110, 79, 0.12);
  border-radius: 1rem;
  background: #fff;
}
.masaf-shop-line-media {
  display: block;
  width: 7.5rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.65rem;
  overflow: hidden;
  background: linear-gradient(145deg, #d9efe6 0%, #eef7f2 100%);
  flex-shrink: 0;
}
.masaf-shop-line-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.masaf-shop-line-media.is-placeholder {
  background: linear-gradient(145deg, #cfe8dc 0%, #e8f4ee 55%, #f7faf8 100%);
}
.masaf-shop-line-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.masaf-shop-line-name {
  color: #1a1f26;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.45;
}
a.masaf-shop-line-name:hover,
a.masaf-shop-line-name:focus {
  color: #0b6e4f;
  text-decoration: underline;
}
.masaf-shop-line-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
}
.masaf-shop-price {
  font-weight: 700;
  color: #0b6e4f;
}
.masaf-shop-price-old {
  text-decoration: line-through;
  color: #8a93a0;
  font-size: 0.9rem;
}
.masaf-shop-line-remove {
  color: #a33;
  font-size: 0.88rem;
  white-space: nowrap;
  width: fit-content;
  text-decoration: none;
  margin-top: 0.15rem;
}
.masaf-shop-line-remove:hover,
.masaf-shop-line-remove:focus {
  text-decoration: underline;
}
.masaf-shop-summary {
  margin-top: 0;
  padding: 1.25rem 1.15rem;
  background: #f7faf8;
  border: 1px solid rgba(11, 110, 79, 0.12);
  border-radius: 1rem;
}
.masaf-shop-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  color: #4d635a;
  font-size: 0.95rem;
}
.masaf-shop-summary-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #12352a;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(11, 110, 79, 0.14);
}
.masaf-shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.masaf-shop-btn-primary {
  background: #0b6e4f;
  color: #fff !important;
  width: 100%;
  margin-top: 1rem;
}
.masaf-shop-btn-primary:hover {
  background: #095c42;
  color: #fff !important;
}
.masaf-shop-btn-ghost {
  background: #fff;
  border: 1px solid rgba(11, 110, 79, 0.22);
  color: #12352a !important;
  margin-top: 0.75rem;
  width: 100%;
}
.masaf-shop-btn-ghost:hover {
  background: #f7faf8;
  color: #0b6e4f !important;
}
.masaf-shop-btn-inline {
  width: auto;
  margin-top: 0;
}
.masaf-shop-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  color: #12352a;
}
.masaf-shop-note {
  color: #5c6570;
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
  line-height: 1.6;
}
.masaf-shop-gateway-trigger {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(11, 110, 79, 0.14);
  border-radius: 1rem;
  background: #fff;
}
.masaf-shop-success {
  max-width: 640px;
}
.masaf-shop-success-card {
  padding: 2rem 1.5rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(11, 110, 79, 0.14);
  background: #fff;
  text-align: center;
}
.masaf-shop-success-card.is-success {
  background: linear-gradient(180deg, #f3faf7 0%, #fff 42%);
}
.masaf-shop-success-card.is-warning {
  background: linear-gradient(180deg, #fff8e8 0%, #fff 42%);
  border-color: rgba(166, 124, 0, 0.25);
}
.masaf-shop-success-mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  background: #0b6e4f;
  position: relative;
}
.masaf-shop-success-card.is-success .masaf-shop-success-mark::after {
  content: "";
  position: absolute;
  inset-inline-start: 1.05rem;
  top: 0.7rem;
  width: 0.55rem;
  height: 1.1rem;
  border: solid #fff;
  border-width: 0 0.22rem 0.22rem 0;
  transform: rotate(45deg);
}
.masaf-shop-success-card.is-warning .masaf-shop-success-mark {
  background: #a67c00;
}
.masaf-shop-success-card .masaf-shop-title {
  margin-top: 0.35rem;
}
.masaf-shop-success-message {
  margin: 0 0 0.75rem;
  color: #4d635a;
  line-height: 1.7;
}
.masaf-shop-success-meta {
  margin: 0 0 1.25rem;
  color: #5b7268;
}
.masaf-shop-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.masaf-shop-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}
.masaf-shop-invoice-letterhead {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(11, 110, 79, 0.12);
}
.masaf-shop-invoice-logo {
  height: 2.4rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
}
.masaf-shop-invoice-sitename {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0b6e4f;
}
.masaf-shop-invoice-letterhead .masaf-shop-title {
  margin: 0;
  font-size: 1.45rem;
}
.masaf-shop-invoice-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0 0 1.25rem;
  padding: 0.95rem 1rem;
  border-radius: 0.85rem;
  background: #f7faf8;
  border: 1px solid rgba(11, 110, 79, 0.1);
}
.masaf-shop-invoice-meta-label {
  display: block;
  color: #5b7268;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}
.masaf-shop-order-list,
.masaf-shop-txn-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.masaf-shop-order-card {
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #fff;
}
.masaf-shop-order-head {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.masaf-shop-status-paid { color: #0b6e4f; }
.masaf-shop-status-pending { color: #a67c00; }
.masaf-shop-status-failed { color: #a33; }
.masaf-shop-wallet-balance {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.25rem;
  border-radius: 12px;
  background: #0b6e4f;
  color: #fff;
  margin-bottom: 1.5rem;
}
.masaf-shop-wallet-balance strong {
  font-size: 1.4rem;
}
.masaf-shop-topup-form label {
  display: block;
  margin-bottom: 0.35rem;
}
.masaf-shop-topup-form input[type="number"] {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #c5ced8;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}
.masaf-shop-alert-ok {
  background: #e7f6ef;
  color: #0b6e4f;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.masaf-shop-txn-list li {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e6e9ee;
  font-size: 0.9rem;
}
.masaf-navbar-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-inline-end: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  color: #1a1f26;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.masaf-navbar-cart:hover {
  background: #f0f3f6;
  color: #1a1f26;
}
.masaf-navbar-cart-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #0b6e4f;
  color: #fff;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media print {
  .no-print,
  .masaf-navbar,
  .masaf-bottomnav,
  #page-header,
  .secondary-navigation {
    display: none !important;
  }
  .masaf-shop-invoice {
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .masaf-shop-invoice-letterhead {
    border-color: #ccc;
  }
}
@media (max-width: 576px) {
  .masaf-shop-line {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.7rem;
  }
  .masaf-shop-line-media {
    width: 5.5rem;
  }
  .masaf-shop-txn-list li {
    grid-template-columns: 1fr;
  }
  .masaf-shop-success-actions {
    flex-direction: column;
  }
  .masaf-shop-success-actions .masaf-shop-btn {
    width: 100%;
  }
}

/* ===== Public teacher profile (Maktab-inspired) ===== */
body.masaf-teacher-page #page-header,
body.masaf-teacher-page .page-header-headings,
body.masaf-teacher-page #page-navbar {
  display: none !important;
}
body.masaf-teacher-page.limitedwidth #page.drawers .main-inner,
body.masaf-teacher-page #page.drawers .main-inner {
  max-width: var(--masaf-content-max, 1180px) !important;
  padding-inline: var(--masaf-gutter-x, 1.25rem);
}
body.masaf-teacher-page #region-main {
  padding-top: 0;
  padding-inline: 0;
}

.masaf-teacher {
  margin: 0 auto 3rem;
  text-align: start;
  color: #1a1f26;
}

.masaf-teacher-hero {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(11, 110, 79, 0.1), transparent 55%),
    linear-gradient(180deg, #eef6f2 0%, #f7faf8 100%);
  border-bottom: 1px solid #e3ece7;
  padding: 1.75rem 1.25rem 1.5rem;
}

.masaf-teacher-hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.masaf-teacher-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.masaf-teacher-avatar-wrap {
  flex-shrink: 0;
}

.masaf-teacher-avatar {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  background: #d7ebe2;
  box-shadow: 0 10px 28px rgba(18, 53, 42, 0.12);
  border: 3px solid #fff;
}

.masaf-teacher-identity-text {
  min-width: 0;
  flex: 1;
}

.masaf-teacher-eyebrow {
  margin: 0 0 0.35rem;
}

.masaf-teacher-back {
  color: #5c6570;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.masaf-teacher-back:hover {
  color: #0b6e4f;
  text-decoration: underline;
}

.masaf-teacher-name {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.35;
  color: #12352a;
  letter-spacing: -0.02em;
}

.masaf-teacher-headline {
  margin: 0.35rem 0 0;
  color: #5b7268;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.masaf-teacher-socials {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.masaf-teacher-social {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.4rem;
  padding: 0.35rem 0.9rem 0.35rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(11, 110, 79, 0.14);
  background: rgba(11, 110, 79, 0.06);
  color: #0b6e4f;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.masaf-teacher-social:hover {
  background: rgba(11, 110, 79, 0.12);
  border-color: rgba(11, 110, 79, 0.28);
  transform: translateY(-1px);
}

.masaf-teacher-social-icon {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14V3zM5 5h6v2H7v10h10v-4h2v6H5V5z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14V3zM5 5h6v2H7v10h10v-4h2v6H5V5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.masaf-teacher-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.masaf-teacher-stat {
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(11, 110, 79, 0.1);
  box-shadow: 0 6px 18px rgba(18, 53, 42, 0.04);
}

.masaf-teacher-stat dt {
  margin: 0;
  color: #5c6570;
  font-size: 0.82rem;
  font-weight: 600;
}

.masaf-teacher-stat dd {
  margin: 0.25rem 0 0;
  color: #12352a;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.masaf-teacher-body {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 0;
  display: grid;
  gap: 2rem;
}

.masaf-teacher-about h2,
.masaf-teacher-courses h2 {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: #12352a;
}

.masaf-teacher-bio-preview {
  margin: 0;
  color: #2c3440;
  line-height: 1.85;
  font-size: 0.98rem;
}

.masaf-teacher-bio-full {
  display: none;
  color: #2c3440;
  line-height: 1.85;
  font-size: 0.98rem;
}

.masaf-teacher-bio-full p {
  margin: 0 0 0.85rem;
}

.masaf-teacher-bio-full p:last-child {
  margin-bottom: 0;
}

.masaf-teacher-bio[data-expanded="1"] .masaf-teacher-bio-preview {
  display: none;
}

.masaf-teacher-bio[data-expanded="1"] .masaf-teacher-bio-full {
  display: block;
}

.masaf-teacher-bio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  min-height: 2rem;
  padding: 0.25rem 0.75rem 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e6e9ee;
  background: #f4f6f8;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.masaf-teacher-bio-toggle:hover {
  background: #eef1f4;
  border-color: #d7dde5;
}

.masaf-teacher-bio-chevron {
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.15rem;
  transition: transform 0.15s ease;
}

.masaf-teacher-bio[data-expanded="1"] .masaf-teacher-bio-chevron {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.masaf-teacher-course-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.masaf-teacher-course-card {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  padding: 0.85rem;
  border: 1px solid #e8ecea;
  border-radius: 1rem;
  background: #fff;
  color: inherit;
  text-decoration: none !important;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.masaf-teacher-course-card:hover {
  border-color: rgba(11, 110, 79, 0.28);
  background: #f7faf8;
  box-shadow: 0 10px 24px rgba(18, 53, 42, 0.06);
  transform: translateY(-1px);
}

.masaf-teacher-course-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #eef3f0;
}

.masaf-teacher-course-media img,
.masaf-teacher-course-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.masaf-teacher-course-placeholder {
  background: linear-gradient(135deg, rgba(11, 110, 79, 0.18), rgba(11, 110, 79, 0.05) 55%, #dfece6);
}

.masaf-teacher-course-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.15rem 0.25rem 0.15rem 0;
}

.masaf-teacher-course-category {
  color: #0b6e4f;
  font-size: 0.78rem;
  font-weight: 700;
}

.masaf-teacher-course-title {
  margin: 0;
  color: #12352a;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
}

.masaf-teacher-course-card:hover .masaf-teacher-course-title {
  color: #0b6e4f;
}

.masaf-teacher-course-summary {
  margin: 0;
  color: #5b7268;
  font-size: 0.9rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.masaf-teacher-course-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding-top: 0.35rem;
}

.masaf-teacher-course-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #f2f4f7;
  color: #5c6570;
  font-size: 0.78rem;
  font-weight: 600;
}

.masaf-teacher-course-price {
  margin-inline-start: auto;
  color: #0b6e4f;
  font-weight: 800;
  font-size: 0.95rem;
}

.masaf-teacher-course-price.is-owned {
  color: #5b7268;
  font-weight: 600;
}

.masaf-teacher-course-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #0b6e4f;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.masaf-teacher-course-card.is-owned .masaf-teacher-course-cta,
.masaf-teacher-course-cta.is-owned {
  background: #e7f6ef;
  color: #0b6e4f;
}

.masaf-teacher-course-card.is-incart .masaf-teacher-course-cta,
.masaf-teacher-course-cta.is-incart {
  background: #fff;
  color: #0b6e4f;
  border: 1px solid rgba(11, 110, 79, 0.35);
}

.masaf-teacher-courses-empty {
  margin: 0;
  padding: 1.25rem;
  border-radius: 12px;
  background: #f4f6f8;
  color: #5c6570;
  text-align: center;
}

@media (min-width: 768px) {
  .masaf-teacher-hero {
    padding: 2.5rem 1.5rem 2rem;
  }

  .masaf-teacher-hero-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
  }

  .masaf-teacher-stats {
    min-width: 280px;
    grid-template-columns: 1fr;
  }

  .masaf-teacher-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
  }

  .masaf-teacher-stat dd {
    font-size: 1.7rem;
  }
}

@media (max-width: 720px) {
  .masaf-teacher-identity {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .masaf-teacher-avatar {
    width: 4.5rem;
    height: 4.5rem;
  }

  .masaf-teacher-course-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .masaf-teacher-course-media {
    aspect-ratio: 16 / 9;
  }

  .masaf-teacher-course-price {
    margin-inline-start: 0;
  }
}

/* ===== Course detail (Maktab-like 2-col) ===== */
body.masaf-course-detail #page-header,
body.masaf-course-detail .page-header-headings,
body.masaf-course-detail #page-navbar {
  display: none !important;
}
/* Same content width + side gutter as landing / catalog / shop panel. */
body.masaf-course-detail.limitedwidth #page.drawers .main-inner,
body.masaf-course-detail #page.drawers .main-inner {
  max-width: var(--masaf-content-max, 1180px) !important;
  padding-inline: var(--masaf-gutter-x, 1.25rem);
}
body.masaf-course-detail #region-main {
  padding-top: 0.35rem;
  padding-inline: 0;
}

.masaf-cd {
  max-width: none; /* width + side gutter from theme main-inner */
  margin: 0 auto 3rem;
  padding: 0 0 1rem;
  text-align: start;
  color: #1a1f26;
}

.masaf-cd-breadcrumbs {
  margin: 0 0 1rem;
}
.masaf-cd-breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.82rem;
  color: #6b7280;
}
.masaf-cd-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-inline-start: 0.5rem;
  color: #c4cad3;
}
.masaf-cd-breadcrumbs a {
  color: #0b6e4f;
  text-decoration: none;
  font-weight: 600;
}
.masaf-cd-breadcrumbs a:hover {
  text-decoration: underline;
}

.masaf-cd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 1.75rem 2rem;
  /* stretch so aside is as tall as main — required for sticky buy card */
  align-items: stretch;
}

.masaf-cd-header {
  margin-bottom: 1.15rem;
}
.masaf-cd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.masaf-cd-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.masaf-cd-badge--popular {
  background: #fde8ef;
  color: #b4235a;
}
.masaf-cd-badge--cert {
  background: #eef2f6;
  color: #475569;
}
.masaf-cd-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.35;
  color: #12352a;
  letter-spacing: -0.02em;
}
.masaf-cd-byline {
  margin: 0 0 0.65rem;
  color: #5b7268;
  font-size: 0.92rem;
}
.masaf-cd-byline a {
  color: #0b6e4f;
  font-weight: 700;
  text-decoration: none;
}
.masaf-cd-byline a:hover {
  text-decoration: underline;
}
.masaf-cd-lead {
  margin: 0;
  color: #4d635a;
  line-height: 1.8;
  font-size: 0.98rem;
}

.masaf-cd-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
  margin: 0 0 1.15rem;
  padding: 0.85rem;
  border: 1px solid #e6ebe8;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 53, 42, 0.04);
}
.masaf-cd-stat {
  padding: 0.35rem 0.5rem;
}
.masaf-cd-stat-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: #12352a;
  line-height: 1.3;
}
a.masaf-cd-stat-link {
  color: #0b6e4f;
  text-decoration: none;
}
a.masaf-cd-stat-link:hover {
  text-decoration: underline;
}
.masaf-cd-stat-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 600;
}

.masaf-cd-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 1.35rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e8ecea;
  position: sticky;
  top: 4.5rem;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
}
.masaf-cd-tabs a {
  color: #5b7268;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.masaf-cd-tabs a:hover {
  color: #0b6e4f;
  border-bottom-color: rgba(11, 110, 79, 0.35);
}

.masaf-cd-section {
  margin: 0 0 1.75rem;
}
.masaf-cd-section > h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #12352a;
}

.masaf-cd-outcomes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}
.masaf-cd-outcomes li {
  position: relative;
  padding: 0.35rem 0.25rem 0.35rem 0;
  padding-inline-start: 1.5rem;
  color: #2c3440;
  line-height: 1.65;
  font-size: 0.94rem;
}
.masaf-cd-outcomes li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: #0b6e4f;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.2 17.2 4.5 12.5l1.4-1.4 3.3 3.3 8.9-8.9 1.4 1.4z'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.2 17.2 4.5 12.5l1.4-1.4 3.3 3.3 8.9-8.9 1.4 1.4z'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
}

.masaf-cd-includes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.85rem;
}
.masaf-cd-includes li {
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: #f4f7f5;
  border: 1px solid #e3ece7;
  color: #2c3440;
  font-size: 0.88rem;
  font-weight: 600;
}

.masaf-cd-syllabus-meta,
.masaf-cd-accessnote {
  margin: 0 0 0.75rem;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.6;
}
.masaf-cd-sections {
  display: grid;
  gap: 0.55rem;
}
.masaf-cd-section-acc {
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.masaf-cd-section-acc > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.05rem;
  font-weight: 700;
  color: #1a1f26;
}
.masaf-cd-section-acc > summary::-webkit-details-marker {
  display: none;
}
.masaf-cd-section-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 600;
}
.masaf-cd-section-count {
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #e7f6ef;
  color: #0b6e4f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}
.masaf-cd-lessons {
  list-style: none;
  margin: 0;
  padding: 0 1.05rem 0.8rem;
  border-top: 1px solid #eef1f4;
}
.masaf-cd-lessons li {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f2f4f7;
  color: #2c3440;
  font-size: 0.9rem;
}
.masaf-cd-lessons li:last-child {
  border-bottom: 0;
}
.masaf-cd-lesson-icon {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  background: #c5d4cc;
}
.masaf-cd-lessons li.is-video .masaf-cd-lesson-icon {
  clip-path: polygon(20% 10%, 90% 50%, 20% 90%);
  background: #0b6e4f;
  border-radius: 0;
}
.masaf-cd-lessons li.is-quiz .masaf-cd-lesson-icon {
  border-radius: 999px;
  background: #64748b;
}
.masaf-cd-lesson-name {
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
a.masaf-cd-lesson-name {
  color: #0b6e4f;
}
a.masaf-cd-lesson-name:hover {
  text-decoration: underline;
}
.masaf-cd-lesson-dur {
  color: #8a93a0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.masaf-cd-lesson-lock,
.masaf-cd-lesson-open {
  font-size: 0.74rem;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}
.masaf-cd-lesson-lock {
  color: #8a93a0;
  background: #f4f6f8;
}
.masaf-cd-lesson-open {
  color: #0b6e4f;
  background: #e7f6ef;
}

.masaf-cd-about-body {
  color: #2c3440;
  line-height: 1.85;
}
.masaf-cd-teacher-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  border: 1px solid #e3ece7;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7faf8 0%, #fff 70%);
}
.masaf-cd-teacher-avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e7f6ef;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(18, 53, 42, 0.08);
}
.masaf-cd-teacher-name {
  display: inline-block;
  font-weight: 800;
  font-size: 1.05rem;
  color: #12352a;
  text-decoration: none;
  margin-bottom: 0.2rem;
}
a.masaf-cd-teacher-name:hover {
  color: #0b6e4f;
  text-decoration: underline;
}
.masaf-cd-teacher-headline {
  margin: 0 0 0.55rem;
  color: #5b7268;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}
.masaf-cd-teacher-stats {
  list-style: none;
  margin: 0 0 0.65rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
}
.masaf-cd-teacher-stats li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  color: #5c6570;
  font-size: 0.84rem;
}
.masaf-cd-teacher-stats strong {
  color: #12352a;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.masaf-cd-teacher-bio {
  margin: 0;
  color: #5c6570;
  line-height: 1.75;
  font-size: 0.9rem;
}
.masaf-cd-teacher-more {
  display: inline-flex;
  margin-top: 0.65rem;
  color: #0b6e4f;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}
.masaf-cd-teacher-more:hover {
  text-decoration: underline;
}
@media (max-width: 576px) {
  .masaf-cd-teacher-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

.masaf-cd-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.masaf-cd-aside {
  position: relative;
}
.masaf-cd-buy {
  position: sticky;
  top: 5.25rem;
  border: 1px solid #e6ebe8;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 53, 42, 0.07);
  padding: 0.85rem;
  display: grid;
  gap: 0.85rem;
}
.masaf-cd-buy-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #eef3f0;
}
.masaf-cd-buy-media img,
.masaf-cd-buy-media video,
.masaf-cd-buy-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.masaf-cd-buy-media video {
  object-fit: contain;
  background: #0b1f18;
}
.masaf-cd-buy-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.88rem;
  background: linear-gradient(135deg, rgba(11, 110, 79, 0.16), #eef3f0 55%, #f7faf8);
}

.masaf-cd-buy-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.65rem;
}
.masaf-cd-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0b6e4f;
}
.masaf-cd-price.is-free,
.masaf-cd-price.is-owned {
  color: #5b7268;
  font-size: 1rem;
}
.masaf-cd-price-old {
  color: #9aa3ad;
  text-decoration: line-through;
  font-size: 0.92rem;
}
.masaf-cd-discount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 1.55rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #0b6e4f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.masaf-cd-buy-actions {
  display: grid;
  gap: 0.5rem;
}
.masaf-cd-cta,
.masaf-cd-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none !important;
}
.masaf-cd-cta {
  background: #0b6e4f;
  color: #fff !important;
}
.masaf-cd-cta:hover {
  background: #095a41;
}
.masaf-cd-cta-secondary {
  background: #e7f6ef;
  color: #0b6e4f !important;
  border: 1px solid rgba(11, 110, 79, 0.18);
}
.masaf-cd-cta-secondary:hover {
  background: #d9f0e5;
}

.masaf-cd-progress {
  display: grid;
  gap: 0.35rem;
}
.masaf-cd-progress-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: #e8ecea;
  overflow: hidden;
}
.masaf-cd-progress-bar > span {
  display: block;
  height: 100%;
  background: #0b6e4f;
}
.masaf-cd-progress-pct,
.masaf-cd-progress-label {
  font-size: 0.8rem;
  color: #5b7268;
  font-weight: 600;
}

.masaf-cd-buy-includes {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0;
  border-top: 1px solid #eef1f4;
  display: grid;
  gap: 0.4rem;
}
.masaf-cd-buy-includes li {
  position: relative;
  padding-inline-start: 1.15rem;
  color: #4d635a;
  font-size: 0.82rem;
  line-height: 1.45;
}
.masaf-cd-buy-includes li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  color: #0b6e4f;
  font-weight: 800;
  font-size: 0.78rem;
}

@media (max-width: 960px) {
  .masaf-cd-layout {
    grid-template-columns: 1fr;
  }
  .masaf-cd-aside {
    order: -1;
  }
  .masaf-cd-buy {
    position: static;
  }
  .masaf-cd-outcomes,
  .masaf-cd-includes,
  .masaf-cd-related-grid {
    grid-template-columns: 1fr;
  }
  .masaf-cd-tabs {
    top: 3.75rem;
  }
}

@media (max-width: 576px) {
  .masaf-cd-lessons li {
    grid-template-columns: 1rem minmax(0, 1fr);
    grid-template-areas:
      "icon name"
      ". meta";
  }
  .masaf-cd-lesson-icon { grid-area: icon; }
  .masaf-cd-lesson-name { grid-area: name; }
  .masaf-cd-lesson-dur,
  .masaf-cd-lesson-lock,
  .masaf-cd-lesson-open {
    grid-column: 2;
  }
}

