/* Tamakkin Hero Typography Polish
   Scope: main hero title only. No data, route, or logic changes. */

.tmk-hero-brand-title {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: .14em !important;
  line-height: .96 !important;
  margin-block: 18px 18px !important;
  letter-spacing: -0.035em !important;
  max-width: 760px !important;
}

[dir="rtl"] .tmk-hero-brand-title,
html[dir="rtl"] .tmk-hero-brand-title,
body[dir="rtl"] .tmk-hero-brand-title {
  align-items: flex-end !important;
  text-align: right !important;
}

.tmk-hero-name {
  display: block !important;
  font-size: clamp(3.1rem, 8vw, 6.4rem) !important;
  font-weight: 950 !important;
  color: #0f211c !important;
  line-height: .9 !important;
  white-space: nowrap !important;
}

.tmk-hero-subtitle-brand {
  display: block !important;
  font-size: clamp(2.05rem, 5.2vw, 4.25rem) !important;
  font-weight: 850 !important;
  color: #0f8a64 !important;
  line-height: 1.03 !important;
  letter-spacing: -0.02em !important;
  white-space: nowrap !important;
}

html[data-theme="dark"] .tmk-hero-name,
body.dark .tmk-hero-name {
  color: #f8fafc !important;
}

html[data-theme="dark"] .tmk-hero-subtitle-brand,
body.dark .tmk-hero-subtitle-brand {
  color: #86efac !important;
}

.hero p,
.hero .hero-copy,
.hero .hero-description {
  margin-top: 16px !important;
}

@media (max-width: 760px) {
  .tmk-hero-brand-title {
    align-items: center !important;
    text-align: center !important;
    gap: .18em !important;
    margin-block: 18px 20px !important;
    line-height: 1 !important;
    letter-spacing: -0.025em !important;
    width: 100% !important;
  }

  [dir="rtl"] .tmk-hero-brand-title,
  html[dir="rtl"] .tmk-hero-brand-title,
  body[dir="rtl"] .tmk-hero-brand-title {
    align-items: center !important;
    text-align: center !important;
  }

  .tmk-hero-name {
    font-size: clamp(3.45rem, 16vw, 4.8rem) !important;
    line-height: .9 !important;
  }

  .tmk-hero-subtitle-brand {
    font-size: clamp(2rem, 9.2vw, 3.05rem) !important;
    line-height: 1.08 !important;
  }

  .hero p,
  .hero .hero-copy,
  .hero .hero-description {
    margin-top: 18px !important;
    line-height: 1.75 !important;
  }
}

@media (max-width: 390px) {
  .tmk-hero-name {
    font-size: 3.15rem !important;
  }

  .tmk-hero-subtitle-brand {
    font-size: 1.82rem !important;
  }
}

/* ===== Hero Center Balance Fix ===== */

.tmk-hero-brand-title,
[dir="rtl"] .tmk-hero-brand-title,
html[dir="rtl"] .tmk-hero-brand-title,
body[dir="rtl"] .tmk-hero-brand-title {
  align-items: center !important;
  text-align: center !important;
  margin-inline: auto !important;
}

.tmk-hero-name,
.tmk-hero-subtitle-brand {
  text-align: center !important;
  width: 100% !important;
}

.tmk-hero-name {
  letter-spacing: -0.045em !important;
}

.tmk-hero-subtitle-brand {
  margin-top: .12em !important;
  letter-spacing: -0.03em !important;
}

@media (min-width: 761px) {
  .tmk-hero-brand-title {
    max-width: 900px !important;
  }
}


/* ===== Premium Hero Rebuild ===== */

.tmk-premium-hero{
  position:relative;
  overflow:hidden;
}

.tmk-premium-hero .hero-content,
.tmk-premium-hero .container{
  position:relative;
  z-index:2;
}

.tmk-hero-brand-title{
  position:relative;
  width:fit-content;
  margin-inline:auto !important;
  gap:.28rem !important;
}

.tmk-hero-name{
  font-size:clamp(4rem,8vw,7.2rem) !important;
  font-weight:980 !important;
  line-height:.86 !important;
  letter-spacing:-0.06em !important;
  text-wrap:balance;
  filter:drop-shadow(0 10px 30px rgba(15,138,100,.10));
}

.tmk-hero-subtitle-brand{
  position:relative;
  width:fit-content;
  margin-inline:auto !important;
  font-size:clamp(1.55rem,3vw,2.8rem) !important;
  font-weight:820 !important;
  line-height:1.15 !important;
  letter-spacing:-0.03em !important;
  padding:.45rem 1rem !important;
  border-radius:999px;
  background:rgba(15,138,100,.08);
  border:1px solid rgba(15,138,100,.12);
  backdrop-filter:blur(10px);
}

.hero p,
.hero .hero-copy,
.hero .hero-description{
  max-width:720px !important;
  margin-inline:auto !important;
  margin-top:1.4rem !important;
  font-size:clamp(1rem,1.4vw,1.16rem) !important;
  line-height:2 !important;
  color:#587068 !important;
  font-weight:650 !important;
  text-wrap:pretty;
}

.hero .cta-group,
.hero .hero-actions,
.hero .hero-buttons{
  margin-top:2rem !important;
  display:flex !important;
  justify-content:center !important;
  gap:14px !important;
  flex-wrap:wrap !important;
}

.hero .cta-group a,
.hero .hero-actions a,
.hero .hero-buttons a,
.hero .cta-group button,
.hero .hero-actions button,
.hero .hero-buttons button{
  min-height:54px !important;
  border-radius:18px !important;
  padding-inline:22px !important;
  font-weight:850 !important;
  box-shadow:0 18px 45px rgba(15,138,100,.16);
}

html[data-theme="dark"] .tmk-hero-subtitle-brand,
body.dark .tmk-hero-subtitle-brand{
  background:rgba(134,239,172,.10);
  border-color:rgba(134,239,172,.14);
}

html[data-theme="dark"] .hero p,
body.dark .hero p,
html[data-theme="dark"] .hero .hero-copy,
body.dark .hero .hero-copy,
html[data-theme="dark"] .hero .hero-description,
body.dark .hero .hero-description{
  color:rgba(236,245,241,.76) !important;
}

@media (max-width:760px){

  .tmk-premium-hero{
    padding-top:24px !important;
  }

  .tmk-hero-brand-title{
    gap:.5rem !important;
  }

  .tmk-hero-name{
    font-size:clamp(3.4rem,15vw,4.8rem) !important;
    line-height:.9 !important;
    letter-spacing:-0.05em !important;
  }

  .tmk-hero-subtitle-brand{
    font-size:clamp(1.2rem,5.2vw,1.7rem) !important;
    line-height:1.2 !important;
    padding:.5rem .9rem !important;
  }

  .hero p,
  .hero .hero-copy,
  .hero .hero-description{
    margin-top:1rem !important;
    font-size:1rem !important;
    line-height:1.9 !important;
    max-width:95% !important;
  }

  .hero .cta-group,
  .hero .hero-actions,
  .hero .hero-buttons{
    margin-top:1.4rem !important;
    gap:10px !important;
  }

  .hero .cta-group a,
  .hero .hero-actions a,
  .hero .hero-buttons a,
  .hero .cta-group button,
  .hero .hero-actions button,
  .hero .hero-buttons button{
    width:100%;
    max-width:340px;
  }
}


/* ===== Hero RTL Refinement Fix ===== */

.tmk-hero-brand-title,
[dir="rtl"] .tmk-hero-brand-title,
html[dir="rtl"] .tmk-hero-brand-title,
body[dir="rtl"] .tmk-hero-brand-title{
  align-items:flex-end !important;
  text-align:right !important;
  margin-inline:0 auto !important;
}

.tmk-hero-name{
  font-size:clamp(3.2rem,6vw,5.8rem) !important;
  line-height:.9 !important;
}

.tmk-hero-subtitle-brand{
  font-size:clamp(1.3rem,2.2vw,2.1rem) !important;
  margin-inline:0 !important;
}

.hero p,
.hero .hero-copy,
.hero .hero-description{
  margin-inline:0 auto !important;
  text-align:right !important;
  max-width:680px !important;
}

@media (max-width:760px){

  .tmk-hero-brand-title,
  [dir="rtl"] .tmk-hero-brand-title,
  html[dir="rtl"] .tmk-hero-brand-title,
  body[dir="rtl"] .tmk-hero-brand-title{
    align-items:flex-end !important;
    text-align:right !important;
    width:100% !important;
  }

  .tmk-hero-name{
    font-size:clamp(2.8rem,12vw,4.2rem) !important;
  }

  .tmk-hero-subtitle-brand{
    font-size:clamp(1.05rem,4.5vw,1.5rem) !important;
  }

  .hero p,
  .hero .hero-copy,
  .hero .hero-description{
    text-align:right !important;
    max-width:100% !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;
  }
}
