/**
 * Dark mode — toggle button and site-wide dark theme overrides.
 * Light mode styles are unchanged; all rules scoped to [data-theme="dark"].
 */

/* ── Smooth transitions (enabled after user toggles) ── */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        fill 0.3s ease,
        stroke 0.3s ease;
}

/* ── Theme toggle button ── */
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    z-index: 2;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 137, 255, 0.08);
    color: #0F89FF;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color var(--nav-transition), color var(--nav-transition), transform var(--nav-transition);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    background: rgba(15, 137, 255, 0.14);
    outline: none;
}

.theme-toggle__icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle__icon--sun {
    display: none;
}

.theme-toggle__icon--moon {
    display: block;
}

[data-theme="dark"] .theme-toggle__icon--sun {
    display: block;
}

[data-theme="dark"] .theme-toggle__icon--moon {
    display: none;
}

[data-theme="dark"] .theme-toggle {
    background: rgba(15, 137, 255, 0.14);
}

[data-theme="dark"] .theme-toggle:hover,
[data-theme="dark"] .theme-toggle:focus-visible {
    background: rgba(15, 137, 255, 0.22);
}

@media (min-width: 1025px) {
    .theme-toggle--desktop {
        display: inline-flex;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .theme-toggle--mobile {
        display: none;
    }

    .header-controls {
        margin-left: 0;
    }
}

@media (max-width: 1024px) {
    .theme-toggle--desktop {
        display: none;
    }

    .theme-toggle--mobile {
        display: inline-flex;
        width: 40px;
        height: 40px;
    }

    .header-controls {
        gap: 8px;
        margin-left: auto;
    }

    .mobile-menu-toggle {
        margin-left: 0;
    }

    .site-branding {
        max-width: calc(100% - 108px);
    }
}

@media (max-width: 580px) {
    .site-branding {
        max-width: calc(100% - 96px);
    }
}

/* ── Base & color scheme ── */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body {
    color: #E2E8F0;
    background: #0B1120;
}

/* ── Header ── */
[data-theme="dark"] .site-header {
    background: rgba(11, 17, 32, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .site-header.is-scrolled {
    background: rgba(11, 17, 32, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

@media (min-width: 1025px) {
    [data-theme="dark"] .site-header.is-scrolled {
        background: rgba(11, 17, 32, 0.88);
        border-bottom-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] .menu-items li a {
        color: #94A3B8;
    }

    [data-theme="dark"] .menu-items li a:hover,
    [data-theme="dark"] .menu-items li a:focus-visible {
        color: #5CB8FF;
    }

    [data-theme="dark"] .menu-items li.current-menu-item > a,
    [data-theme="dark"] .menu-items li.current_page_item > a,
    [data-theme="dark"] .menu-items li.current-menu-ancestor > a,
    [data-theme="dark"] .menu-items li a.is-current,
    [data-theme="dark"] .menu-items li a[aria-current="page"] {
        color: #0F89FF;
        font-weight: 600;
    }

    [data-theme="dark"] .menu-items > .menu-item-has-children > .sub-menu {
        background: #1A2540;
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    }

    [data-theme="dark"] .menu-items > .menu-item-has-children > .sub-menu a {
        color: #CBD5E1;
    }

    [data-theme="dark"] .menu-items > .menu-item-has-children > .sub-menu a:hover,
    [data-theme="dark"] .menu-items > .menu-item-has-children > .sub-menu a:focus-visible {
        color: #5CB8FF;
        background: rgba(15, 137, 255, 0.18);
    }

    [data-theme="dark"] .menu-items > .menu-item-has-children > .sub-menu li.current-menu-item > a,
    [data-theme="dark"] .menu-items > .menu-item-has-children > .sub-menu li.current_page_item > a,
    [data-theme="dark"] .menu-items > .menu-item-has-children > .sub-menu a.is-current,
    [data-theme="dark"] .menu-items > .menu-item-has-children > .sub-menu a[aria-current="page"] {
        color: #0F89FF;
        font-weight: 600;
        background: rgba(15, 137, 255, 0.15);
    }
}

@media (max-width: 1024px) {
    [data-theme="dark"] .site-header {
        background: rgba(11, 17, 32, 0.98);
    }

    [data-theme="dark"] .primary-menu {
        background: linear-gradient(180deg, #131D33 0%, #0F1729 100%);
        border-left-color: rgba(255, 255, 255, 0.08);
        box-shadow: -28px 0 64px rgba(0, 0, 0, 0.5);
    }

    [data-theme="dark"] .mobile-menu-head {
        background: rgba(19, 29, 51, 0.96);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    [data-theme="dark"] .mobile-menu-title {
        color: #F1F5F9;
    }

    [data-theme="dark"] .mobile-menu-footer {
        background: rgba(11, 17, 32, 0.98);
        border-top-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
    }

    [data-theme="dark"] .menu-items li a,
    [data-theme="dark"] .mobile-menu-item-row > a {
        color: #E2E8F0;
    }

    [data-theme="dark"] .menu-items > li > a:hover,
    [data-theme="dark"] .mobile-menu-item-row > a:hover,
    [data-theme="dark"] .menu-items > li > a:focus-visible,
    [data-theme="dark"] .mobile-menu-item-row > a:focus-visible,
    [data-theme="dark"] .menu-items .sub-menu a:hover,
    [data-theme="dark"] .menu-items .sub-menu a:focus-visible {
        color: #5CB8FF;
        background: rgba(15, 137, 255, 0.14);
    }

    [data-theme="dark"] .menu-items > li {
        background: rgba(26, 37, 64, 0.72);
        border-color: rgba(255, 255, 255, 0.06);
    }

    [data-theme="dark"] .menu-items > li > a,
    [data-theme="dark"] .menu-items > .menu-item-has-children > .mobile-menu-item-row {
        background: transparent;
        border-color: transparent;
    }

    [data-theme="dark"] .menu-items > li.menu-item-has-children.is-submenu-open {
        background: rgba(26, 37, 64, 0.95);
        border-color: rgba(15, 137, 255, 0.28);
        box-shadow: 0 10px 24px rgba(15, 137, 255, 0.12);
    }

    [data-theme="dark"] .menu-items > li.menu-item-has-children.current-menu-ancestor:not(.menu-item-placeholder) {
        border-color: rgba(15, 137, 255, 0.3);
        background: rgba(15, 137, 255, 0.1);
    }

    [data-theme="dark"] .menu-items li.current-menu-item > .mobile-menu-item-row > a,
    [data-theme="dark"] .menu-items li.current_page_item > .mobile-menu-item-row > a,
    [data-theme="dark"] .menu-items li.current-menu-ancestor > .mobile-menu-item-row > a,
    [data-theme="dark"] .menu-items li.current-menu-item > a,
    [data-theme="dark"] .menu-items li.current_page_item > a,
    [data-theme="dark"] .menu-items li.current-menu-ancestor > a,
    [data-theme="dark"] .menu-items li a.is-current,
    [data-theme="dark"] .menu-items li a[aria-current="page"] {
        color: #0F89FF;
        font-weight: 700;
        background: rgba(15, 137, 255, 0.18);
    }

    [data-theme="dark"] .menu-items .sub-menu a {
        color: #94A3B8;
    }

    [data-theme="dark"] .menu-items .sub-menu li.current-menu-item > a,
    [data-theme="dark"] .menu-items .sub-menu li.current_page_item > a,
    [data-theme="dark"] .menu-items .sub-menu a.is-current,
    [data-theme="dark"] .menu-items .sub-menu a[aria-current="page"] {
        color: #0F89FF;
        font-weight: 600;
        background: rgba(15, 137, 255, 0.14);
    }

    [data-theme="dark"] .menu-items .sub-menu a::before {
        background: rgba(92, 184, 255, 0.45);
    }

    [data-theme="dark"] .menu-items .sub-menu li.current-menu-item > a::before,
    [data-theme="dark"] .menu-items .sub-menu li.current_page_item > a::before,
    [data-theme="dark"] .menu-items .sub-menu a.is-current::before,
    [data-theme="dark"] .menu-items .sub-menu a[aria-current="page"]::before {
        background: #0F89FF;
    }

    [data-theme="dark"] .menu-item-placeholder.current-menu-item:not(.current-menu-ancestor) > .mobile-menu-item-row > a,
    [data-theme="dark"] .menu-item-placeholder.current-menu-item:not(.current-menu-ancestor) > a,
    [data-theme="dark"] .menu-item-placeholder > .mobile-menu-item-row > a.is-current,
    [data-theme="dark"] .menu-item-placeholder > a.is-current {
        color: #0F89FF !important;
        font-weight: 700 !important;
        background: rgba(15, 137, 255, 0.18) !important;
    }

    [data-theme="dark"] .menu-items > li > a:active,
    [data-theme="dark"] .mobile-menu-item-row > a:active {
        background: rgba(15, 137, 255, 0.12);
    }

    [data-theme="dark"] .mobile-menu-backdrop {
        background: rgba(0, 0, 0, 0.65);
    }
}

[data-theme="dark"] .menu-items li a {
    color: #94A3B8;
}

[data-theme="dark"] .menu-items li a:hover,
[data-theme="dark"] .menu-items li a:focus-visible {
    color: #5CB8FF;
    outline: none;
}

[data-theme="dark"] .menu-items li.current-menu-item > a,
[data-theme="dark"] .menu-items li.current_page_item > a,
[data-theme="dark"] .menu-items li.current-menu-ancestor > a,
[data-theme="dark"] .menu-items li a.is-current,
[data-theme="dark"] .menu-items li a[aria-current="page"] {
    color: #0F89FF;
    font-weight: 600;
}

[data-theme="dark"] .menu-items li:not(.menu-item-has-children) a:hover::after,
[data-theme="dark"] .menu-items li:not(.menu-item-has-children) a:focus-visible::after,
[data-theme="dark"] .menu-items li:not(.menu-item-has-children).current-menu-item > a::after,
[data-theme="dark"] .menu-items li:not(.menu-item-has-children).current_page_item > a::after,
[data-theme="dark"] .menu-items li:not(.menu-item-has-children).current-menu-ancestor > a::after,
[data-theme="dark"] .menu-items li:not(.menu-item-has-children) a.is-current::after {
    transform: scaleX(1);
}

[data-theme="dark"] .menu-items > .menu-item-has-children.current-menu-item:not(.current-menu-ancestor) > a,
[data-theme="dark"] .menu-items > .menu-item-has-children.current-menu-item:not(.current-menu-ancestor) > .mobile-menu-item-row > a,
[data-theme="dark"] .menu-items > .menu-item-placeholder.current-menu-item:not(.current-menu-ancestor) > a,
[data-theme="dark"] .menu-items > .menu-item-placeholder.current-menu-item:not(.current-menu-ancestor) > .mobile-menu-item-row > a {
    color: #94A3B8;
    font-weight: 500;
}

[data-theme="dark"] .site-branding .site-title {
    color: #F1F5F9;
}

/* ── Sections & layout ── */
[data-theme="dark"] .section-block,
[data-theme="dark"] .site-content > .hero-section,
[data-theme="dark"] .site-content > .page-hero {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .hero-section {
    background:
        radial-gradient(circle at top left, rgba(15, 135, 255, 0.14), transparent 22%),
        radial-gradient(circle at bottom right, rgba(109, 84, 255, 0.1), transparent 22%),
        linear-gradient(180deg, #0F1729 0%, #0B1120 100%);
}

[data-theme="dark"] .hero-copy h1 {
    color: #F8FAFC;
}

[data-theme="dark"] .hero-copy p {
    color: #94A3B8;
}

[data-theme="dark"] .section-heading h2 {
    color: #F8FAFC;
}

[data-theme="dark"] .section-heading-text {
    color: #94A3B8;
}

[data-theme="dark"] .page-content {
    background: #1A2540;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .page-body {
    color: #CBD5E1;
}

[data-theme="dark"] .breadcrumb-nav {
    color: #94A3B8;
}

[data-theme="dark"] .breadcrumb-nav span {
    color: #64748B;
}

/* ── Buttons ── */
[data-theme="dark"] .button-secondary {
    background: rgba(26, 37, 64, 0.85);
    color: #E2E8F0;
    border-color: rgba(255, 255, 255, 0.1);
}

/* ── Cards & grids ── */
[data-theme="dark"] .stat-card,
[data-theme="dark"] .hero-visual .visual-card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .service-card,
[data-theme="dark"] .tech-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .process-card,
[data-theme="dark"] .partner-card,
[data-theme="dark"] .partnership-card,
[data-theme="dark"] .blog-card {
    background: rgba(26, 37, 64, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .stat-card strong,
[data-theme="dark"] .visual-card h3,
[data-theme="dark"] .team-card .member-info .name,
[data-theme="dark"] .project-card h3,
[data-theme="dark"] .contact-card.contact-info-card h3,
[data-theme="dark"] .testimonial-author-copy h3 {
    color: #F1F5F9;
}

[data-theme="dark"] .stat-card span,
[data-theme="dark"] .visual-card p,
[data-theme="dark"] .team-card .member-bio,
[data-theme="dark"] .project-card p,
[data-theme="dark"] .contact-card.contact-info-card p,
[data-theme="dark"] .testimonial-author-copy span,
[data-theme="dark"] .about-content p {
    color: #94A3B8;
}

[data-theme="dark"] .service-card h3,
[data-theme="dark"] .tech-card h3,
[data-theme="dark"] .testimonial-card h3,
[data-theme="dark"] .tech-category-card h3 {
    color: #F1F5F9;
}

[data-theme="dark"] .service-card p,
[data-theme="dark"] .tech-card p,
[data-theme="dark"] .testimonial-card p {
    color: #94A3B8;
}

[data-theme="dark"] .testimonial-card-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .tech-category-card {
    background: rgba(26, 37, 64, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tech-tag-list span {
    background: rgba(15, 137, 255, 0.12);
    color: #CBD5E1;
}

[data-theme="dark"] .section-footer-cta {
    background: rgba(26, 37, 64, 0.85);
    border-color: rgba(15, 137, 255, 0.18);
}

[data-theme="dark"] .section-footer-cta p {
    color: #94A3B8;
}

[data-theme="dark"] .notice-box.success {
    background: rgba(15, 137, 255, 0.12);
    color: #7DD3FC;
}

[data-theme="dark"] .notice-box.error {
    background: rgba(239, 68, 68, 0.12);
    color: #FCA5A5;
}

[data-theme="dark"] .contact-map-embed {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .team-section.section-block {
    background: linear-gradient(135deg, rgba(15, 137, 255, 0.08) 0%, rgba(26, 37, 64, 0.6) 44%, rgba(142, 111, 253, 0.08) 100%);
}

[data-theme="dark"] .about-image {
    background: linear-gradient(180deg, #1A2540 0%, #131D33 100%);
}

/* ── About section (Who we are) ── */
[data-theme="dark"] .about-content h3 {
    color: #F8FAFC;
}

[data-theme="dark"] .about-highlights li {
    color: #CBD5E1;
}

[data-theme="dark"] .about-highlights li::before {
    box-shadow: 0 0 0 4px rgba(30, 146, 255, 0.2);
}

[data-theme="dark"] .about-features-card {
    background: linear-gradient(135deg, rgba(26, 37, 64, 0.96), rgba(19, 29, 51, 0.94));
    border-color: rgba(15, 137, 255, 0.2);
}

[data-theme="dark"] .about-features-card .service-card,
[data-theme="dark"] .values-grid .service-card {
    background: #131D33;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .about-features-card .service-card:hover,
[data-theme="dark"] .values-grid .service-card:hover {
    border-color: rgba(15, 137, 255, 0.28);
    box-shadow: 0 28px 65px rgba(15, 137, 255, 0.12);
}

[data-theme="dark"] .about-features-card .service-card h3,
[data-theme="dark"] .values-grid .service-card h3 {
    color: #F8FAFC;
}

[data-theme="dark"] .about-features-card .service-card p,
[data-theme="dark"] .values-grid .service-card p {
    color: #94A3B8;
}

[data-theme="dark"] .about-features-card .service-card .icon,
[data-theme="dark"] .values-grid .service-card .icon {
    background: linear-gradient(135deg, rgba(30, 146, 255, 0.18), rgba(142, 111, 253, 0.14));
    border-color: rgba(15, 137, 255, 0.22);
}

[data-theme="dark"] .service-tags span {
    background: rgba(15, 137, 255, 0.14);
    border: 1px solid rgba(15, 137, 255, 0.2);
    color: #7CB9FF;
}

[data-theme="dark"] .about-features-card .service-cta,
[data-theme="dark"] .values-grid .service-cta {
    background: rgba(26, 37, 64, 0.9);
    color: #E2E8F0;
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .partnership-block {
    background: linear-gradient(135deg, rgba(26, 37, 64, 0.96), rgba(19, 29, 51, 0.94));
    border-color: rgba(15, 137, 255, 0.2);
}

[data-theme="dark"] .partnership-badges span {
    background: rgba(19, 29, 51, 0.92);
    border-color: rgba(15, 137, 255, 0.2);
    color: #7CB9FF;
}

[data-theme="dark"] .partnership-connector {
    background: rgba(15, 137, 255, 0.14);
}

[data-theme="dark"] .stats-section {
    background: linear-gradient(135deg, rgba(15, 137, 255, 0.08) 0%, rgba(26, 37, 64, 0.65) 50%, rgba(142, 111, 253, 0.08) 100%);
}

[data-theme="dark"] .empty-state {
    color: #94A3B8;
}

/* ── Testimonials ── */
[data-theme="dark"] .testimonial-slider .swiper-button-next,
[data-theme="dark"] .testimonial-slider .swiper-button-prev {
    background: #1A2540;
    color: #0F89FF;
}

[data-theme="dark"] .testimonial-star {
    color: rgba(255, 255, 255, 0.15);
}

/* ── FAQ ── */
[data-theme="dark"] .faq-section .faq-item {
    background: rgba(26, 37, 64, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .faq-section .faq-item summary {
    color: #F1F5F9;
    background: #1A2540;
}

[data-theme="dark"] .faq-section .faq-answer {
    color: #94A3B8;
    background: #131D33;
}

[data-theme="dark"] .faq-section .faq-list .empty-state {
    background: rgba(26, 37, 64, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ── Forms ── */
[data-theme="dark"] .form-group label {
    color: #CBD5E1;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background: #131D33;
    border-color: rgba(255, 255, 255, 0.12);
    color: #F1F5F9;
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
    color: #64748B;
}

[data-theme="dark"] .contact-detail .detail-label {
    color: #E2E8F0;
}

[data-theme="dark"] .contact-status-card {
    background: rgba(15, 137, 255, 0.1);
    border-color: rgba(15, 137, 255, 0.2);
}

/* ── Filters & misc ── */
[data-theme="dark"] .project-filters button {
    background: rgba(26, 37, 64, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    color: #94A3B8;
}

[data-theme="dark"] .project-filters button.is-active {
    background: rgba(15, 137, 255, 0.15);
    border-color: rgba(15, 137, 255, 0.3);
    color: #0F89FF;
}

[data-theme="dark"] .partnership-block-title {
    color: #F1F5F9;
}

[data-theme="dark"] .partnership-card h5 {
    color: #F1F5F9;
}

[data-theme="dark"] .partnership-card p {
    color: #94A3B8;
}

[data-theme="dark"] .cta-section {
    background:
        radial-gradient(circle at 10% 20%, rgba(30, 146, 255, 0.12), transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(142, 111, 253, 0.1), transparent 28%),
        linear-gradient(180deg, #131D33 0%, #0B1120 100%);
}

/* ── Footer ── */
[data-theme="dark"] .site-footer {
    background: #080E1A;
    color: #CBD5E1;
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .footer-brand {
    color: #F1F5F9;
}

[data-theme="dark"] .footer-description {
    color: #94A3B8;
}

[data-theme="dark"] .footer-links-column h4 {
    color: #F1F5F9;
}

[data-theme="dark"] .footer-links-column a {
    color: #94A3B8;
}

[data-theme="dark"] .footer-links-column a:hover,
[data-theme="dark"] .footer-bottom-links a:hover {
    color: #5CB8FF;
}

[data-theme="dark"] .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #64748B;
}

[data-theme="dark"] .footer-bottom-links a {
    color: #94A3B8;
}

[data-theme="dark"] .footer-social-link {
    background: rgba(15, 137, 255, 0.12);
}

[data-theme="dark"] .footer-social-link:hover {
    background: rgba(15, 137, 255, 0.22);
}

/* ── Swiper pagination ── */
[data-theme="dark"] .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .swiper-pagination-bullet-active {
    background: #0F89FF;
}

/* ── WordPress / plugin compatibility ── */
[data-theme="dark"] .wp-block-group,
[data-theme="dark"] .elementor-widget-container {
    color: inherit;
}
