/* SharifStudy Hero — server-positioned, RTL-first, fully namespaced. */
.ss-hero,
.ss-hero * { box-sizing: border-box; }

.ss-hero {
  --ss-ink: #17383b;
  --ss-muted: #5e7072;
  --ss-brand: #ff5e15;
  --ss-brand-dark: #d94a06;
  --ss-green: #004044;
  --ss-soft: #f7f9f8;
  --ss-line: #dce6e4;
  direction: rtl;
  width: calc(100% - 36px);
  max-width: 1010px;
  margin: 12px auto 10px;
  color: var(--ss-ink);
  font-family: inherit;
}

.ss-hero__shell {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 32px 34px 30px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ss-line);
  border-radius: 10px;
}

.ss-hero__shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--ss-green) 0 72%, var(--ss-brand) 72% 100%);
}

.ss-hero__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(310px, .88fr);
  gap: 34px;
  align-items: center;
}

.ss-hero__copy { min-width: 0; }

.ss-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--ss-green);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.65;
}

.ss-hero__eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--ss-brand);
}

.ss-hero__title {
  max-width: 610px;
  margin: 0;
  color: var(--ss-ink);
  font-size: clamp(29px, 3.1vw, 43px);
  font-weight: 900;
  line-height: 1.38;
  letter-spacing: -.025em;
}

.ss-hero__text {
  max-width: 620px;
  margin: 13px 0 0;
  color: var(--ss-muted);
  font-size: 14.5px;
  line-height: 1.95;
}

.ss-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.ss-hero__button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  color: #fff !important;
  background: var(--ss-brand);
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.ss-hero__button:hover {
  color: #fff !important;
  background: var(--ss-brand-dark);
  transform: translateY(-1px);
}

.ss-hero__button--secondary {
  color: var(--ss-green) !important;
  background: #fff;
  border-color: #b8cbca;
}

.ss-hero__button--secondary:hover {
  color: #fff !important;
  background: var(--ss-green);
  border-color: var(--ss-green);
}

.ss-hero a:focus-visible {
  outline: 3px solid rgba(19,111,116,.3);
  outline-offset: 3px;
}

.ss-hero__proofs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 15px;
  margin: 17px 0 0;
  padding: 0;
}

.ss-hero__proof {
  position: relative;
  padding-right: 17px;
  color: #536668;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.ss-hero__proof::before {
  content: "✓";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--ss-green);
  font-weight: 900;
}

.ss-hero__visual { min-height: 286px; }

.ss-hero__image-wrap {
  width: 100%;
  height: 286px;
  overflow: hidden;
  background: #edf5f3;
  border: 1px solid #d6e4e1;
  border-radius: 14px;
}

.ss-hero__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ss-hero__services { margin-top: 32px; }

.ss-hero__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.ss-hero__service {
  height: 295px;
  min-height: 295px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  color: var(--ss-ink) !important;
 /* background: var(--ss-soft); */
  border: 1px solid var(--ss-line);
  border-radius: 10px;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ss-hero__service-media {
  width: 100%;
  aspect-ratio: 2 / 1;
  display: block;
  overflow: hidden;
  background: #e7efed;
  border-bottom: 1px solid var(--ss-line);
}

.ss-hero__service-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ss-hero__service-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 16px 17px;
  min-height: 0;
}

.ss-hero__service:hover {
  color: var(--ss-ink) !important;
  background: #fff;
  border-color: #9dbdb9;
  box-shadow: 0 7px 18px rgba(0,64,68,.08);
  transform: translateY(-2px);
}

.ss-hero__service-title {
  margin: 0;
  color: var(--ss-ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.55;
}

.ss-hero__service-text {
  margin: 7px 0 0;
  color: var(--ss-muted);
  font-size: 13px;
  line-height: 1.75;
}

.ss-hero__service-arrow {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 40px;
  margin-top: auto;
  padding: 8px 11px;
  color: var(--ss-brand);
  background: #fff2eb;
  border: 1px solid #ffd7c2;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.4;
}

/* The hero is server-positioned before Sahifa's two-column region. */
.ss-hero + #main-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

@media only screen and (min-width: 769px) {
  .ss-hero + #main-content > .content > .home-e3lan:not(:has(*)),
  .ss-hero + #main-content > .content > .home-e3lan:has(.ss-collections) {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ss-hero + #main-content > .content > .cat-box:first-of-type {
    margin-top: 6px !important;
  }
}

.ss-hero__service:hover .ss-hero__service-arrow {
  color: #fff;
  background: var(--ss-brand);
  border-color: var(--ss-brand);
}

@media only screen and (max-width: 980px) {
  .ss-hero { width: calc(100% - 28px); }
  .ss-hero__shell { padding: 26px 26px 28px; }
  .ss-hero__intro { grid-template-columns: minmax(0, 1fr) minmax(285px, .84fr); gap: 26px; }
  .ss-hero__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media only screen and (max-width: 700px) {
  .ss-hero { width: 100%; margin: 6px auto 0; }
  .ss-hero__shell { padding: 22px 18px 20px; border-right: 0; border-left: 0; border-radius: 0; }
  .ss-hero__intro { grid-template-columns: 1fr; gap: 20px; }
  .ss-hero__copy { text-align: center; }
  .ss-hero__eyebrow { justify-content: center; margin-bottom: 8px; font-size: 12.5px; }
  .ss-hero__title { margin-inline: auto; font-size: clamp(27px, 8vw, 35px); line-height: 1.43; }
  .ss-hero__text { margin: 11px auto 0; font-size: 14px; line-height: 1.85; }
  .ss-hero__actions { margin-top: 17px; gap: 12px; }
  .ss-hero__button { min-height: 48px; padding-inline: 10px; font-size: 12.5px; white-space: nowrap; }
  .ss-hero__proofs { justify-content: center; margin-top: 15px; }
  .ss-hero__proof { font-size: 11.5px; }
  .ss-hero__visual { min-height: 238px; }
  .ss-hero__image-wrap { height: 238px; }
  .ss-hero__services { margin-top: 21px; }
  .ss-hero__grid { gap: 17px; }
  .ss-hero__service { height: 290px; min-height: 290px; }
  .ss-hero__service-body { padding: 14px 13px 15px; }
  .ss-hero__service-media { aspect-ratio: 2 / 1; }
  .ss-hero__service-title { font-size: 19px; }
  .ss-hero__service-text { font-size: 12.5px; }
  .ss-hero__service-arrow { min-height: 40px; margin-top: auto; padding: 8px; font-size: 12.5px; }

  .ss-hero + #main-content > .content > .home-e3lan:not(:has(*)) {
    display: none !important;
  }

  .ss-hero + #main-content > .content > .home-e3lan:has(.ss-collections) {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .ss-hero + #main-content .ss-collections:first-of-type {
    margin-top: 6px !important;
  }
}

@media only screen and (min-width: 371px) and (max-width: 700px) {
  .ss-hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ss-hero__button { width: 100%; }
}

@media only screen and (max-width: 360px) {
  .ss-hero__shell { padding-right: 14px; padding-left: 14px; }
  .ss-hero__grid { grid-template-columns: 1fr; }
  .ss-hero__actions { flex-direction: column; }
  .ss-hero__button { width: 100%; }
  .ss-hero__service { height: 320px; min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .ss-hero *, .ss-hero *::before, .ss-hero *::after { transition: none !important; }
}