/* Service pages dark theme override layer.
   Loaded after service.css; legacy files (style.css / service.css) are not modified.
   Uses the same localStorage key and theme-dark class as the main page. */

html { background: #ffffff; }
html.theme-dark { background: #0d1117; }

/* Smooth color transitions unless the user prefers reduced motion. */
.service-page,
.service-page * {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, fill 0.25s ease, stroke 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    .service-page,
    .service-page * {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- Theme toggle button ---------- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    pointer-events: none;
}

.theme-toggle .theme-icon-sun { display: none; }
.theme-dark .theme-toggle .theme-icon-moon { display: none; }
.theme-dark .theme-toggle .theme-icon-sun { display: block; }

/* ---------- Logo swap (header) ---------- */
.service-logo .logo-dark { display: none; }
.theme-dark .service-logo .logo-light { display: none; }
.theme-dark .service-logo .logo-dark { display: block; }

/* ---------- Dark palette ---------- */
.theme-dark {
    --ink: #f0f2f5;
    --soft: #b0b8c4;
    --accent: #b5bd00;
    --deep: #d4dc00;
    --tint: #1c1f05;
    --paper: #0d1117;
    --mist: #161b22;
    --line: #2a303c;
}

.theme-dark body.service-page {
    background: var(--paper) !important;
    color: var(--ink);
}

/* Topbar / header / anchorbar */
.theme-dark .service-topbar {
    background: #0d1117;
    color: #b0b8c4;
}

.theme-dark .service-topbar a { color: #ffffff; }

.theme-dark .service-header {
    background: rgba(13, 17, 23, 0.96);
    border-bottom-color: var(--line);
}

.theme-dark .anchorbar {
    background: rgba(13, 17, 23, 0.96);
    border-block-color: var(--line);
}

/* Hero */
.theme-dark .hero {
    background: radial-gradient(circle at 88% 0, rgba(181, 189, 0, 0.12), transparent 42%), #0d1117;
}

.theme-dark .hero:before {
    background-image: radial-gradient(rgba(240, 242, 245, 0.08) 1px, transparent 1px);
}

.theme-dark .crumbs,
.theme-dark .crumbs a { color: #b0b8c4; }
/* Section headings (legacy style.css sets h2 { color: black !important }) */
.theme-dark .section h2 { color: var(--ink) !important; }

.theme-dark .trust { border-top-color: var(--line); }

/* Buttons */
.theme-dark .button.secondary {
    background: transparent;
    color: var(--ink) !important;
    border-color: var(--line);
}

.theme-dark .menu-toggle {
    background: #0d1117;
    color: var(--ink);
    border-color: var(--line);
}

.theme-dark .service-nav.opened {
    background: #0d1117;
    border-bottom-color: var(--line);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

/* CTA block */
.theme-dark .inline-cta {
    background: var(--paper);
    color: var(--ink);
}

.theme-dark .inline-cta:before {
    border-color: rgba(181, 189, 0, 0.45);
}

.theme-dark .inline-cta h2 {
    color: var(--ink) !important;
}

.theme-dark .inline-cta p { color: var(--soft); }
.theme-dark .inline-cta p a { color: var(--deep); }

/* Footer */
.theme-dark .service-footer {
    background: #0d1117;
    color: #8b95a4;
}

.theme-dark .service-footer a { color: #ffffff; }

/* Modal */
.theme-dark .service-modal {
    background: rgba(0, 0, 0, 0.72);
}

.theme-dark .service-modal__card {
    background: #0d1117;
    border: 1px solid var(--line);
    color: var(--ink);
}

.theme-dark .service-modal__card h2 { color: var(--ink); }

.theme-dark .service-modal input[type="text"],
.theme-dark .service-modal input[type="tel"] {
    background: var(--mist);
    color: var(--ink);
    border-color: var(--line);
}

.theme-dark .service-modal__privacy a { color: var(--deep); }
.theme-dark .service-modal__close { color: var(--ink); }

/* Related links */
.theme-dark .related a {
    color: var(--ink) !important;
    border-color: var(--line);
}

.theme-dark .related a:hover,
.theme-dark .related a:focus-visible {
    color: var(--deep) !important;
    border-color: var(--accent);
}
