/* TKSE 008D2B - Homepage Header + Mobile Exact Fix
   Purpose: keep 008D2A layout, fix oversized logo/header, desktop hero proportions, and mobile overflow. */
html, body { max-width: 100%; overflow-x: hidden; }

/* Header lock */
.site-header {
  height: 92px;
  min-height: 92px;
  overflow: visible;
  background: rgba(255,255,255,.98);
}
.nav-bar {
  height: 92px;
  min-height: 92px;
  gap: 24px;
  overflow: visible;
}
.brand {
  flex: 0 0 auto;
  height: 92px;
  width: 172px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}
.brand img {
  width: auto !important;
  height: 70px !important;
  max-width: 168px !important;
  max-height: 70px !important;
  object-fit: contain;
  display: block;
}
.main-menu { gap: 24px; }
.main-menu a { font-size: 14px; line-height: 1; }
.header-actions { gap: 12px; }
.hotline-pill, .flag-lang>button, .nav-cta { height: 46px; }
.nav-cta { padding: 0 20px; }

/* Homepage hero: match approved master proportions better */
.tkse-008d2a-hero {
  min-height: 780px;
  background: #031535;
}
.tkse-008d2a-hero:before {
  background-image:
    linear-gradient(90deg, rgba(1,11,31,.78) 0%, rgba(1,11,31,.52) 43%, rgba(1,11,31,.15) 100%),
    url('/assets/images/hero/tkse-hero-master-bg-008d2a.png');
  background-position: center right;
  background-size: cover;
}
.hero-master-grid {
  grid-template-columns: minmax(540px, .96fr) minmax(620px, 1.04fr);
  min-height: 780px;
  padding: 76px 0 70px;
  gap: 44px;
}
.master-copy { max-width: 760px; }
.master-eyebrow { margin-bottom: 32px; }
.master-copy h1 {
  font-size: clamp(52px, 3.85vw, 70px);
  line-height: 1.08;
  letter-spacing: -.055em;
  max-width: 760px;
}
.master-copy h1 strong { display: block; }
.master-copy p {
  max-width: 650px;
  font-size: 18px;
  line-height: 1.68;
}
.master-actions { margin-top: 38px; }
.master-actions .btn { height: 62px; font-size: 17px; padding: 0 30px; }
.master-chips { margin-top: 30px; }
.master-chips span { height: 44px; padding: 0 18px; font-size: 14px; }

/* Right visual cards: fixed layout, no unwanted overlap */
.master-visual {
  min-height: 600px;
  max-width: 720px;
  width: 100%;
  justify-self: end;
}
.master-card { padding: 24px 28px; }
.master-card b { font-size: 48px; }
.master-card p { font-size: 15px; }
.card-icon { width: 56px; height: 56px; font-size: 26px; }
.eff-card { left: 4%; top: 16px; width: 390px; z-index: 3; }
.saving-card { right: 0; top: 92px; width: 300px; z-index: 4; }
.green-card { left: 6%; top: 286px; width: 300px; z-index: 3; }
.hotline-card { right: 64px; top: 295px; width: 310px; z-index: 3; }
.wide-card {
  left: 0;
  right: 0;
  bottom: 8px;
  min-height: 142px;
  grid-template-columns: 1.06fr .94fr;
  z-index: 5;
  padding: 28px 34px;
}
.wide-card b { font-size: 20px; line-height: 1.25; }
.wide-card .smart-title { font-size: 20px; }

@media (min-width: 1181px) and (max-width: 1420px) {
  .wrap { width: min(1320px, calc(100% - 58px)); }
  .main-menu { gap: 18px; }
  .main-menu a { font-size: 13px; }
  .brand { width: 150px; }
  .brand img { height: 62px !important; max-height: 62px !important; max-width: 148px !important; }
  .hero-master-grid { grid-template-columns: minmax(500px,.95fr) minmax(560px,1.05fr); gap: 34px; }
  .master-copy h1 { font-size: clamp(50px, 4vw, 64px); }
  .master-visual { max-width: 650px; }
  .eff-card { width: 350px; }
  .saving-card { width: 276px; }
  .green-card { width: 274px; }
  .hotline-card { width: 288px; right: 40px; }
}

/* Tablet */
@media (max-width: 1180px) {
  .site-header, .nav-bar { height: 88px; min-height: 88px; }
  .brand { height: 88px; width: 144px; }
  .brand img { height: 62px !important; max-height: 62px !important; max-width: 142px !important; }
  .hero-master-grid { grid-template-columns: 1fr; min-height: auto; padding: 70px 0; }
  .master-copy { max-width: 760px; }
  .master-copy h1 { font-size: clamp(48px, 7vw, 64px); }
  .master-visual { justify-self: stretch; max-width: 760px; min-height: 580px; }
}

/* Mobile: make hero readable and prevent horizontal overflow */
@media (max-width: 820px) {
  body { padding-bottom: 84px; }
  .wrap { width: calc(100% - 32px); }
  .site-header, .nav-bar {
    height: 104px;
    min-height: 104px;
  }
  .nav-bar { gap: 12px; }
  .brand {
    width: 128px;
    height: 104px;
  }
  .brand img {
    height: 78px !important;
    max-height: 78px !important;
    max-width: 124px !important;
  }
  .flag-lang>button {
    height: 54px;
    min-width: 104px;
    padding: 0 13px;
    border-radius: 18px;
  }
  .flag-icon { width: 28px; height: 19px; }
  .mobile-toggle {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }
  .tkse-008d2a-hero {
    min-height: auto;
    overflow: hidden;
  }
  .tkse-008d2a-hero:before {
    background-image:
      linear-gradient(180deg, rgba(1,11,31,.92) 0%, rgba(1,11,31,.84) 55%, rgba(1,11,31,.90) 100%),
      url('/assets/images/hero/tkse-hero-master-bg-008d2a.png');
    background-size: auto 100%;
    background-position: 68% 50%;
    opacity: 1;
  }
  .tkse-008d2a-hero:after { height: 130px; }
  .hero-master-grid {
    display: block;
    min-height: auto;
    padding: 54px 0 42px;
  }
  .master-copy {
    max-width: 100%;
    width: 100%;
  }
  .master-eyebrow {
    font-size: 12px;
    letter-spacing: .1em;
    padding: 11px 18px;
    margin-bottom: 28px;
    max-width: 100%;
  }
  .master-eyebrow:before { width: 34px; height: 5px; }
  .master-copy h1 {
    font-size: clamp(38px, 9.6vw, 48px);
    line-height: 1.08;
    letter-spacing: -.045em;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
  }
  .master-copy h1 strong { display: inline; }
  .master-copy p {
    margin-top: 22px;
    font-size: 17px;
    line-height: 1.65;
    max-width: 100%;
    color: #dbe7f8;
  }
  .master-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 30px;
  }
  .master-actions .btn {
    width: 100%;
    min-height: 58px;
    height: auto;
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }
  .master-chips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }
  .master-chips span {
    width: 100%;
    height: 46px;
    justify-content: center;
    font-size: 14px;
  }
  .master-visual {
    display: none !important;
  }
  .mobile-cta {
    left: 14px;
    right: 14px;
    bottom: 12px;
    border-radius: 22px;
    grid-template-columns: 1fr 1.25fr 1fr;
  }
  .mobile-cta a { height: 50px; font-size: 16px; }
}

@media (max-width: 390px) {
  .wrap { width: calc(100% - 26px); }
  .brand { width: 112px; }
  .brand img { height: 70px !important; max-height: 70px !important; max-width: 110px !important; }
  .flag-lang>button { min-width: 94px; height: 50px; }
  .mobile-toggle { width: 52px; height: 52px; }
  .master-copy h1 { font-size: clamp(34px, 9vw, 42px); }
  .master-copy p { font-size: 16px; }
}
