/* Final Hero + Header + CTA Fix */

.site-header .brand,
header .brand,
.navbar .brand,
.header-brand,
.brand-link,
.logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  max-width: 260px !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.site-header .brand-text,
header .brand-text,
.navbar .brand-text,
.header-brand-text,
.logo-text,
.brand-title-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  line-height: 1.05 !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.site-header .brand-name,
header .brand-name,
.navbar .brand-name,
.logo-title,
.brand-main {
  display: block !important;
  font-size: clamp(15px, 1.35vw, 18px) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  color: #10251f !important;
}

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

.tmk-hero-premium-title,
.tmk-hero-brand-title,
.hero h1 {
  max-width: 760px !important;
  margin: 16px 0 16px auto !important;
  text-align: right !important;
  font-size: clamp(2.15rem, 4.1vw, 4.05rem) !important;
  line-height: 1.14 !important;
  font-weight: 950 !important;
  letter-spacing: -0.035em !important;
  color: #10251f !important;
  text-wrap: balance !important;
}

.hero p,
.hero .hero-copy,
.hero .hero-description {
  max-width: 680px !important;
  margin: 0 0 0 auto !important;
  text-align: right !important;
  font-size: clamp(.98rem, 1.05vw, 1.08rem) !important;
  line-height: 1.9 !important;
  color: #526961 !important;
  font-weight: 650 !important;
}

.tmk-hero-benefits {
  width: min(680px, 100%) !important;
  margin: 18px 0 8px auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

.tmk-hero-benefits span {
  width: 100% !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  border-radius: 999px !important;
  text-align: center !important;
  white-space: nowrap !important;
  background: rgba(15,138,100,.08) !important;
  border: 1px solid rgba(15,138,100,.14) !important;
  color: #0f7b5f !important;
  font-size: .86rem !important;
  font-weight: 850 !important;
}

.tmk-hero-benefits span::before {
  content: "";
  width: 7px !important;
  height: 7px !important;
  flex: 0 0 7px !important;
  border-radius: 50% !important;
  background: #0f8a64 !important;
}

.hero .cta-group,
.hero .hero-actions,
.hero .hero-buttons {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: 20px !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: 52px !important;
  border-radius: 18px !important;
  padding-inline: 20px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

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

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

html[data-theme="dark"] .tmk-hero-benefits span,
body.dark .tmk-hero-benefits span {
  background: rgba(134,239,172,.11) !important;
  border-color: rgba(134,239,172,.18) !important;
  color: #86efac !important;
}

html[data-theme="dark"] .tmk-hero-benefits span::before,
body.dark .tmk-hero-benefits span::before {
  background: #86efac !important;
}

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

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

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

  .tmk-hero-premium-title,
  .tmk-hero-brand-title,
  .hero h1 {
    max-width: 100% !important;
    margin: 14px 0 14px auto !important;
    font-size: clamp(1.72rem, 7.2vw, 2.42rem) !important;
    line-height: 1.22 !important;
    letter-spacing: -0.028em !important;
    text-align: right !important;
  }

  .hero p,
  .hero .hero-copy,
  .hero .hero-description {
    max-width: 100% !important;
    font-size: .94rem !important;
    line-height: 1.82 !important;
  }

  .tmk-hero-benefits {
    width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    margin-top: 15px !important;
  }

  .tmk-hero-benefits span {
    min-height: 38px !important;
    padding: 7px 5px !important;
    font-size: .68rem !important;
    font-weight: 850 !important;
    gap: 5px !important;
    letter-spacing: -0.01em !important;
  }

  .tmk-hero-benefits span::before {
    width: 5px !important;
    height: 5px !important;
    flex-basis: 5px !important;
  }

  .hero .cta-group,
  .hero .hero-actions,
  .hero .hero-buttons,
  .hero .actions,
  .hero .buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 18px !important;
  }

  .hero .cta-group a,
  .hero .hero-actions a,
  .hero .hero-buttons a,
  .hero .actions a,
  .hero .buttons a,
  .hero .cta-group button,
  .hero .hero-actions button,
  .hero .hero-buttons button,
  .hero .actions button,
  .hero .buttons button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 50px !important;
    padding-inline: 8px !important;
    font-size: .78rem !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 380px) {
  .tmk-hero-premium-title,
  .tmk-hero-brand-title,
  .hero h1 {
    font-size: 1.58rem !important;
  }

  .tmk-hero-benefits span {
    font-size: .62rem !important;
  }

  .hero .cta-group a,
  .hero .hero-actions a,
  .hero .hero-buttons a,
  .hero .actions a,
  .hero .buttons a,
  .hero .cta-group button,
  .hero .hero-actions button,
  .hero .hero-buttons button,
  .hero .actions button,
  .hero .buttons button {
    font-size: .72rem !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;
  }
}
