/* Melhorias de experiência para a cópia local do SlimWeb. */
:root { color-scheme: dark; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
@font-face { font-family: Aeonik; src: url('./fontes/Aeonik/Aeonik-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Aeonik; src: url('./fontes/Aeonik/Aeonik-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
body::before { background-image: url('./images/bgpattern.svg') !important; }

/* O cartão branco da primeira dobra precisa de contraste em toda a chamada. */
.main .form .racesport,
.main .form .racesport:not(.roxo) { color: #2f2437 !important; text-shadow: none !important; }
.main .form .racesport .roxo { color: #7812b3 !important; }

.slim-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  transform: translateY(-180%);
  padding: .65rem 1rem;
  border-radius: 9px;
  color: #fff;
  background: #7812b3;
  font: 700 .9rem/1 Aeonik, sans-serif;
  transition: transform .2s ease;
}
.slim-skip-link:focus { transform: translateY(0); }

header, section, footer { scroll-margin-top: 104px; }
.footer-section { position: relative !important; }
.sat-tv-footer-logo {
  display: block;
  position: absolute;
  left: clamp(24px, 3.8vw, 48px);
  bottom: 28px;
  width: 72px;
  height: auto;
  max-height: 64px;
  object-fit: contain;
  opacity: .94;
  z-index: 3;
}
.header-glass { border-color: rgba(255,255,255,.16) !important; }
.header-glass:focus-within { border-color: rgba(255,255,255,.42) !important; }
.nav-link:focus-visible, .portal-btn:focus-visible, .hamburger-btn:focus-visible,
.mobile-nav-link:focus-visible, .app-btn:focus-visible, button:focus-visible,
a:focus-visible { outline: 3px solid #ff8f45 !important; outline-offset: 4px; }
.portal-btn { min-height: 42px; }
.mobile-menu { overscroll-behavior: contain; }
.service-nav-link {
  color: #ff6a1a !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
.nav-links {
  align-items: center !important;
  flex-wrap: nowrap !important;
}
.nav-links > a,
.service-nav-dropdown { min-height: 44px; }
.nav-links > a.nav-link,
.nav-links > .service-nav-dropdown > .service-menu-button {
  min-height: 44px !important;
  padding: 0 .1rem !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box;
  line-height: 1 !important;
}
.nav-links > .service-nav-dropdown > .service-menu-button { justify-content: center; }
.nav-links > a,
.nav-links .nav-link,
.service-menu-button {
  white-space: nowrap !important;
}
.service-nav-dropdown { position: relative; display: flex; align-items: center; align-self: center; }
.service-menu-button {
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
  gap: .5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.service-menu-button span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.1);
  font-size: .92rem;
  line-height: 1;
  transition: transform .2s ease, background .2s ease;
}
.service-menu-button:hover span { background: rgba(255,106,26,.28); }
.service-nav-dropdown.open .service-menu-button span { transform: rotate(180deg); }
.service-nav-submenu {
  position: absolute;
  top: calc(100% + .6rem);
  left: 50%;
  z-index: 150;
  width: 210px;
  display: none;
  padding: .5rem;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: .9rem;
  background: #21102d;
  box-shadow: 0 20px 45px rgba(0,0,0,.35);
}
.service-nav-dropdown.open .service-nav-submenu { display: grid; }
.service-nav-submenu a {
  padding: .72rem .8rem;
  border-radius: .65rem;
  color: #fff;
  text-decoration: none;
  font-size: .86rem;
}
.service-nav-submenu a:hover { background: rgba(255,106,26,.2); }

/* Cabeçalho amplo: mantém todos os rótulos nivelados, sem quebra de linha. */
@media (min-width: 1281px) {
  .header-middle { min-width: 0; }
  .header-end { flex: 0 0 auto; }
  .nav-links {
    flex-wrap: nowrap !important;
    gap: clamp(.9rem, 1.35vw, 1.5rem) !important;
  }
  .nav-links > a,
  .nav-links > .service-nav-dropdown,
  .nav-links .nav-link,
  .service-menu-button {
    flex: 0 0 auto;
    white-space: nowrap !important;
  }
  .nav-links .nav-link { line-height: 1.1 !important; }
}
.service-mobile-link {
  width: 100%;
  min-height: 60px;
  padding: 1rem 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  color: #ff7a2e !important;
  background: transparent;
  font: 700 1rem/1.2 Aeonik, sans-serif !important;
  text-decoration: none;
  box-sizing: border-box;
}
.service-mobile-link:hover {
  padding-left: 1.8rem !important;
  background: rgba(255,255,255,.05);
}
.service-mobile-link i { margin-left: auto; }
.service-mobile-group { width: 100%; display: grid; }
.service-mobile-button {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.service-mobile-button i { transition: transform .2s ease; }
.service-mobile-group.open .service-mobile-button i { transform: rotate(180deg); }
.service-mobile-submenu {
  display: none;
  margin: 0 .75rem .5rem;
  padding: .4rem;
  border-radius: .8rem;
  background: rgba(255,255,255,.06);
}
.service-mobile-group.open .service-mobile-submenu { display: grid; }
.service-mobile-submenu a {
  min-height: 48px;
  padding: .7rem .8rem;
  display: flex;
  align-items: center;
  border-radius: .6rem;
  color: #fff;
  text-decoration: none;
  font-size: .88rem;
}
.service-mobile-submenu a:hover { background: rgba(255,106,26,.16); }

/* Vitrine principal de TV: grades oficiais legíveis e ampliáveis. */
.section-tv[data-home-tv-enhanced] {
  padding: 4.5rem clamp(1rem, 4vw, 3.5rem) 5.5rem !important;
  color: #261631;
  background:
    radial-gradient(circle at 92% 8%, rgba(255,91,20,.12), transparent 25%),
    radial-gradient(circle at 8% 42%, rgba(120,18,179,.12), transparent 30%),
    #f8f5fb;
}
.home-tv-shell { max-width: 1220px; margin: 0 auto; }
.home-tv-heading { max-width: 830px; margin: 0 auto 2rem; text-align: center; }
.home-tv-heading p {
  margin: 0 0 .7rem;
  color: #ff5a0a;
  font: 700 .8rem/1.2 Aeonik, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-tv-heading h2 {
  margin: 0;
  color: #281632;
  font: 700 clamp(2.1rem, 4vw, 3.6rem)/1 Aeonik, sans-serif;
  letter-spacing: -.045em;
}
.home-tv-heading span {
  display: block;
  max-width: 700px;
  margin: 1rem auto 0;
  color: #6f6376;
  font: 400 1.02rem/1.55 Aeonik, sans-serif;
}
.home-tv-plans { display: grid; gap: 1.35rem; }
.home-tv-plan {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  border: 1px solid #ded3e5;
  border-radius: 1.6rem;
  background: #fff;
  box-shadow: 0 22px 58px rgba(47,15,70,.11);
}
.home-tv-plan.power-elite {
  grid-template-columns: minmax(320px, .65fr) minmax(0, 1.35fr);
  border-color: #8d42bd;
}
.home-tv-plan.power-elite .home-tv-copy { order: -1; color: #fff; background: linear-gradient(145deg,#19032f,#54107a); }
.home-tv-plan.power-elite .home-tv-copy > p { color: #e8ddec; }
.home-tv-plan.power-elite .home-plan-kicker { color: #ff9d69 !important; }
.home-tv-plan.power-elite .home-plan-price,
.home-tv-plan.power-elite .home-tv-copy em { color: #fff; }
.home-tv-media {
  min-height: 360px;
  padding: 1rem;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 12% 12%, rgba(255,92,20,.28), transparent 34%),
    linear-gradient(145deg,#210336 0%,#4b0872 52%,#7214a4 100%);
}
.home-tv-plan.sat-max .home-tv-media {
  background:
    radial-gradient(circle at 88% 12%, rgba(255,92,20,.2), transparent 30%),
    linear-gradient(145deg,#18032f 0%,#430664 55%,#68109a 100%);
}
.home-tv-media.image-media { padding: .8rem; background: #160228; }
.home-tv-media.image-media > img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 510px;
  object-fit: contain;
  border-radius: 1rem;
}
.home-logo-wall {
  width: 100%;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 1.15rem;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 42px rgba(0,0,0,.2);
}
.home-logo-wall.max-preview { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-channel-logo {
  min-width: 0;
  min-height: 68px;
  padding: .38rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #ece7ef;
  border-radius: .7rem;
  background: #fff;
}
.home-channel-logo img { display: block; width: 100%; height: 48px; object-fit: contain; }
.home-tv-copy { padding: clamp(1.5rem, 3.5vw, 2.6rem); display: flex; flex-direction: column; justify-content: center; text-align: left; }
.home-plan-kicker {
  margin: 0 0 .45rem !important;
  color: #6813a1 !important;
  font: 700 .78rem/1.3 Aeonik, sans-serif !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-tv-copy h2 {
  margin: 0;
  color: inherit;
  font: 700 clamp(1.9rem, 3vw, 3rem)/1 Aeonik, sans-serif;
  letter-spacing: -.04em;
}
.home-tv-copy > p {
  margin: .85rem 0 1rem;
  color: #6f6376;
  font: 400 1rem/1.55 Aeonik, sans-serif;
}
.home-plan-price { display: flex; align-items: flex-start; color: #6813a1; }
.home-plan-price small { margin: .55rem .2rem 0 0; font-weight: 700; }
.home-plan-price strong { font: 700 4.1rem/.88 Aeonik, sans-serif; letter-spacing: -.06em; }
.home-plan-price sup { margin-top: .28rem; font-size: 1.25rem; font-weight: 700; }
.home-plan-price span { align-self: flex-end; margin: 0 0 .3rem .2rem; color: inherit; font-size: .75rem; }
.home-tv-copy em { margin: .7rem 0 1.15rem; color: #74677b; font-size: .76rem; font-style: normal; line-height: 1.45; }
.home-plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.home-plan-actions button,
.home-plan-actions a {
  min-height: 46px;
  padding: .75rem .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .8rem;
  font: 700 .86rem/1.2 Aeonik, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.home-plan-actions button { border: 1px solid #c6afd5; color: #6813a1; background: #fff; }
.home-plan-actions a { color: #fff; background: #ff4c00; box-shadow: 0 10px 24px rgba(255,76,0,.22); }
.home-grade-dialog {
  width: min(94vw, 1380px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 1.2rem;
  color: #fff;
  background: #18032e;
  box-shadow: 0 35px 110px rgba(0,0,0,.55);
}
.home-grade-dialog::backdrop { background: rgba(7,0,13,.84); backdrop-filter: blur(6px); }
.home-grade-dialog-top {
  min-height: 68px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.home-grade-dialog-top h2 { margin: 0; font: 700 1.15rem/1.25 Aeonik, sans-serif; }
.home-grade-close {
  min-height: 42px;
  padding: .6rem .85rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: .7rem;
  color: #fff;
  background: transparent;
  font: 700 .82rem/1 Aeonik, sans-serif;
  cursor: pointer;
}
.home-grade-dialog-body { max-height: calc(92vh - 68px); padding: 1rem; overflow: auto; background: #f5f1f7; }
.home-grade-summary { margin: 0 0 .9rem; color: #50345f; font: 700 .9rem/1.45 Aeonik, sans-serif; text-align: left; }
.home-expanded-image { display: block; width: 100%; height: auto; max-height: calc(92vh - 100px); object-fit: contain; border-radius: .9rem; background: #18032e; }
.home-expanded-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: .55rem;
}
.home-expanded-logo-grid.max-grid { grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); }
.home-expanded-logo-grid .home-channel-logo { min-height: 76px; }
.home-expanded-logo-grid .home-channel-logo img { height: 56px; }
.home-expanded-logo-grid .reserved-logo { display: flex; flex-direction: column; color: #5d4d66; text-align: center; }
.home-expanded-logo-grid .reserved-logo strong { font-size: .72rem; text-transform: uppercase; }
.home-expanded-logo-grid .reserved-logo small { margin-top: .15rem; font-size: .65rem; }

@media (max-width: 1024px) {
  .header-glass {
    height: 3.5rem !important;
    padding: 0 1rem !important;
  }
  .header-start {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .logo-container img { height: 2rem !important; }
  .header-middle,
  .header-end { display: none !important; }
  .mobile-actions {
    display: flex !important;
    align-items: center !important;
    gap: .8rem !important;
    margin-left: auto !important;
  }
}

/* Algumas telas Retina reportam uma largura CSS menor, embora sejam desktops físicos.
   Nelas preservamos o menu completo, reduzindo apenas a densidade para caber. */
@media (max-width: 1024px) {
  html.physical-desktop .header-glass {
    gap: .45rem !important;
    padding: 0 .65rem !important;
  }
  html.physical-desktop .header-start {
    width: auto !important;
    justify-content: flex-start !important;
  }
  html.physical-desktop .logo-container img { height: 1.65rem !important; }
  html.physical-desktop .header-middle {
    min-width: 0;
    display: flex !important;
    flex: 1 1 auto;
    justify-content: center;
  }
  html.physical-desktop .header-end { display: none !important; }
  html.physical-desktop .mobile-actions { display: none !important; }
  html.physical-desktop .nav-links {
    gap: .35rem !important;
    justify-content: center;
  }
  html.physical-desktop .nav-links .nav-link {
    padding: .25rem .1rem !important;
    font-size: .62rem !important;
    line-height: 1 !important;
  }
  html.physical-desktop .service-menu-button { gap: .18rem; }
  html.physical-desktop .service-menu-button span {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
    font-size: .56rem;
  }
}

/* Desktop compacto: preserva o menu completo em janelas menores sem deixar itens tortos. */
@media (min-width: 1025px) and (max-width: 1600px) {
  .header-glass {
    gap: 1rem !important;
    padding: 0 .85rem !important;
  }
  .logo-container img { height: 2.15rem !important; }
  .nav-links {
    gap: clamp(.45rem, 1vw, .9rem) !important;
  }
  .nav-links .nav-link {
    padding: 0 .1rem !important;
    font-size: clamp(.72rem, .72vw, .86rem) !important;
  }
  .service-menu-button { gap: .3rem; }
  .service-menu-button span {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
    font-size: .78rem;
  }
  .header-end { gap: .65rem !important; }
  .segment-toggle .toggle-track { width: 166px !important; height: 36px !important; }
  .segment-toggle .toggle-thumb { width: 79px !important; height: 28px !important; }
  .segment-toggle .toggle-thumb.moved { transform: translate(79px) !important; }
  .segment-toggle .toggle-label { font-size: .75rem !important; }
  .portal-btn { padding: .5rem .8rem !important; font-size: .78rem !important; }
}

@media (min-width: 1100px) and (max-width: 1380px) {
  .nav-links { gap: clamp(.5rem, 1vw, 1rem) !important; }
  .nav-links .nav-link { padding: 0 .1rem !important; font-size: .8rem !important; }
}

@media (max-width: 900px) {
  .home-tv-plan,
  .home-tv-plan.power-elite { grid-template-columns: 1fr; }
  .home-tv-plan.power-elite .home-tv-copy { order: 0; }
  .home-tv-media { min-height: 0; }
  .home-tv-media.image-media > img { height: auto; max-height: none; }
}

@media (max-width: 640px) {
  .header-glass { border-radius: 16px !important; }
  .slim-skip-link { top: 8px; left: 8px; }
  .sat-tv-footer-logo { left: 18px; bottom: 18px; width: 58px; max-height: 52px; }
  .section-tv[data-home-tv-enhanced] { padding: 3rem 1rem 4rem !important; }
  .home-logo-wall,
  .home-logo-wall.max-preview { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; padding: .7rem; }
  .home-channel-logo { min-height: 58px; }
  .home-channel-logo img { height: 40px; }
  .home-plan-actions { grid-template-columns: 1fr; }
  .home-grade-dialog { width: 96vw; max-height: 94vh; }
  .home-grade-dialog-body { max-height: calc(94vh - 68px); padding: .7rem; }
  .home-expanded-logo-grid,
  .home-expanded-logo-grid.max-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .home-expanded-logo-grid .home-channel-logo { min-height: 58px; }
  .home-expanded-logo-grid .home-channel-logo img { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-menu-button span, .service-mobile-button i { transition: none; }
}
