/* Theme switcher (light + dark) + dark theme overrides */

.cdp-section--theme {
    border-bottom: none;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.theme-switch {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 3px;
}

.theme-switch__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    padding: 4px 8px;
    border: 1px solid var(--black);
    background: var(--white);
    color: var(--black);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.theme-switch__icon {
    flex-shrink: 0;
    display: block;
    width: 14px;
    height: 14px;
}

@media (max-width: 991.98px) {
    .theme-switch__btn {
        padding: 5px 6px;
    }

    .theme-switch__btn span {
        display: none;
    }
}

.theme-switch__btn:hover {
    background: var(--yellow);
}

.theme-switch__btn[aria-pressed="true"] {
    background: var(--yellow);
    color: var(--black);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111;
    --text: #f2f2f2;
    --muted: #d4d4d4;
    --border: #3a3a3a;
    --navy: #f2f2f2;
    --blue-dark: #f2f2f2;
    --shadow: 0 4px 24px rgba(0, 0, 0, .45);
    --surface: #1a1a1a;
    --surface-2: #222;
}

html[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}

html[data-theme="dark"] .header {
    background: var(--surface);
    box-shadow: 0 1px 0 #333;
}

html[data-theme="dark"] .header__logo img {
    filter: invert(1);
}

html[data-theme="dark"] .header__nav-list > li > a,
html[data-theme="dark"] .header__nav-list > li > span,
html[data-theme="dark"] .header__nav-list .submenu-toogle {
    color: var(--text);
}

html[data-theme="dark"] .header__nav-list > li > a:hover,
html[data-theme="dark"] .header__nav-list > li.active > a,
html[data-theme="dark"] .header__nav-list > li.active > span,
html[data-theme="dark"] .header__nav-list > li:has(.sub-menu > li.active) > a,
html[data-theme="dark"] .header__nav-list > li.is-open .submenu-toogle {
    color: var(--black);
}

html[data-theme="dark"] .header__burger {
    background: var(--surface);
}

html[data-theme="dark"] .header__nav-list .sub-menu {
    background: var(--surface);
    border-color: #444;
    box-shadow: 8px 8px 0 var(--yellow);
}

html[data-theme="dark"] .header__nav-list .sub-menu li + li {
    border-top-color: rgba(255, 255, 255, .1);
}

html[data-theme="dark"] .header__nav-list .sub-menu a {
    color: rgba(255, 255, 255, .82);
}

html[data-theme="dark"] .header__nav-list .sub-menu a:hover,
html[data-theme="dark"] .header__nav-list .sub-menu a:focus-visible,
html[data-theme="dark"] .header__nav-list .sub-menu li.active > a,
html[data-theme="dark"] .header__nav-list .sub-menu li.active > span {
    color: var(--black);
}

@media (max-width: 991.98px) {
    html[data-theme="dark"] .header__nav-wrap {
        background: var(--surface);
    }

    html[data-theme="dark"] .header__nav-list > li > a,
    html[data-theme="dark"] .header__nav-list > li > span {
        border-bottom-color: #333;
    }

    html[data-theme="dark"] .header__nav-list .sub-menu {
        background: var(--surface-2);
        border-color: #444;
    }
}

html[data-theme="dark"] .cdp-section--theme {
    border-bottom: none;
}

html[data-theme="dark"] .theme-switch__btn {
    background: var(--surface-2);
    border-color: #555;
    color: var(--text);
}

html[data-theme="dark"] .theme-switch__btn:hover,
html[data-theme="dark"] .theme-switch__btn[aria-pressed="true"] {
    background: var(--yellow);
    border-color: var(--black);
    color: var(--black);
}

html[data-theme="dark"] .contact-drop-panel {
    background: var(--surface);
    border-color: #444;
}

html[data-theme="dark"] .cdp-label {
    color: rgba(255, 255, 255, .45);
}

html[data-theme="dark"] .cdp-phone {
    color: var(--text);
}

html[data-theme="dark"] .cdp-mail {
    color: rgba(255, 255, 255, .62);
    border-bottom-color: rgba(255, 255, 255, .22);
}

html[data-theme="dark"] .cdp-mail:hover {
    color: var(--black);
    border-color: var(--black);
}

html[data-theme="dark"] .cdp-hours {
    background: var(--surface-2);
}

html[data-theme="dark"] .cdp-hours-main {
    color: var(--text);
}

html[data-theme="dark"] .cdp-hours-sub {
    color: rgba(255, 255, 255, .55);
}

html[data-theme="dark"] .cdp-divider {
    background: rgba(255, 255, 255, .1);
}

html[data-theme="dark"] .btn--outline {
    border-color: var(--text);
    color: var(--text);
}

html[data-theme="dark"] .btn--outline:hover {
    border-color: var(--yellow);
    color: var(--black);
}

html[data-theme="dark"] .btn--white {
    background: var(--surface);
    color: var(--text);
    border-color: #555;
}

html[data-theme="dark"] .btn--white:hover {
    background: var(--yellow);
    color: var(--black);
    border-color: var(--yellow);
}

html[data-theme="dark"] .hero__form-card,
html[data-theme="dark"] .lead__form {
    background: var(--surface);
    color: var(--text);
    border-color: #333;
}

html[data-theme="dark"] .hero__form-title,
html[data-theme="dark"] .hero__info-title,
html[data-theme="dark"] .hero__info-contact-phone a {
    color: var(--text);
}

html[data-theme="dark"] .hero__form-text,
html[data-theme="dark"] .hero__form-card .form-consent,
html[data-theme="dark"] .hero__form-note,
html[data-theme="dark"] .hero__info-subtitle,
html[data-theme="dark"] .lead__form-note,
html[data-theme="dark"] .form-note,
html[data-theme="dark"] .form-consent {
    color: rgba(255, 255, 255, .58);
}

html[data-theme="dark"] .hero__info {
    border-top-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group textarea {
    background: var(--surface-2);
    color: var(--text);
    border-color: #444;
}

html[data-theme="dark"] .form-group--float input:focus ~ label,
html[data-theme="dark"] .form-group--float input:not(:placeholder-shown) ~ label,
html[data-theme="dark"] .form-group--float textarea:focus ~ label,
html[data-theme="dark"] .form-group--float textarea:not(:placeholder-shown) ~ label {
    color: var(--text);
}

html[data-theme="dark"] .lead__attach-toggle-box {
    background: var(--surface-2);
    border-color: #888;
}

html[data-theme="dark"] .lead__attach-toggle-box::after {
    border-color: var(--black);
}

html[data-theme="dark"] .lead__attach-toggle-text {
    color: var(--text);
}

html[data-theme="dark"] .lead__dropzone-icon,
html[data-theme="dark"] .lead__dropzone-title {
    color: var(--text);
}

html[data-theme="dark"] .lead__dropzone-hint,
html[data-theme="dark"] .lead__dropzone-formats {
    color: rgba(255, 255, 255, .55);
}

html[data-theme="dark"] .lead__dropzone-label {
    background: var(--surface-2);
    border-color: rgba(255, 255, 255, .28);
}

html[data-theme="dark"] .lead__dropzone:hover .lead__dropzone-label,
html[data-theme="dark"] .lead__dropzone.is-dragover .lead__dropzone-label {
    border-color: var(--yellow);
}

html[data-theme="dark"] .lead__select-wrap::after {
    border-right-color: var(--text);
    border-bottom-color: var(--text);
}

html[data-theme="dark"] .services {
    background: linear-gradient(180deg, #161616 0%, var(--bg) 42%, var(--bg) 100%);
}

html[data-theme="dark"] .services__lead,
html[data-theme="dark"] .services-cat__desc,
html[data-theme="dark"] .why__lead,
html[data-theme="dark"] .why-item__desc,
html[data-theme="dark"] .steps__lead,
html[data-theme="dark"] .portfolio__lead,
html[data-theme="dark"] .faq-section__lead,
html[data-theme="dark"] .perks__lead {
    color: rgba(255, 255, 255, .58);
}

html[data-theme="dark"] .services-cat,
html[data-theme="dark"] .service {
    background: var(--surface);
    border-color: #3a3a3a;
}

html[data-theme="dark"] .service__desc {
    color: rgba(255, 255, 255, .62);
}

html[data-theme="dark"] .service__price {
    color: var(--text);
}

html[data-theme="dark"] .service--hit {
    background: var(--black);
    border-color: var(--black);
}

html[data-theme="dark"] .service--hit .service__desc {
    color: rgba(255, 255, 255, .72);
}

html[data-theme="dark"] .service--hit .service__price {
    color: var(--white);
}

html[data-theme="dark"] .services-cat__title a:hover,
html[data-theme="dark"] .services-cat__list a:hover {
    color: rgba(255, 255, 255, .55);
}

html[data-theme="dark"] .services-cat__list a {
    border-bottom-color: rgba(255, 255, 255, .1);
}

html[data-theme="dark"] .services__group {
    border-top-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .why,
html[data-theme="dark"] .steps,
html[data-theme="dark"] .perks {
    background: var(--bg);
}

html[data-theme="dark"] .why__list {
    border-top-color: #3a3a3a;
}

html[data-theme="dark"] .why-item,
html[data-theme="dark"] .why-item:nth-child(odd) {
    border-bottom-color: rgba(255, 255, 255, .14);
    border-right-color: rgba(255, 255, 255, .14);
}

html[data-theme="dark"] .steps__item:not(:last-child)::after {
    background: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .steps__item.is-active .steps__trigger {
    border-color: #555;
    background: var(--surface);
}

html[data-theme="dark"] .steps__num {
    background: #2a2a2a;
    color: var(--text);
}

html[data-theme="dark"] .steps__item.is-active .steps__num {
    background: var(--yellow);
    color: var(--black);
}

html[data-theme="dark"] .steps__name,
html[data-theme="dark"] .steps__desc {
    color: rgba(255, 255, 255, .58);
}

html[data-theme="dark"] .steps__item.is-active .steps__name,
html[data-theme="dark"] .steps__item.is-active .steps__desc {
    color: var(--text);
}

html[data-theme="dark"] .steps__wait,
html[data-theme="dark"] .steps__wait a {
    color: rgba(255, 255, 255, .58);
}

html[data-theme="dark"] .steps__wait a:hover {
    color: var(--black);
}

html[data-theme="dark"] .portfolio,
html[data-theme="dark"] .faq-section,
html[data-theme="dark"] .blog {
    background: #161616;
}

html[data-theme="dark"] .faq-section {
    background: linear-gradient(180deg, #161616 0%, var(--bg) 40%, var(--bg) 100%);
}

html[data-theme="dark"] .portfolio-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .blog-item__link {
    background: var(--surface);
    border-color: #3a3a3a;
}

html[data-theme="dark"] .blog-item__date {
    color: rgba(255, 255, 255, .55);
}

html[data-theme="dark"] .blog-item__title {
    color: var(--text);
}

html[data-theme="dark"] .blog-item:hover .blog-item__date {
    color: rgba(0, 0, 0, .65);
}

html[data-theme="dark"] .blog-item:hover .blog-item__title {
    color: var(--black);
}

html[data-theme="dark"] .portfolio-card__media {
    background: #2a2a2a;
}

html[data-theme="dark"] .portfolio-card__more {
    color: var(--text);
}

html[data-theme="dark"] .portfolio-card:hover .portfolio-card__more {
    border-color: var(--yellow);
}

html[data-theme="dark"] .faq-item__q,
html[data-theme="dark"] .faq-item__icon {
    color: var(--text);
}

html[data-theme="dark"] .faq-item__icon {
    color: var(--black);
}

html[data-theme="dark"] .faq-item__a-inner {
    color: rgba(255, 255, 255, .62);
}

html[data-theme="dark"] .perk {
    background: var(--surface);
    border-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .perk__num {
    color: rgba(255, 255, 255, .28);
}

html[data-theme="dark"] .perk__desc {
    color: rgba(255, 255, 255, .62);
}

html[data-theme="dark"] .modal__messengers {
    border-top-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .modal__messengers-label {
    color: rgba(255, 255, 255, .55);
}

html[data-theme="dark"] .modal__box,
html[data-theme="dark"] .cookie-banner {
    background: var(--surface);
    border-color: #444;
    color: var(--text);
}

html[data-theme="dark"] .modal__close {
    background: var(--surface-2);
    color: var(--text);
}

html[data-theme="dark"] .cookie-icon,
html[data-theme="dark"] .cookie-title,
html[data-theme="dark"] .cookie-text,
html[data-theme="dark"] .cookie-text a,
html[data-theme="dark"] .cookie-btn-decline {
    color: var(--text);
}

html[data-theme="dark"] .cookie-btn-decline {
    background: var(--surface-2);
    border-color: #555;
}

html[data-theme="dark"] .cookie-btn-decline:hover {
    background: var(--yellow);
    color: var(--black);
    border-color: var(--yellow);
}

html[data-theme="dark"] .scroll-top {
    color: var(--text);
}

html[data-theme="dark"] .scroll-top__track {
    stroke: rgba(255, 255, 255, .22);
}

html[data-theme="dark"] .scroll-top__icon {
    color: var(--yellow);
    filter: none;
}

html[data-theme="dark"] .scroll-top:hover .scroll-top__icon {
    color: var(--yellow);
    filter: drop-shadow(0 0 1.5px var(--yellow));
}

html[data-theme="dark"] .section-wave path[fill="#fff"],
html[data-theme="dark"] .section-wave path[fill="#ffffff"],
html[data-theme="dark"] .section-wave path[fill="#f7f7f7"] {
    fill: var(--bg);
}

html[data-theme="dark"] .reviews-section,
html[data-theme="dark"] .reviews-card,
html[data-theme="dark"] .contact-page,
html[data-theme="dark"] .text-page,
html[data-theme="dark"] .error-page,
html[data-theme="dark"] .main-content {
    background: var(--bg);
    color: var(--text);
}

html[data-theme="dark"] .reviews-card {
    border-color: #3a3a3a;
}

html[data-theme="dark"] .main-content h2,
html[data-theme="dark"] .main-content h3,
html[data-theme="dark"] .main-content ol strong,
html[data-theme="dark"] .main-content .list-num-count strong,
html[data-theme="dark"] .main-content--text p strong {
    color: var(--text);
}

html[data-theme="dark"] .main-content p,
html[data-theme="dark"] .main-content ul > li {
    color: var(--muted);
}

html[data-theme="dark"] .main-content a:not(.btn) {
    color: var(--text);
}

html[data-theme="dark"] .main-content a:not(.btn):hover {
    color: var(--black);
}

html[data-theme="dark"] .main-content ol > li,
html[data-theme="dark"] .main-content .list-num-count > li {
    background: var(--surface);
    border-color: #444;
    color: var(--muted);
}

html[data-theme="dark"] .contact-section {
    background: linear-gradient(180deg, #161616 0%, var(--bg) 40%, var(--bg) 100%);
}

html[data-theme="dark"] .contact-block__title,
html[data-theme="dark"] .contact-phone,
html[data-theme="dark"] .contact-email,
html[data-theme="dark"] .contact-address,
html[data-theme="dark"] .contact-hours,
html[data-theme="dark"] .contact-email svg,
html[data-theme="dark"] .contact-address svg,
html[data-theme="dark"] .contact-hours svg,
html[data-theme="dark"] .contact-form__math-label {
    color: var(--text);
}

html[data-theme="dark"] .contact-hours-note {
    color: rgba(255, 255, 255, .58);
}

html[data-theme="dark"] .contact-day--off {
    background: var(--surface-2);
    color: rgba(255, 255, 255, .45);
    border-color: #444;
}

html[data-theme="dark"] .contact-form {
    background: var(--surface);
    border-color: #444;
}

html[data-theme="dark"] .facts,
html[data-theme="dark"] .project-detail,
html[data-theme="dark"] .blog-post,
html[data-theme="dark"] .blog-related {
    background: var(--bg);
}

html[data-theme="dark"] .facts__lead,
html[data-theme="dark"] .fact__desc {
    color: rgba(255, 255, 255, .58);
}

html[data-theme="dark"] .fact {
    background: var(--surface);
}

html[data-theme="dark"] .project-browser,
html[data-theme="dark"] .project-aside {
    background: var(--surface);
    border-color: #444;
}

html[data-theme="dark"] .project-browser__chrome {
    background: var(--surface-2);
    border-bottom-color: #444;
}

html[data-theme="dark"] .project-browser__url {
    background: var(--bg);
    border-color: #444;
    color: var(--muted);
}

html[data-theme="dark"] .project-browser__frame {
    background: #2a2a2a;
}

html[data-theme="dark"] .project-browser__caption,
html[data-theme="dark"] .project-aside__text,
html[data-theme="dark"] .project-form__motive {
    color: rgba(255, 255, 255, .62);
}

html[data-theme="dark"] .project-browser__caption,
html[data-theme="dark"] .project-aside__meta,
html[data-theme="dark"] .project-aside__row,
html[data-theme="dark"] .project-aside__cta {
    border-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .project-aside__row dt {
    color: rgba(255, 255, 255, .45);
}

html[data-theme="dark"] .blog-post__body,
html[data-theme="dark"] .blog-post__body .table th,
html[data-theme="dark"] .blog-post__body .table td {
    color: var(--muted);
}

html[data-theme="dark"] .blog-post__body h2,
html[data-theme="dark"] .blog-post__body h3,
html[data-theme="dark"] .blog-post__body a,
html[data-theme="dark"] .blog-related__title,
html[data-theme="dark"] .blog-related__all {
    color: var(--text);
}

html[data-theme="dark"] .blog-post__body a:hover {
    text-decoration-color: var(--yellow);
}

html[data-theme="dark"] .blog-post__body hr {
    border-top-color: rgba(255, 255, 255, .14);
}

html[data-theme="dark"] .blog-post__body :not(pre) > code,
html[data-theme="dark"] .blog-post__body .table td code,
html[data-theme="dark"] .blog-post__body .table th code {
    background: var(--surface-2);
    border-color: #444;
    color: var(--text);
}

html[data-theme="dark"] .blog-post__body .table {
    background: var(--surface);
}
