/* Tema opcional. A preferência é aplicada antes da primeira pintura. */
.header .container { gap: 18px; }
.header .container > a { min-width: 0; flex-shrink: 1; }
.header .logo { display: block; max-width: 100%; height: auto; }
.header .nav-menu { margin-left: auto; flex-shrink: 0; }
.theme-toggle { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #66717b; border-radius: 7px; background: transparent; color: #39434c; cursor: pointer; display: grid; place-items: center; }
.theme-toggle span, .theme-toggle svg { display: block; width: 21px; height: 21px; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: #e2e5e8; color: #20262c; }
.theme-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (min-width: 769px) and (max-width: 1100px) {
  .header .nav-menu ul { gap: 16px; align-items: center; }
  .header .logo { max-width: 260px; }
}
@media (max-width: 768px) {
  .header .container > a { margin-right: auto; }
  .header .logo { max-height: 50px; }
}
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] body { background: #101923; color: #e4eaf1; }
html[data-theme="dark"] :is(h1,h2,h3) { color: #d4e5ff; }
html[data-theme="dark"] .header { background: rgba(16,25,35,.96); box-shadow: 0 2px 10px #0005; }
html[data-theme="dark"] .header .logo { filter: brightness(0) invert(1); }
html[data-theme="dark"] .header .nav-menu a { color: #e4eaf1; }
html[data-theme="dark"] .theme-toggle { border-color: #818990; color: #e1e4e7; }
html[data-theme="dark"] .theme-toggle:hover { background: #303840; color: #fff; }
html[data-theme="dark"] :is(.services,.about,.obras-cta) { background: #172432; }
html[data-theme="dark"] :is(.obras,.service-card,.login-card,.obras-dialog) { background: #101923; color: #e4eaf1; }
html[data-theme="dark"] .service-card .card-image-container img { border-color: #101923; }
html[data-theme="dark"] :is(.service-card p,.about .about-text p,.obras-description p,.obra-photo figcaption,.obras-intro .obras-hint,.form-provider-info span,.form-provider-info a) { color: #becbd9; }
html[data-theme="dark"] :is(.obras-eyebrow,.obras-number,.obras-cta p,.login-card h3,.login-card label,.login-close) { color: #d4e5ff; }
html[data-theme="dark"] .obras-entry { border-color: #344455; }
html[data-theme="dark"] :is(.obra-photo a,.obras-dialog-image,.obras-dialog button) { background: #223344; }
html[data-theme="dark"] .obras-dialog button { color: #e4eaf1; }
html[data-theme="dark"] .obras-dialog button:hover { background: #ffcc33; color: #073376; }
html[data-theme="dark"] :is(.contact-form input,.contact-form textarea,.login-card input) { background: #172432; color: #f1f5fa; border-color: #687b90; }
html[data-theme="dark"] :is(.contact-form input,.contact-form textarea,.login-card input)::placeholder { color: #b9c6d5; opacity: 1; }
html[data-theme="dark"] :is(.contact-form input,.contact-form textarea,.login-card input):focus { border-color: #ffcc33; }
html[data-theme="dark"] .login-error { color: #ffb0a7; }
html[data-theme="dark"] .hero .hero-content h1 { color: #fff; }
html[data-theme="dark"] .hero::after { background: linear-gradient(to bottom, transparent, #172432); }
html[data-theme="dark"] .footer { background: #0b1420; }
