/* TKSE 008D2C - Homepage Master Final Fix
   Purpose: final homepage hero correction before 008D3.
   - wider desktop composition closer to approved master
   - cleaner card stack, no card collision
   - lighter mobile hero typography
   - mobile CTA no longer hidden by bottom CTA
   - tighter mobile header
*/

html, body { max-width: 100%; overflow-x: hidden; }

@media (min-width: 1181px) {
  .wrap { width: min(1720px, calc(100% - 92px)); }

  .site-header,
  .nav-bar {
    height: 86px;
    min-height: 86px;
  }

  .brand {
    width: 150px;
    height: 86px;
  }

  .brand img {
    height: 58px !important;
    max-height: 58px !important;
    max-width: 146px !important;
  }

  .main-menu { gap: 24px; }
  .main-menu a { font-size: 14px; }
  .hotline-pill,
  .flag-lang > button,
  .nav-cta { height: 44px; }

  .tkse-008d2a-hero {
    min-height: 820px;
  }

  .tkse-008d2a-hero:before {
    background-image:
      linear-gradient(90deg, rgba(1,11,31,.72) 0%, rgba(1,11,31,.47) 40%, rgba(1,11,31,.08) 100%),
      url('/assets/images/hero/tkse-hero-master-bg-008d2a.png');
    background-size: cover;
    background-position: center right;
  }

  .hero-master-grid {
    grid-template-columns: minmax(640px, .96fr) minmax(680px, 1.04fr);
    min-height: 820px;
    padding: 74px 0 66px;
    gap: 58px;
  }

  .master-copy {
    max-width: 780px;
  }

  .master-eyebrow {
    margin-bottom: 32px;
    padding: 12px 24px;
  }

  .master-copy h1 {
    font-size: clamp(56px, 3.65vw, 72px);
    line-height: 1.06;
    letter-spacing: -.052em;
    max-width: 780px;
  }

  .master-copy h1 strong {
    display: block;
  }

  .master-copy p {
    max-width: 720px;
    font-size: 18px;
    line-height: 1.66;
    margin-top: 26px;
  }

  .master-actions {
    margin-top: 38px;
    gap: 22px;
  }

  .master-actions .btn {
    height: 60px;
    padding: 0 28px;
    font-size: 16px;
    border-radius: 14px;
  }

  .master-chips {
    margin-top: 28px;
    gap: 12px;
  }

  .master-chips span {
    height: 42px;
    padding: 0 16px;
    font-size: 13px;
  }

  .master-visual {
    max-width: 760px;
    min-height: 610px;
    justify-self: end;
  }

  .master-card {
    border-radius: 22px;
    padding: 24px 28px;
  }

  .master-card small { font-size: 15px; }
  .master-card b { font-size: 46px; }
  .master-card p { font-size: 14px; line-height: 1.52; }
  .card-icon { width: 54px; height: 54px; font-size: 24px; }

  .eff-card {
    left: 0;
    top: 24px;
    width: 365px;
    z-index: 3;
  }

  .saving-card {
    right: 8px;
    top: 96px;
    width: 290px;
    z-index: 5;
  }

  .green-card {
    left: 18px;
    top: 296px;
    width: 292px;
    z-index: 2;
  }

  .hotline-card {
    right: 86px;
    top: 292px;
    width: 302px;
    z-index: 3;
  }

  .wide-card {
    left: 0;
    right: 0;
    bottom: 16px;
    min-height: 148px;
    grid-template-columns: 1.02fr .98fr;
    gap: 30px;
    padding: 28px 34px;
    z-index: 6;
  }

  .wide-card b {
    font-size: 20px;
    line-height: 1.25;
  }

  .wide-card .smart-title { font-size: 20px; }
  .wide-card .mini-chart { width: 86px; height: 66px; }
}

@media (min-width: 1181px) and (max-width: 1460px) {
  .wrap { width: min(1360px, calc(100% - 54px)); }
  .brand { width: 138px; }
  .brand img { height: 54px !important; max-height: 54px !important; max-width: 132px !important; }
  .main-menu { gap: 18px; }
  .main-menu a { font-size: 13px; }
  .header-actions { gap: 10px; }
  .nav-cta { padding: 0 18px; }
  .hero-master-grid {
    grid-template-columns: minmax(560px, .94fr) minmax(600px, 1.06fr);
    gap: 36px;
  }
  .master-copy h1 { font-size: clamp(52px, 3.8vw, 64px); }
  .master-visual { max-width: 650px; }
  .eff-card { width: 340px; }
  .saving-card { width: 260px; }
  .green-card { width: 258px; }
  .hotline-card { width: 276px; right: 42px; }
}

@media (max-width: 1180px) and (min-width: 821px) {
  .hero-master-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 72px 0;
  }
  .master-copy {
    max-width: 820px;
  }
  .master-copy h1 {
    max-width: 820px;
    font-size: clamp(48px, 6.2vw, 64px);
  }
  .master-copy h1 strong { display: inline; }
  .master-visual {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
    min-height: auto;
    max-width: 820px;
    justify-self: start;
  }
  .master-card {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: auto !important;
  }
  .wide-card { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  body { padding-bottom: 0 !important; }
  .wrap { width: calc(100% - 36px); }

  .site-header,
  .nav-bar {
    height: 92px !important;
    min-height: 92px !important;
  }

  .nav-bar { gap: 10px; }

  .brand {
    width: 104px !important;
    height: 92px !important;
  }

  .brand img {
    height: 64px !important;
    max-height: 64px !important;
    max-width: 100px !important;
  }

  .flag-lang > button {
    height: 48px !important;
    min-width: 92px !important;
    padding: 0 10px !important;
    border-radius: 16px !important;
    gap: 7px !important;
  }

  .flag-icon { width: 25px !important; height: 17px !important; }

  .mobile-toggle {
    width: 50px !important;
    height: 50px !important;
    border-radius: 16px !important;
  }

  .mobile-toggle span { width: 22px !important; height: 3px !important; }

  .tkse-008d2a-hero {
    min-height: auto !important;
    overflow: hidden;
  }

  .tkse-008d2a-hero:before {
    background-image:
      linear-gradient(180deg, rgba(1,11,31,.94) 0%, rgba(1,11,31,.88) 54%, rgba(1,11,31,.94) 100%),
      url('/assets/images/hero/tkse-hero-master-bg-008d2a.png') !important;
    background-size: auto 110% !important;
    background-position: 68% center !important;
  }

  .tkse-008d2a-hero:after { height: 90px !important; }

  .hero-master-grid {
    display: block !important;
    min-height: auto !important;
    padding: 42px 0 52px !important;
  }

  .master-copy { max-width: 100% !important; }

  .master-eyebrow {
    font-size: 11px !important;
    letter-spacing: .09em !important;
    padding: 10px 14px !important;
    margin-bottom: 24px !important;
    max-width: 100%;
    gap: 12px;
  }

  .master-eyebrow:before { width: 30px !important; height: 4px !important; }

  .master-copy h1 {
    font-size: clamp(31px, 8.1vw, 39px) !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em !important;
    max-width: 100% !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .master-copy h1 strong { display: inline !important; }

  .master-copy p {
    margin-top: 20px !important;
    font-size: 15.5px !important;
    line-height: 1.62 !important;
    color: #dbe7f8 !important;
    max-width: 100% !important;
  }

  .master-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 28px !important;
  }

  .master-actions .btn {
    width: 100% !important;
    min-height: 54px !important;
    height: auto !important;
    padding: 14px 16px !important;
    font-size: 14.5px !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    border-radius: 16px !important;
  }

  .master-chips {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 22px !important;
  }

  .master-chips span {
    width: 100% !important;
    height: 42px !important;
    padding: 0 10px !important;
    justify-content: center !important;
    font-size: 12.5px !important;
    border-radius: 14px !important;
  }

  .master-visual { display: none !important; }

  .mobile-cta {
    display: none !important;
  }

  .floating,
  .scroll-top {
    display: none !important;
  }
}

@media (max-width: 390px) {
  .wrap { width: calc(100% - 28px); }
  .site-header,
  .nav-bar { height: 88px !important; min-height: 88px !important; }
  .brand { width: 92px !important; height: 88px !important; }
  .brand img { height: 58px !important; max-height: 58px !important; max-width: 90px !important; }
  .flag-lang > button { min-width: 84px !important; height: 46px !important; }
  .mobile-toggle { width: 48px !important; height: 48px !important; }
  .master-copy h1 { font-size: clamp(29px, 8vw, 35px) !important; }
  .master-copy p { font-size: 15px !important; }
  .master-chips { grid-template-columns: 1fr !important; }
}
