/* Header + Hero Correction
   Scope: correct brand hierarchy only. */

/* Header: show تمكّن as main, لصعوبات التعلّم as small subtitle */
.site-header .brand-name,
header .brand-name,
.navbar .brand-name,
.logo-title,
.brand-main {
  font-size: clamp(16px, 1.55vw, 19px) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.site-header .brand-subtitle,
header .brand-subtitle,
.navbar .brand-subtitle,
.logo-subtitle,
.brand-tagline,
.brand-sub {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: clamp(10px, .9vw, 12px) !important;
  font-weight: 800 !important;
  color: #4e655e !important;
  line-height: 1.1 !important;
  margin-top: 3px !important;
  white-space: nowrap !important;
}

/* Prevent any header brand text from becoming huge */
.site-header .brand,
header .brand,
.navbar .brand,
.header-brand,
.brand-link {
  max-width: 240px !important;
  overflow: visible !important;
}

/* Hero: keep only تمكّن as the big word, and لصعوبات التعلّم as the smaller descriptor */
.tmk-hero-brand-title {
  align-items: flex-end !important;
  text-align: right !important;
  margin-inline: 0 auto !important;
  gap: .36rem !important;
}

.tmk-hero-name {
  font-size: clamp(2.9rem, 5.4vw, 5.1rem) !important;
  line-height: .92 !important;
  font-weight: 950 !important;
  letter-spacing: -0.045em !important;
  color: #10251f !important;
  white-space: nowrap !important;
}

.tmk-hero-subtitle-brand {
  font-size: clamp(1.08rem, 2vw, 1.68rem) !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  color: #0f8a64 !important;
  background: rgba(15, 138, 100, .08) !important;
  border: 1px solid rgba(15, 138, 100, .14) !important;
  border-radius: 999px !important;
  padding: .42rem .82rem !important;
  width: fit-content !important;
  white-space: nowrap !important;
  margin-inline: 0 !important;
}

@media (max-width: 760px) {
  .site-header .brand,
  header .brand,
  .navbar .brand,
  .header-brand,
  .brand-link {
    max-width: 58vw !important;
  }

  .site-header .brand-name,
  header .brand-name,
  .navbar .brand-name,
  .logo-title,
  .brand-main {
    font-size: 15px !important;
  }

  .site-header .brand-subtitle,
  header .brand-subtitle,
  .navbar .brand-subtitle,
  .logo-subtitle,
  .brand-tagline,
  .brand-sub {
    font-size: 10.5px !important;
  }

  .tmk-hero-name {
    font-size: clamp(2.7rem, 11vw, 3.85rem) !important;
  }

  .tmk-hero-subtitle-brand {
    font-size: clamp(1rem, 4.2vw, 1.32rem) !important;
  }
}

/* iOS Safari AI Assistant Zoom Fix */
.ai-assistant input,
.ai-assistant textarea,
.ai-chat-input,
.ai-assistant-panel textarea,
.ai-widget-panel textarea {
  font-size: 16px !important;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .ai-assistant-panel,
  .ai-chat-panel,
  .ai-widget-panel {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: auto !important;
    transform: none !important;
    overflow-x: hidden !important;
  }

  .ai-assistant-panel * {
    max-width: 100%;
    box-sizing: border-box;
  }
}
