:root {
  color-scheme: light;
  --agk-theme-page: #f5f7fa;
  --agk-theme-surface: #ffffff;
  --agk-theme-surface-soft: #f8fbff;
  --agk-theme-text: #16202c;
  --agk-theme-muted: #647487;
  --agk-theme-border: #dfe7ef;
  --agk-theme-blue: #087bff;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --agk-theme-page: #071321;
  --agk-theme-surface: #0e1d2d;
  --agk-theme-surface-soft: #12263a;
  --agk-theme-text: #eaf2fa;
  --agk-theme-muted: #a3b4c5;
  --agk-theme-border: #293d51;
  --agk-theme-blue: #35a1ff;
  --agk-texto-escuro: var(--agk-theme-text);
  --agk-texto-cinza: var(--agk-theme-muted);
  --agk-bg-cartao: var(--agk-theme-surface);
  --agk-borda: var(--agk-theme-border);
  --agk-primario-claro: rgba(8, 123, 255, .18);
  --text-dark: var(--agk-theme-text);
  --text-gray: var(--agk-theme-muted);
  --white: var(--agk-theme-surface);
  --page: var(--agk-theme-page);
  --surface: var(--agk-theme-surface);
  --ink: var(--agk-theme-text);
  --muted: var(--agk-theme-muted);
  --line: var(--agk-theme-border);
  --shadow: 0 22px 60px rgba(0, 0, 0, .34), 0 4px 14px rgba(0, 0, 0, .22);
}

/* Seletor circular de tema, seguindo o padrão da central de políticas. */
.agk-theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 123, 255, .34) !important;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94) !important;
  background-image: none !important;
  color: #087bff !important;
  box-shadow: 0 3px 12px rgba(20, 50, 80, .08) !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.agk-theme-toggle:hover {
  transform: translateY(-1px);
  border-color: #087bff !important;
  background: #ffffff !important;
  box-shadow: 0 7px 18px rgba(8, 123, 255, .16) !important;
}

.agk-theme-toggle:focus-visible {
  outline: 3px solid rgba(8, 123, 255, .35);
  outline-offset: 3px;
}

.agk-theme-toggle svg {
  width: 20px;
  height: 20px;
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="dark"] .agk-theme-toggle {
  border-color: rgba(63, 166, 255, .4) !important;
  background: rgba(8, 123, 255, .1) !important;
  background-image: none !important;
  color: #58b5ff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18) !important;
}

html[data-theme="dark"] .agk-theme-toggle:hover {
  border-color: #58b5ff !important;
  background: rgba(8, 123, 255, .2) !important;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .24) !important;
}

html[data-theme="dark"] .agk-theme-toggle .agk-icon-sun,
html[data-theme="light"] .agk-theme-toggle .agk-icon-moon {
  display: block;
}

.agk-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.agk-theme-floating {
  position: fixed;
  z-index: 10020;
  top: 18px;
  right: 20px;
}

@media (max-width: 760px) {
  .agk-theme-floating {
    top: 10px;
    right: 12px;
  }
}

/* Modo escuro da home estática. */
html[data-theme="dark"] body.home {
  background-color: var(--agk-theme-page) !important;
  background-image: none !important;
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] .elementor-704 .elementor-element.elementor-element-c238a7c:not(.elementor-motion-effects-element-type-background),
html[data-theme="dark"] .elementor-704 .elementor-element.elementor-element-c238a7c > .elementor-motion-effects-container > .elementor-motion-effects-layer,
html[data-theme="dark"] .elementor-71 .elementor-element.elementor-element-5fdeb618:not(.elementor-motion-effects-element-type-background),
html[data-theme="dark"] .elementor-71 .elementor-element.elementor-element-5fdeb618 > .elementor-motion-effects-container > .elementor-motion-effects-layer {
  background-color: var(--agk-theme-page) !important;
  background-image: none !important;
}

html[data-theme="dark"] .elementor-704 .elementor-element.elementor-element-12658bd:not(.elementor-motion-effects-element-type-background),
html[data-theme="dark"] .elementor-704 .elementor-element.elementor-element-2bf0fa2:not(.elementor-motion-effects-element-type-background),
html[data-theme="dark"] .elementor-704 .elementor-element.elementor-element-3db1839:not(.elementor-motion-effects-element-type-background),
html[data-theme="dark"] .elementor-704 .elementor-element.elementor-element-7aafabb:not(.elementor-motion-effects-element-type-background),
html[data-theme="dark"] .elementor-704 .elementor-element.elementor-element-08a114c:not(.elementor-motion-effects-element-type-background) {
  background-color: var(--agk-theme-surface) !important;
  border-color: var(--agk-theme-border) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22) !important;
}

html[data-theme="dark"] .elementor-65 .elementor-element.elementor-element-a0dbc19:not(.elementor-motion-effects-element-type-background),
html[data-theme="dark"] .elementor-65 .elementor-element.elementor-element-a0dbc19 > .elementor-motion-effects-container > .elementor-motion-effects-layer,
html[data-theme="dark"] .elementor-65 .elementor-element.elementor-element-78e47bf9:not(.elementor-motion-effects-element-type-background),
html[data-theme="dark"] .elementor-65 .elementor-element.elementor-element-78e47bf9 > .elementor-motion-effects-container > .elementor-motion-effects-layer {
  background-color: var(--agk-theme-surface) !important;
  background-image: none !important;
  border-color: var(--agk-theme-border) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .36) !important;
}

html[data-theme="dark"] .elementor-65 .elementor-element.elementor-element-a0dbc19 .elementor-icon-box-title a,
html[data-theme="dark"] .elementor-65 .elementor-element.elementor-element-78e47bf9 .elementor-icon-box-title a {
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] .elementor-widget-heading .elementor-heading-title,
html[data-theme="dark"] .elementor-widget-icon-box .elementor-icon-box-title,
html[data-theme="dark"] .elementor-widget-icon-box .elementor-icon-box-title a,
html[data-theme="dark"] .elementor-widget-icon-box .elementor-icon-box-description,
html[data-theme="dark"] .elementor-widget-text-editor,
html[data-theme="dark"] .elementor-widget-text-editor p,
html[data-theme="dark"] .elementor-widget-text-editor li {
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] .elementor-widget-text-editor p,
html[data-theme="dark"] .elementor-widget-text-editor li,
html[data-theme="dark"] .elementor-widget-icon-box .elementor-icon-box-description {
  color: var(--agk-theme-muted) !important;
}

html[data-theme="dark"] .content-wrapper,
html[data-theme="dark"] .content-wrapper h1,
html[data-theme="dark"] .content-wrapper h2,
html[data-theme="dark"] .content-wrapper h3,
html[data-theme="dark"] .content-wrapper h4 {
  color: var(--agk-theme-text);
}

html[data-theme="dark"] .btn-secondary {
  border-color: var(--agk-theme-border) !important;
  background: var(--agk-theme-surface) !important;
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] .agk-client-carousel {
  border-color: rgba(72, 157, 235, .28) !important;
  background: linear-gradient(135deg, #0e1d2d 0%, #12263a 55%, #0d1b2a 100%) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2) !important;
}

html[data-theme="dark"] .agk-client-carousel::before {
  background: radial-gradient(circle at 8% 0%, rgba(0, 125, 255, .13), transparent 31%), radial-gradient(circle at 94% 100%, rgba(0, 125, 255, .1), transparent 35%) !important;
}

html[data-theme="dark"] .agk-client-carousel-meta,
html[data-theme="dark"] .agk-client-carousel-hint {
  color: var(--agk-theme-muted) !important;
}

html[data-theme="dark"] .agk-footer-simple,
html[data-theme="dark"] .agk-footer-simple-container {
  background-color: var(--agk-theme-page) !important;
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] .agk-footer-simple a,
html[data-theme="dark"] .agk-footer-simple-links,
html[data-theme="dark"] .agk-footer-simple-links-bottom,
html[data-theme="dark"] .agk-copyright-main,
html[data-theme="dark"] .agk-copyright-signature {
  color: var(--agk-theme-muted) !important;
}

html[data-theme="dark"] .agk-footer-payment-title {
  color: var(--agk-theme-muted) !important;
}

/* Mais contraste nos atalhos sociais do rodapé. */
html[data-theme="dark"] .agk-footer-simple .agk-btn-social {
  border-color: #3a5872 !important;
  background: #12263a !important;
  color: #eef6ff !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .24) !important;
}

html[data-theme="dark"] .agk-footer-simple .agk-btn-social svg {
  fill: currentColor !important;
}

html[data-theme="dark"] .agk-footer-simple .agk-btn-instagram { color: #ff79ae !important; }
html[data-theme="dark"] .agk-footer-simple .agk-btn-facebook { color: #69aaff !important; }
html[data-theme="dark"] .agk-footer-simple .agk-btn-whatsapp { color: #45df88 !important; }

html[data-theme="dark"] .agk-footer-simple .agk-btn-instagram:hover {
  border-color: transparent !important;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .agk-footer-simple .agk-btn-facebook:hover {
  border-color: transparent !important;
  background: #1877f2 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .agk-footer-simple .agk-btn-whatsapp:hover {
  border-color: transparent !important;
  background: #25d366 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .agk-payment-method {
  border-color: #3a5872 !important;
  background: var(--agk-theme-surface) !important;
  color: var(--agk-theme-text) !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .24) !important;
}

html[data-theme="dark"] .agk-payment-method:hover,
html[data-theme="dark"] .agk-payment-method:focus-visible {
  border-color: #2999ff !important;
  background: var(--agk-theme-surface-soft) !important;
}

html[data-theme="dark"] .agk-payment-icon {
  color: #f3f8ff !important;
}

html[data-theme="dark"] .agk-payment-method .agk-payment-icon svg {
  stroke: #f3f8ff !important;
  stroke-width: 2.5 !important;
}

html[data-theme="dark"] .agk-payment-method .agk-payment-icon svg text {
  fill: #f3f8ff !important;
}

html[data-theme="dark"] .agk-payment-label {
  color: #eaf2fa !important;
}

html[data-theme="dark"] #contato-conteudo .agk-form-field,
html[data-theme="dark"] #contato-conteudo .agk-form-field label {
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] #contato-conteudo .agk-form-field input,
html[data-theme="dark"] #contato-conteudo .agk-form-field textarea {
  border-color: var(--agk-theme-border) !important;
  background: var(--agk-theme-surface-soft) !important;
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] #contato-conteudo .agk-form-field input::placeholder,
html[data-theme="dark"] #contato-conteudo .agk-form-field textarea::placeholder {
  color: #91a5b9 !important;
}

html[data-theme="dark"] .ti-widget .ti-review-item,
html[data-theme="dark"] .ti-widget .ti-col_4,
html[data-theme="dark"] .ti-widget .ti-widget-container > div {
  border-color: var(--agk-theme-border) !important;
  background-color: var(--agk-theme-surface) !important;
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] .ti-widget,
html[data-theme="dark"] .ti-widget p,
html[data-theme="dark"] .ti-widget span {
  color: var(--agk-theme-text) !important;
}

/* Mantém o menu legível no escuro e preserva as cores originais da marca. */
html[data-theme="dark"] .elementor-65 .elementor-icon-box-title,
html[data-theme="dark"] .elementor-65 .elementor-icon-box-title a,
html[data-theme="dark"] .elementor-65 .elementor-icon-box-description,
html[data-theme="dark"] .elementor-65 .elementor-icon-box-icon .elementor-icon {
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] .elementor-65 .elementor-icon-box-icon .elementor-icon svg,
html[data-theme="dark"] .elementor-65 .elementor-icon-box-icon .elementor-icon svg path {
  fill: currentColor !important;
}

html[data-theme="dark"] body.home .elementor-flip-box__front,
html[data-theme="dark"] body.home .elementor-flip-box__front .elementor-flip-box__layer__overlay {
  border-color: var(--agk-theme-border) !important;
  background-color: var(--agk-theme-surface) !important;
}

html[data-theme="dark"] body.home .elementor-flip-box__front .elementor-flip-box__layer__title,
html[data-theme="dark"] body.home .elementor-flip-box__front .elementor-flip-box__layer__description,
html[data-theme="dark"] body.home .elementor-flip-box__front .elementor-icon {
  color: var(--agk-theme-text) !important;
}

html[data-theme="dark"] body.home .elementor-flip-box__front .elementor-icon svg,
html[data-theme="dark"] body.home .elementor-flip-box__front .elementor-icon svg path {
  fill: currentColor !important;
}

/* Modo escuro da página 404. */
html[data-theme="dark"] .error-card {
  border-color: rgba(96, 132, 168, .22);
  background: rgba(14, 29, 45, .97);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32), 0 4px 16px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .error-badge {
  border-color: rgba(53, 161, 255, .3);
  background: rgba(8, 123, 255, .13);
  color: #70bdff;
}

html[data-theme="dark"] .requested-url {
  border-color: var(--agk-theme-border);
  background: #0a1826;
  color: var(--agk-theme-muted);
}

html[data-theme="dark"] #urlPath { color: #d7e4f1; }

html[data-theme="dark"] .button-secondary {
  border-color: #2a4055;
  background: #102033;
  color: var(--agk-theme-text);
}

html[data-theme="dark"] .button-secondary:hover { background: #162c42; }

html[data-theme="dark"] .mascot-caption,
html[data-theme="dark"] .error-meta,
html[data-theme="dark"] .topbar-note,
html[data-theme="dark"] .help-links {
  color: var(--agk-theme-muted);
}

html[data-theme="dark"] .topbar-note,
html[data-theme="dark"] .help-links a {
  color: var(--agk-theme-muted);
}

html[data-theme="dark"] .help-links a:hover { color: #65b7ff; }

@media (prefers-reduced-motion: reduce) {
  .agk-theme-toggle { transition: none; }
}
