.masthead {
  position: relative;
}

/* خط تزئینی بالای صفحه */
.top-rule {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
}

.rule-line {
  flex: 1;
  border-top: 4px solid #17130f;
  box-shadow: 0 5px 0 #17130f;
}

.rule-ornament {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
}

/* ساختار کلی هدر */
.masthead-inner {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 20px;
  align-items: start;
  height: calc(100% - 28px);
  padding-top: 18px;
}

/* تصویر یکپارچه آرم + متن نمایندگی */
.brand-block {
  align-self: start;
  justify-self: end;
  width: 210px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
}

.brand-lockup-img {
  width: 160px;
  height: auto;
  max-height: 292px;
  display: block;
  object-fit: contain;
  background: transparent;
  filter: sepia(.22) contrast(1.05);
}

/* نسخه‌های قدیمی: دیگر استفاده نمی‌شوند */
.logo-placeholder,
.logo-img,
.brand-fa,
.brand-en {
  display: none !important;
}

/* بخش عنوان اصلی تقریر */
.title-block {
  text-align: center;
  padding-bottom: 5px;
}

.taqrir-title {
  margin: 0;
  font-size: 150px;
  line-height: .8;
  font-weight: 950;
  letter-spacing: -8px;
}

.title-block h2 {
  margin: 18px 0 0;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 900;
}

.title-block p {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

/* عنوان تصویری جایگزینِ متن تقریر و زیرعنوان‌ها */
.title-image-block {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
  min-width: 0;
  overflow: visible;
}

.masthead-title-img {
  display: block;
  width: min(100%, 690px);
  height: auto;
  max-height: 225px;
  object-fit: contain;
  background: transparent;
  filter: sepia(.18) contrast(1.08) saturate(.92);
  transform: translateY(-6px);
}

/* وقتی عنوان از تصویر خوانده می‌شود، متن‌های قبلی نمایش داده نمی‌شوند */
.title-image-block .taqrir-title,
.title-image-block h2,
.title-image-block p {
  display: none !important;
}

@media (max-width: 900px) {
  .masthead-title-img {
    width: min(100%, 620px);
    max-height: 190px;
    transform: none;
  }
}
