/* "Serviços agora": five white cards (template-parts/home-servicos.php). Mobile first: 1 column, 2 from 600px, 3 + 2
   from 1024px, 5 from 1240px. Loaded only on the home. */
.servicos {
  --sv-card: #fff;
  --sv-border: #e6e8ec;
  --sv-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .05);
  --sv-ink: #111418;
  --sv-text: #2b3036;
  --sv-muted: #6b7178;
  --sv-dash: #e3e6ea;
  --sv-up: #16883a;
  --sv-down: #e5484d;
  --sv-ball: #0b7a3b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .servicos {
    --sv-card: #17272f;
    --sv-border: #2b3e46;
    --sv-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --sv-ink: #f0f4f5;
    --sv-text: #d5dfe3;
    --sv-muted: #a9b7bd;
    --sv-dash: #33454d;
    --sv-up: #3fcf6b;
    --sv-down: #ff6b70;
    --sv-ball: #16a34a;
  }
}
:root[data-theme="dark"] .servicos {
  --sv-card: #17272f;
  --sv-border: #2b3e46;
  --sv-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --sv-ink: #f0f4f5;
  --sv-text: #d5dfe3;
  --sv-muted: #a9b7bd;
  --sv-dash: #33454d;
  --sv-up: #3fcf6b;
  --sv-down: #ff6b70;
  --sv-ball: #16a34a;
}

.servicos .section-heading { margin-bottom: .75rem; }
.servicos-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.servicos-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.05rem 1.15rem .95rem;
  border: 1px solid var(--sv-border);
  border-radius: 1rem;
  color: var(--sv-text);
  background: var(--sv-card);
  box-shadow: var(--sv-shadow);
  font-size: .875rem;
  line-height: 1.35;
  overflow-wrap: normal;
}
.servicos-title {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .7rem;
  color: var(--sv-ink);
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.25;
}
.servicos-title > span { font-size: 1rem; line-height: 1; }

/* Rows: label left, value right, dashed dividers. */
.servicos-rows { margin: 0; padding: 0; list-style: none; }
.servicos-rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.6rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--sv-dash);
}
.servicos-rows li:last-child { border-bottom: 0; }
/* Brasileirão: the two first face each other (Parte C). */
.servicos-rows li.servicos-row--destaque { margin: .25rem -.6rem 0; padding: .55rem .6rem; border: 0; border-radius: .6rem; background: color-mix(in srgb, var(--sv-up) 12%, transparent); }
.servicos-row--destaque > span { color: var(--sv-ink); font-weight: 700; }
.servicos-row--destaque > span small { font-weight: 400; }
.servicos-rows li > span { display: grid; min-width: 0; }
.servicos-rows small { color: var(--sv-muted); font-size: .75rem; }
.servicos-rows strong {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .35rem;
  color: var(--sv-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Footer with the source, always at the bottom of the card. */
.servicos-source { margin: auto 0 0; padding-top: .9rem; color: var(--sv-muted); font-size: .78rem; line-height: 1.45; }
.servicos-source-name { white-space: nowrap; }
/* The unit sits next to the number: cancels the row's flex gap. */
.servicos-rows strong .servicos-unit { margin-left: -.35rem; white-space: pre; }

/* Weather. */
.servicos-tempo-city { display: flex; flex: 1; flex-direction: column; }
.servicos-tempo-city[hidden] { display: none; }
.servicos-temp { margin: 0 0 .35rem; color: var(--sv-ink); font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.servicos-icon { display: block; flex: 0 0 auto; width: 1.15rem; height: 1.15rem; overflow: visible; }

/* Quotes: small triangles, green up and red down. */
.servicos-arrow { display: inline-block; width: 0; height: 0; border-right: .3rem solid transparent; border-left: .3rem solid transparent; }
.servicos-arrow--up { border-bottom: .5rem solid var(--sv-up); }
.servicos-arrow--down { border-top: .5rem solid var(--sv-down); }

/* Mega-Sena: contest line, green balls with the number in white, bold and centered (always one line: they shrink in a
   narrow card), then the rows. */
.servicos-contest { margin: -.2rem 0 .6rem; color: var(--sv-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.servicos-balls { display: flex; gap: .4rem; margin: 0 0 .35rem; padding: 0; list-style: none; }
.servicos-balls li {
  display: grid;
  flex: 0 1 2.15rem;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: var(--sv-ball);
  font-size: .8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

@media (min-width: 600px) {
  .servicos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .servicos-card { padding: 1.2rem 1.35rem 1.05rem; }
}
@media (min-width: 1024px) {
  .servicos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .servicos-temp { font-size: 2.2rem; }
}
@media (min-width: 1240px) {
  .servicos-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .85rem; }
  .servicos-card { padding: 1.1rem 1.05rem .95rem; font-size: .8125rem; }
  .servicos-rows li { gap: .5rem; }
  .servicos-balls { gap: .3rem; }
  /* Narrow card: the WSL points without the unit (the footer says "Pontos no Circuito Mundial"). */
  .servicos-wsl .servicos-unit { display: none; }
  .servicos-source { font-size: .74rem; }
}

/* Light motion, only for who has not asked to reduce it. Triggered when the section enters the screen (servicos.js). */
@media (prefers-reduced-motion: no-preference) {
  .servicos-tempo-city.is-in { animation: sv-fade .35s ease-out both; }
  .servicos.is-visible .si-sun { transform-origin: center; transform-box: fill-box; animation: sv-spin 18s linear infinite; }
  .servicos.is-visible .si-cloud { animation: sv-drift 4s ease-in-out infinite alternate; }
  .servicos.is-visible .si-moon { transform-origin: center; transform-box: fill-box; animation: sv-sway 5s ease-in-out infinite alternate; }
  .servicos.is-visible .si-rain { animation: sv-rain 1.1s linear infinite; }
  .servicos.is-visible .si-bolt { animation: sv-flash 2.4s ease-in-out infinite; }
  .servicos.is-visible .servicos-arrow { animation: sv-arrow .5s ease-out .2s both; }
  .servicos.is-visible .servicos-balls li { animation: sv-pop .38s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i) * 80ms); }
  .servicos.is-pending .servicos-balls li { opacity: 0; }
}
@keyframes sv-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes sv-spin { to { transform: rotate(360deg); } }
@keyframes sv-drift { from { transform: translateX(-.6px); } to { transform: translateX(.9px); } }
@keyframes sv-sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes sv-rain { from { transform: translateY(-1.5px); opacity: 1; } to { transform: translateY(2px); opacity: .2; } }
@keyframes sv-flash { 0%, 70%, 100% { opacity: 1; } 80% { opacity: .25; } }
@keyframes sv-arrow { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes sv-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }

/* Bloco 17-11-servicos: tempo com seletor de cidade, mar, cotações com variação, Mega-Sena com o link da Caixa e a página /previsao.
   Mobile first: 1 coluna; a partir de 700px o tempo ocupa 2 colunas; a partir de 1100px, 3 colunas (tempo com 2). */
.servicos-grid--v2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) {
  .servicos-grid--v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .servicos-grid--v2 .servicos-tempo2 { grid-column: span 2; }
}
@media (min-width: 1100px) {
  .servicos-grid--v2 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .servicos-grid--v2 .servicos-card { padding: 1.15rem 1.25rem 1rem; font-size: .875rem; }
  .servicos-grid--v2 .servicos-wsl .servicos-unit { display: inline; }
}
.tempo-cidades { display: flex; gap: .35rem; margin: 0 0 .85rem; overflow-x: auto; scrollbar-width: none; }
.tempo-cidades::-webkit-scrollbar { display: none; }
.tempo-cidades button { flex: 0 0 auto; min-height: 2.25rem; padding: .3rem .85rem; border: 1px solid var(--sv-border); border-radius: 999px; color: var(--sv-text); background: transparent; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.tempo-cidades button[aria-selected="true"] { border-color: var(--lnh-blue, #0f6b8a); color: #fff; background: var(--lnh-blue, #0f6b8a); }
.tempo-painel[hidden] { display: none; }
.tempo-painel { display: flex; flex-direction: column; }
.tempo-agora { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; }
.tempo-agora-icone .servicos-icon { width: 2.6rem; height: 2.6rem; }
.tempo-temp { margin: 0; color: var(--sv-ink); font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.tempo-agora-texto p { margin: 0; }
.tempo-ceu { color: var(--sv-ink); font-weight: 700; }
.tempo-sensacao { color: var(--sv-muted); font-size: .82rem; }
.tempo-dados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .9rem; margin: 0 0 .75rem; }
.tempo-dados div { min-width: 0; }
.tempo-dados dt { color: var(--sv-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.tempo-dados dd { margin: 0; color: var(--sv-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.tempo-horas { display: flex; gap: .4rem; margin: 0 -.2rem; padding: .2rem .2rem .35rem; overflow-x: auto; list-style: none; scroll-snap-type: x proximity; }
.tempo-horas li { display: grid; flex: 0 0 3.6rem; justify-items: center; gap: .2rem; padding: .45rem .2rem; border: 1px solid var(--sv-dash); border-radius: .6rem; scroll-snap-align: start; font-variant-numeric: tabular-nums; }
.tempo-horas .servicos-icon { width: 1.35rem; height: 1.35rem; }
.tempo-hora { color: var(--sv-muted); font-size: .74rem; }
.tempo-horas strong { color: var(--sv-ink); }
.tempo-mm { min-height: 1em; color: #2563eb; font-size: .68rem; white-space: nowrap; }
.tempo-link { align-self: flex-start; margin-top: .75rem; color: var(--lnh-blue, #0f6b8a); font-weight: 700; text-decoration: none; }
.tempo-link:hover, .tempo-link:focus-visible { text-decoration: underline; }
.mar-tabua { margin: .55rem 0 .2rem; color: var(--sv-text); font-size: .82rem; font-variant-numeric: tabular-nums; }
.mar-tabua span { color: var(--sv-muted); }
.mar-ondas { margin-top: .4rem; }
.cotacao-var { font-size: .76rem; font-weight: 700; }
.cotacao-var--up { color: var(--sv-up); }
.cotacao-var--down { color: var(--sv-down); }
.cotacao-var--flat { color: var(--sv-muted); }
.mega-apostar { display: inline-flex; align-self: flex-start; align-items: center; min-height: 2.4rem; margin-top: .7rem; padding: .35rem .95rem; border-radius: .55rem; color: #fff; background: var(--sv-ball); font-weight: 700; text-decoration: none; }
.mega-aviso { margin: .45rem 0 0; color: var(--sv-muted); font-size: .72rem; }

/* /previsao */
.forecast-page.servicos .tempo-cidades { margin-bottom: 1rem; }
.previsao-bloco { margin-bottom: 1rem; }
.tempo-horas--24 li { flex-basis: 4.6rem; }
.tempo-vento { color: var(--sv-muted); font-size: .68rem; white-space: nowrap; }
.previsao-dias { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.previsao-dia { display: grid; grid-template-columns: 4.3rem minmax(0, 1fr) auto; grid-template-areas: "data ceu temps" "data chuva vento"; align-items: center; gap: .15rem .6rem; padding: .65rem 0; border-bottom: 1px dashed var(--sv-dash); font-variant-numeric: tabular-nums; }
.previsao-dia:last-child { border-bottom: 0; }
.previsao-data { grid-area: data; display: grid; }
.previsao-data span { color: var(--sv-muted); font-size: .78rem; }
.previsao-ceu { grid-area: ceu; display: flex; align-items: center; gap: .35rem; color: var(--sv-ink); font-weight: 600; }
.previsao-temps { grid-area: temps; text-align: right; white-space: nowrap; }
.previsao-temps strong { color: var(--sv-ink); }
.previsao-temps span { color: var(--sv-muted); }
.previsao-chuva { grid-area: chuva; color: #2563eb; font-size: .8rem; }
.previsao-vento { grid-area: vento; color: var(--sv-muted); font-size: .76rem; text-align: right; white-space: nowrap; }
.mare-dias { display: grid; gap: .1rem; margin: 0 0 .5rem; padding: 0; list-style: none; }
.mare-dias li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .5rem; padding: .5rem 0; border-bottom: 1px dashed var(--sv-dash); font-size: .85rem; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .forecast-page.servicos { max-width: 60rem; }
  .previsao-dia { grid-template-columns: 6rem minmax(0, 1.4fr) 6rem minmax(0, 1fr) 9rem; grid-template-areas: "data ceu temps chuva vento"; }
}
