/* ========================================
   MATERIAL DESIGN 3 TOKENS
======================================== */
:root {
    /* Primary Colors */
    --md-sys-color-primary: #2563eb;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #dbeafe;
    --md-sys-color-on-primary-container: #1e40af;

    /* Surface Colors */
    --md-sys-color-surface: #ffffff;
    --md-sys-color-on-surface: #1e293b;
    --md-sys-color-surface-variant: #f1f5f9;
    --md-sys-color-on-surface-variant: #475569;

    /* Outline */
    --md-sys-color-outline: #cbd5e1;

    /* Elevation Shadows */
    --md-sys-elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --md-sys-elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
}

/* Dark Theme */
.dark-theme {
    /* Primary Colors - adjusted for dark mode */
    --md-sys-color-primary: #60a5fa;
    --md-sys-color-on-primary: #1e3a8a;
    --md-sys-color-primary-container: #1e3a8a;
    --md-sys-color-on-primary-container: #dbeafe;

    /* Surface Colors */
    --md-sys-color-surface: #0f172a;
    --md-sys-color-on-surface: #f1f5f9;
    --md-sys-color-surface-variant: #1e293b;
    --md-sys-color-on-surface-variant: #cbd5e1;

    /* Outline */
    --md-sys-color-outline: #475569;

    /* Elevation Shadows - softer for dark mode */
    --md-sys-elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --md-sys-elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
}

/* Base class for Material Icons - Properties handled by Tailwind base layer */
.material-icons-outlined,
.material-icons-round {
    display: inline-block;
}

/* ========================================
   FONTS
======================================== */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   BASE STYLES
======================================== */
/* Note: Basic resets and body styles moved to src/tailwind.css @layer base */

/* Sticky footer: prevent white strip below footer on short pages */
/* Note: scroll-padding-top removed — scroll-margin-top on targets gives correct offset */
/* overflow-anchor: none — prevents scroll jump when reviews/slider load above viewport after hash nav */
html {
    min-height: 100vh;
    overflow-anchor: none;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body>#footer-container {
    margin-top: auto;
}

/* Category pages: footer-container - dark bg only for footer content, no extra padding */
body.uslugi-repair-page #footer-container,
body.uslugi-setup-page #footer-container,
body.uslugi-data-page #footer-container,
body.uslugi-firmware-page #footer-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding-top: 0;
    margin-top: 0;
}

/* ========================================
   HEADER CONTAINER — prevent overflow on mobile
======================================== */
#header-container {
    width: 100%;
    max-width: 100%;
}

/* ========================================
   ЯКОРНЫЕ ССЫЛКИ — отступ под фиксированную шапку 100px
======================================== */
section[id],
#contacts {
    scroll-margin-top: 100px;
}

/* ========================================
   CONTAINER
======================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Footer container */
.footer-container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ========================================
   HERO BACKGROUND IMAGES
======================================== */
.hero-bg {
    background-image: url('../images/hero-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    padding-top: calc(max(100px, 4rem) + 20px);
}

@media (min-width: 768px) {
    .hero-bg {
        padding-top: calc(max(100px, 6rem) + 20px);
    }
}


@media (min-width: 1024px) {
    .hero-bg {
        padding-top: calc(max(100px, 8rem) + 20px);
    }
}

/* Mobile hero gap: 124px top padding ensures a 60px visual gap below the ~64px fixed header */
@media (max-width: 767px) {
    .hero-bg {
        padding-top: 180px !important;
    }
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Neutral charcoal overlay to better mask the blue background image */
    background: linear-gradient(rgba(24, 24, 27, 0.85), rgba(24, 24, 27, 0.75));
    z-index: 0;
}

.hero-bg>* {
    position: relative;
    z-index: 1;
}

/* Hero process chips: Material 3–style hover */
.hero-process-chip {
    position: relative;
    transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1),
        border-color 0.2s cubic-bezier(0.2, 0, 0, 1),
        box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1),
        transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.hero-process-chip:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.hero-process-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
}

.hero-process-chip:hover::before {
    opacity: 1;
}

/* Discount CTA */
.discount-cta-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.discount-cta-btn:hover {
    transform: translateY(-1px);
}

.discount-cta-btn span {
    transition: transform 0.25s ease;
}

.discount-cta-btn:hover span {
    transform: translateX(4px);
}

.discount-cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.14) 45%, transparent 75%);
    transform: translateX(-130%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.discount-cta-btn:hover::before {
    transform: translateX(130%);
}

/* Filter Bar - CSS sticky */
#filter-wrapper {
    padding: 1rem 0;
    margin-bottom: 2rem;
    width: 100%;
}

#filter-pill .filter-btn:focus:not(:focus-visible) {
    box-shadow: none !important;
}

/* Hide scrollbar for horizontal filter on mobile */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.send-plane-icon {
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

button:hover .send-plane-icon {
    transform: translateX(2px) translateY(-1px);
}

/* Appointment card (contacts section) */
.appointment-card {
    background: linear-gradient(135deg, var(--md-sys-color-surface) 0%, rgba(219, 234, 254, 0.4) 100%);
    box-shadow: var(--md-sys-elevation-2), 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.appointment-icon-wrap {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.appointment-title {
    color: var(--md-sys-color-on-surface);
}

.appointment-title-accent {
    color: var(--md-sys-color-primary);
}

.appointment-text {
    color: var(--md-sys-color-on-surface-variant);
}

.appointment-cta {
    height: 75px;
    width: 100%;
    max-width: 320px;
    padding: 0 1.5rem;
}

/* Appointment Notice Card (static, no animation to avoid header flicker conflict) */

/* Hero backgrounds for service pages */
body.uslugi-repair-page .hero-bg,
body.uslugi-setup-page .hero-bg,
body.uslugi-data-page .hero-bg,
body.uslugi-firmware-page .hero-bg {
    background-image: url('../images/hero-category.webp');
}

/* Repair pages */
body.uslugi-repair-pc .hero-bg {
    background-image: url('../images/computer-repair.webp');
}

body.uslugi-repair-upgrade .hero-bg,
body.uslugi-repair-laptop-upgrade .hero-bg {
    background-image: url('../images/computer-upgrade.webp');
}

body.uslugi-repair-cleaning .hero-bg {
    background-image: url('../images/computer-cleaning.webp');
}

/* Hero CTA button: opaque gradient on hover (cleaning, tax-software) */
body.uslugi-repair-cleaning .hero-bg>div a[href="#contact-form"],
body.uslugi-setup-tax-software .hero-bg>div a[href="#contact-form"] {
    opacity: 1;
}

body.uslugi-repair-cleaning .hero-bg>div a[href="#contact-form"]:hover,
body.uslugi-setup-tax-software .hero-bg>div a[href="#contact-form"]:hover {
    opacity: 1;
    background: linear-gradient(90deg, #ca8a04 0%, #ea580c 100%) !important;
}

body.uslugi-repair-diagnostic .hero-bg {
    background-image: url('../images/computer-diagnostic.webp');
}

body.uslugi-repair-console-cleaning .hero-bg {
    background-image: url('../images/service-console-cleaning.webp');
}

/* Hero for article about console overheating */
body.article-console-overheat .hero-bg {
    background-image: url('../images/articles/console-cleaning/hero-bg.webp');
}

/* Data category service pages */
body.uslugi-data-data-recovery .hero-bg,
body.uslugi-data-data-transfer .hero-bg {
    background-image: url('../images/data-recovery.webp');
}

/* Setup pages */
body.uslugi-setup-printer-setup .hero-bg {
    background-image: url('../images/service-printer-setup.webp');
}

body.uslugi-setup-tax-software .hero-bg {
    background-image: url('../images/tax-software.webp');
}

body.uslugi-setup-os-setup .hero-bg {
    background-image: url('../images/os-setup.webp');
}

body.uslugi-setup-macos-update .hero-bg {
    background-image: url('../images/macos_install_old.webp');
}

body.uslugi-setup-android-tv-setup .hero-bg {
    background-image: url('../images/android-android-tv.webp');
}

body.uslugi-setup-remote-setup .hero-bg {
    background-image: url('../images/service-remote-setup.webp');
}

/* Firmware pages */
body.uslugi-firmware-android-tv .hero-bg {
    background-image: url('../images/android-tv.webp');
}

body.uslugi-firmware-router .hero-bg {
    background-image: url('../images/router.webp');
}

body.uslugi-firmware-smartphone .hero-bg {
    background-image: url('../images/smartphone-repair.webp');
}

body.reviews-page .hero-bg,
body.privacy-page .hero-bg {
    min-height: 50vh;
}

body.reviews-page .hero-bg {
    background-image: url('../images/review_hero.webp');
}

body.privacy-page .hero-bg {
    background-image: url('../images/privacy-policy.webp');
}

/* ========================================
   SERVICE CARDS
======================================== */
#services-grid .service-card {
    border-radius: 0.75rem;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
}

#services-grid .service-card .service-card-title {
    color: #1e3b8a;
}

#services-grid .category-link-card h3 {
    color: #1e3b8a !important;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-arrow-circle {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #f1f5f9;
    /* bg-slate-100 */
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    /* text-slate-400 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
}

.service-card:hover .card-arrow-circle {
    background-color: #2563eb;
    /* bg-blue-600 */
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

@media (max-width: 640px) {
    .card-arrow-circle {
        width: 2.5rem;
        height: 2.5rem;
        bottom: 1rem;
        right: 1rem;
    }
}

/* ========================================
   REVIEWS SLIDER
======================================== */
#reviews-slider-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: clip;
}

#reviews-slider-container::-webkit-scrollbar {
    display: none;
}

#reviews-slider-track {
    will-change: transform;
    overflow: visible;
    touch-action: pan-y pinch-zoom;
}

#reviews-slider-prev:disabled,
#reviews-slider-next:disabled {
    pointer-events: none;
}

/* ========================================
   SERVICE PAGE REVIEWS SLIDER
======================================== */
#service-reviews-slider .slide {
    pointer-events: none;
}

#service-reviews-slider .slide.opacity-100 {
    pointer-events: auto;
}

#service-reviews-slider {
    height: 300px !important;
}

#service-reviews-slider .bg-slate-50 {
    padding-bottom: 1.5rem !important;
}

/* ========================================
   UTILITY CLASSES
======================================== */
/* Note: .hidden and .visible are provided by Tailwind */

/* Line clamp for review text */
.line-clamp-7 {
    display: -webkit-box;
    -webkit-line-clamp: 7;
    line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom dotted pattern background */
.bg-pattern {
    background:
        radial-gradient(circle at 2px 2px, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(145deg, #fafbff 0%, #f0f7ff 100%);
    background-size: 50px 50px, auto;
    background-repeat: repeat, no-repeat;
    background-attachment: scroll, scroll;
}

/* ========================================
   ARTICLE PAGES
======================================== */
.article-page .prose p,
.article-page .prose li {
    text-align: justify;
}

/* Сделать пункты списков в статьях немного крупнее */
.article-page .prose li {
    font-size: 1.05rem;
    line-height: 1.7;
}

.article-page .prose h2 {
    margin-top: 4rem;
    margin-bottom: 1.25rem;
    font-size: 1.7rem;
    line-height: 1.4;
}

.article-page .prose h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-page .prose ul,
.article-page .prose ol {
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

.article-page .article-list-left,
.article-page .article-list-left li {
    text-align: left;
}

.article-page .prose>*+* {
    margin-top: 1.25rem;
}

/* ========================================
   FORM ELEMENTS
======================================== */
/* Ensure form inputs have light background */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    background-color: white !important;
    color: #1f2937 !important;
}

input:not([type="checkbox"]):not([type="radio"])::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
}

/* Custom checkbox with Material 3 / Modern feel */
.custom-checkbox {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 0.5rem !important;
    background-color: #fff !important;
    cursor: pointer !important;
    display: inline-grid !important;
    place-content: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.custom-checkbox::before {
    content: "";
    width: 0.75rem;
    height: 0.75rem;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em #2563eb;
    background-color: CanvasText;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.custom-checkbox:checked {
    border-color: #2563eb !important;
    background-color: #eff6ff !important;
}

.custom-checkbox:checked::before {
    transform: scale(1);
}

.custom-checkbox:hover {
    border-color: #3b82f6 !important;
    background-color: #f8fafc !important;
}

.custom-checkbox:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

/* Order form gradient border */
.awT8De,
.order-form-card {
    border: solid 2px transparent;
    border-radius: 1.5rem;
    background: linear-gradient(#fff, #fff) content-box,
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(31.5deg, #3186ff 54%, #00a5b7 61%, #0ebc5f 67%, #0ebc5f 70%, #ebcb04 78%, #fc0 80%, #fc0 84%, #ffbd06 86%, #ff6b2b 91%, #ff4641 94%, #ff4641 97%, #fa506b 100%) border-box;
}

/* ========================================
   COOKIE BANNER
======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    pointer-events: none;
}

.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ========================================
   MOBILE CENTERING FOR SERVICE CARDS
======================================== */
/* Center icons and text in What's Included section cards on mobile */
@media (max-width: 640px) {
    .service-card {
        text-align: center;
    }

    .service-card .w-16.h-16 {
        margin-left: auto;
        margin-right: auto;
    }

    .service-card h3 {
        text-align: center !important;
    }

    .service-card p {
        text-align: center;
    }
}

/* ========================================
   SECTION ALL TITLE (Standardized H2) - Responsive
======================================== */
.section-title {
    background-image: linear-gradient(to right, #1e3a8a, #2563eb) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 2.0rem !important;
    /* 28px - Small phones */
    font-weight: 500 !important;
    line-height: 1.25;
    overflow-wrap: break-word;
    padding-bottom: 20px !important;
}

/* Larger phones */
@media (min-width: 480px) {
    .section-title {
        font-size: 2.0rem !important;
        font-weight: semibold !important;
        /* 32px */
    }
}

/* Small tablets and large phones */
@media (min-width: 640px) {
    .section-title {
        font-size: 2.5rem !important;
        /* 40px */
    }
}

/* Tablets */
@media (min-width: 768px) {
    .section-title {
        font-size: 2.75rem !important;
        /* 44px */
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .section-title {
        font-size: 3rem !important;
        /* 48px */
    }
}

/*h2 {
    background: linear-gradient(to right, #2563eb, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    padding-bottom: 0.1em;
}*/

.section-standard {
    padding-top: 4rem;
    padding-bottom: 4rem;
    /*    background: linear-gradient(to bottom, #ffffff, rgba(239, 246, 255, 0.3));*/
    background: linear-gradient(to bottom, rgba(239, 246, 255, 0.3), #ffffff);
}

@media (min-width: 768px) {
    .section-standard {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Reviews section on service pages: diagonal cross grid background */
#reviews.reviews-section-bg {
    background: #ffffff;
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

#reviews.reviews-section-bg .reviews-section-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(45deg, transparent 49%, #e5e7eb 49%, #e5e7eb 51%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, #e5e7eb 49%, #e5e7eb 51%, transparent 51%);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%);
    mask-image: radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%);
}

#reviews.reviews-section-bg .reviews-section-inner {
    position: relative;
    z-index: 1;
}

/* Success Popup Styles */

.success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.success-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.success-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.success-popup-content {
    position: relative;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    max-width: 28rem;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    /* White background with gradient border */
    background: linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899) border-box;
    border: 3px solid transparent;
    z-index: 1;
}


.success-popup-overlay.active .success-popup-content {
    transform: scale(1) translateY(0);
}

.success-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #64748b;
}

.success-popup-close:hover {
    background: rgba(148, 163, 184, 0.2);
    transform: rotate(90deg);
    color: #334155;
}

.success-popup-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.success-popup-icon {
    margin: 0 auto 1.5rem;
    width: 5rem;
    height: 5rem;
}

.success-checkmark {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #10b981;
    stroke-miterlimit: 10;
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.success-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #10b981;
    fill: #d1fae5;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0 0 0 30px #10b981;
    }
}

.success-popup-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem;
}

.success-popup-message {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 2rem;
    line-height: 1.6;
}

.success-popup-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.success-popup-button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.success-popup-button:active {
    transform: translateY(0);
}

.success-popup-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .success-popup-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .success-popup-title {
        font-size: 1.5rem;
    }

    .success-popup-message {
        font-size: 0.9375rem;
    }

    .success-popup-icon {
        width: 4rem;
        height: 4rem;
    }
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}

/* ========================================
   PRICING CARD HOVER EFFECTS
======================================== */
/* Responsive scale classes for pricing cards */
@media (min-width: 1024px) {
    .lg\:scale-105 {
        transform: scale(1.03);
    }

    .hover\:lg\:scale-105:hover {
        transform: scale(1.03);
    }

    .hover\:lg\:scale-107:hover {
        transform: scale(1.05);
    }

    .hover\:lg\:scale-110:hover {
        transform: scale(1.05);
    }
}

/* Translate Y classes for lift effect */
.hover\:-translate-y-3:hover {
    transform: translateY(-0.75rem);
}

.hover\:-translate-y-4:hover {
    transform: translateY(-1rem);
}

/* Combined transform for scale + translate on hover */
@media (min-width: 1024px) {
    .lg\:scale-105.hover\:lg\:scale-107:hover {
        transform: scale(1.05) translateY(-1rem);
    }

    .lg\:scale-105.hover\:lg\:scale-110:hover {
        transform: scale(1.05) translateY(-1rem);
    }

    .hover\:lg\:scale-105.hover\:-translate-y-3:hover {
        transform: scale(1.03) translateY(-0.75rem);
    }
}

/* ========================================
   REVIEW CARD HOVER ANIMATION
======================================== */
.review-card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.review-card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ========================================
   HOMEPAGE REVIEWS — MATERIAL 3 TILES
======================================== */
.review-tile-inner {
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 20px 22px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 6px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 260px;
}

.review-tile {
    cursor: grab;
}

#reviews-slider-container.is-dragging,
#reviews-slider-container.is-dragging * {
    cursor: grabbing;
    user-select: none;
}

@media (min-width: 640px) {
    .review-tile-inner {
        padding: 24px 26px;
        height: 300px;
    }
}

.review-tile:hover .review-tile-inner {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    border-color: #93c5fd;
}

.review-tile-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-tile-link {
    padding: 6px 10px;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #2563eb;
    border: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.review-tile-link:hover {
    background: #e2e8f0;
    color: #1d4ed8;
    border-color: #cbd5f5;
}

/* ========================================
   SERVICE PAGES — MOBILE FIXED CTA
======================================== */
@media (max-width: 767px) {
    body.has-mobile-cta {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
        overflow-x: hidden;
    }

    .service-mobile-cta {
        position: fixed !important;
        inset-inline: 0;
        bottom: 0;
        margin: 0;
        padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.94) 50%, rgba(51, 65, 85, 0.92) 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 24px 24px 0 0;
        box-shadow: none;
        z-index: 60;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .service-mobile-cta-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px;
        max-width: min(640px, 100%);
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
        padding: 0;
        overflow: hidden;
    }

    .service-mobile-cta-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 48px;
        border-radius: 9999px;
        font-weight: 700;
        font-size: 0.95rem;
        transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
        box-shadow: none;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .service-mobile-cta-btn.secondary {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .service-mobile-cta-btn.primary {
        background: linear-gradient(90deg, #2563eb 0%, #4f46e5 100%);
        color: #ffffff;
        border: 1px solid transparent;
    }

    .service-mobile-cta-btn:active {
        transform: translateY(1px) scale(0.99);
    }
}

/* ========================================
   REDUCED MOTION
======================================== */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* AOS: don't animate in reduced-motion */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ========================================
   DARK THEME GLOBAL STYLES
======================================== */
.dark-theme body {
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
}

.dark-theme .bg-white {
    background-color: var(--md-sys-color-surface-variant) !important;
}

.dark-theme .bg-white\/40 {
    background-color: rgba(30, 41, 59, 0.55) !important;
}

.dark-theme .bg-slate-50 {
    background-color: var(--md-sys-color-surface-variant) !important;
}

.dark-theme .bg-slate-100 {
    background-color: var(--md-sys-color-surface-variant) !important;
}

.dark-theme .text-slate-600,
.dark-theme .text-slate-700,
.dark-theme .text-gray-600,
.dark-theme .text-gray-700 {
    color: var(--md-sys-color-on-surface-variant) !important;
}

.dark-theme .text-slate-800,
.dark-theme .text-slate-900,
.dark-theme .text-gray-800,
.dark-theme .text-gray-900 {
    color: var(--md-sys-color-on-surface) !important;
}

.dark-theme .border-slate-200,
.dark-theme .border-slate-300,
.dark-theme .border-gray-200,
.dark-theme .border-gray-300 {
    border-color: var(--md-sys-color-outline) !important;
}

.dark-theme .shadow-lg {
    box-shadow: var(--md-sys-elevation-2) !important;
}

.dark-theme .shadow-md {
    box-shadow: var(--md-sys-elevation-1) !important;
}

/* Section backgrounds */
.dark-theme .section-standard {
    background: linear-gradient(to bottom, rgba(30, 41, 59, 0.3), var(--md-sys-color-surface));
}

.dark-theme .bg-pattern {
    background:
        radial-gradient(circle at 2px 2px, rgba(203, 213, 225, 0.1) 1px, transparent 1px),
        linear-gradient(145deg, var(--md-sys-color-surface) 0%, var(--md-sys-color-surface-variant) 100%);
    background-size: 50px 50px, auto;
    background-repeat: repeat, no-repeat;
}

.dark-theme .section-title {
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #dbeafe !important;
    color: #dbeafe !important;
}

/* Cards */
.dark-theme .service-card,
.dark-theme .review-card,
.dark-theme .pricing-card {
    background-color: var(--md-sys-color-surface-variant);
    border-color: var(--md-sys-color-outline);
}

.dark-theme #services-grid .service-card .service-card-title {
    color: #bfdbfe;
}

.dark-theme .card-arrow-circle {
    background-color: rgba(30, 41, 59, 0.95);
    color: #93a7c2;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.dark-theme .service-card:hover .card-arrow-circle {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.6);
}

.dark-theme .pricing-popular-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #f8fafc;
    border: 1px solid rgba(147, 197, 253, 0.5);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.dark-theme .pricing-disclaimer-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.92) 100%);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.dark-theme .pricing-disclaimer-icon {
    background: rgba(59, 130, 246, 0.18);
}

.dark-theme .pricing-disclaimer-icon-symbol {
    color: #93c5fd;
}

.dark-theme .pricing-disclaimer-title {
    color: #dbeafe;
}

.dark-theme .pricing-disclaimer-text {
    color: #cbd5e1;
}

.dark-theme .pricing-package-card {
    color: #e2e8f0;
    border-color: var(--md-sys-color-outline);
}

.dark-theme .pricing-package-card--popular {
    background: linear-gradient(155deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-color: #60a5fa;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.45);
}

.dark-theme .pricing-package-title {
    color: #f8fafc;
}

.dark-theme .pricing-package-subtitle {
    color: #cbd5e1 !important;
}

.dark-theme .pricing-package-features {
    color: #e2e8f0 !important;
}

.dark-theme .pricing-package-feature-icon {
    color: #4ade80 !important;
}

.dark-theme .service-info-price-card {
    background: linear-gradient(155deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-color: rgba(96, 165, 250, 0.45);
}

.dark-theme .service-info-price-label {
    color: #dbeafe !important;
}

.dark-theme .service-info-price-value {
    color: #4ade80 !important;
}

.dark-theme .service-info-price-note {
    color: #94a3b8 !important;
}

.dark-theme .service-info-title {
    color: #93c5fd !important;
}

/* Service pages: better heading contrast in dark mode */
.dark-theme #benefits .text-blue-900,
.dark-theme #repair-process-section .text-blue-900,
.dark-theme #articles .text-blue-900 {
    color: #bfdbfe !important;
}

.dark-theme #related-services .text-blue-900 {
    color: #bfdbfe !important;
}

.dark-theme #related-services .text-blue-600 {
    color: #93c5fd !important;
}

.dark-theme #related-services .group-hover\:text-blue-700:hover,
.dark-theme #related-services .group-hover\:text-blue-800:hover {
    color: #dbeafe !important;
}

/* Article pages: related service + related articles cards */
.dark-theme .article-related-service {
    background: linear-gradient(155deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
}

.dark-theme .article-related-service h2 {
    color: #e2e8f0 !important;
}

.dark-theme .article-related-service p {
    color: #cbd5e1 !important;
}

.dark-theme .article-related-service a {
    color: #93c5fd !important;
}

.dark-theme .article-related-service a:hover {
    color: #dbeafe !important;
}

.dark-theme .article-related-service svg {
    color: #60a5fa !important;
}

.dark-theme .article-related-articles {
    background: linear-gradient(150deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.96) 100%) !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
}

.dark-theme .article-related-articles h2 {
    color: #bfdbfe !important;
}

.dark-theme .article-related-articles .text-blue-600 {
    color: #93c5fd !important;
}

.dark-theme .article-related-articles a {
    color: #cbd5e1 !important;
}

.dark-theme .article-related-articles a:hover {
    color: #e2e8f0 !important;
}

.dark-theme .article-cta-button {
    background-color: #b91c1c !important;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.45);
    white-space: nowrap;
}

.dark-theme .article-cta-button:hover {
    background-color: #991b1b !important;
    box-shadow: 0 22px 32px rgba(15, 23, 42, 0.5);
}

.dark-theme .article-alert-box {
    background: linear-gradient(150deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
}

.dark-theme .article-alert-box .text-red-600 {
    color: #fca5a5 !important;
}

/* Article info boxes */
.dark-theme .article-info-box {
    background: linear-gradient(150deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
}

/* Service reviews block uses neutral palette classes; remap them for dark backgrounds */
.dark-theme #reviews .text-neutral-900 {
    color: #f1f5f9 !important;
}

.dark-theme #reviews .text-neutral-800 {
    color: #e2e8f0 !important;
}

.dark-theme #reviews .text-neutral-600,
.dark-theme #reviews .text-neutral-500,
.dark-theme #reviews .text-neutral-400 {
    color: #94a3b8 !important;
}

.dark-theme #reviews .bg-neutral-50 {
    background-color: #334155 !important;
}

.dark-theme #reviews .bg-neutral-100 {
    background-color: #475569 !important;
}

.dark-theme #reviews .border-neutral-200 {
    border-color: #64748b !important;
}

.dark-theme #reviews .bg-neutral-200 {
    background-color: #94a3b8 !important;
}

.dark-theme #reviews .review-rating-label {
    opacity: 1 !important;
    color: #cbd5e1 !important;
}

.reviews-verified-badge {
    position: relative;
    padding: 0 0 0.45rem;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #2563eb !important;
    box-shadow: none !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reviews-verified-badge::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0) 0%, rgba(37, 99, 235, 0.6) 20%, rgba(37, 99, 235, 0.6) 80%, rgba(37, 99, 235, 0) 100%);
    opacity: 0.85;
}

.reviews-verified-badge .material-icons-round {
    color: inherit;
}

.reviews-verified-badge:hover::after {
    opacity: 1;
}

.dark-theme #reviews .reviews-rating-card {
    border-color: rgba(147, 197, 253, 0.55) !important;
    background:
        radial-gradient(130% 90% at 15% 5%, rgba(96, 165, 250, 0.16) 0%, rgba(96, 165, 250, 0) 55%),
        linear-gradient(145deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.45), inset 0 0 0 1px rgba(191, 219, 254, 0.08);
}

.dark-theme #reviews .reviews-verified-badge {
    color: #bfdbfe !important;
    box-shadow: none !important;
}

.dark-theme #reviews .reviews-verified-badge::after {
    background: linear-gradient(90deg, rgba(191, 219, 254, 0) 0%, rgba(191, 219, 254, 0.65) 20%, rgba(191, 219, 254, 0.65) 80%, rgba(191, 219, 254, 0) 100%);
}

.dark-theme #reviews .reviews-rating-card:hover {
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(125, 211, 252, 0.2);
}

.dark-theme #reviews .reviews-rating-stars {
    filter: drop-shadow(0 1px 6px rgba(251, 191, 36, 0.25));
}

.dark-theme #reviews .reviews-metrics {
    border-color: rgba(148, 163, 184, 0.35) !important;
}

.dark-theme #reviews .reviews-metric-row {
    justify-content: center !important;
    gap: 2.25rem;
    text-align: center;
}

.dark-theme #reviews .reviews-metric-row .review-rating-label {
    min-width: 8.25rem;
    text-align: center;
}

.dark-theme #reviews .reviews-all-link {
    position: relative;
    max-width: 270px;
    margin-left: auto;
    margin-right: auto;
    color: #dbeafe !important;
    background: rgba(226, 232, 240, 0.1) !important;
    border: 1px solid rgba(147, 197, 253, 0.45);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.dark-theme #reviews .reviews-all-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(191, 219, 254, 0.25) 45%, transparent 75%);
    transform: translateX(-130%);
    transition: transform 0.7s ease;
    pointer-events: none;
}

.dark-theme #reviews .reviews-all-link:hover::before {
    transform: translateX(130%);
}

.dark-theme #reviews .reviews-all-link:hover {
    background: rgba(30, 58, 138, 0.32) !important;
    border-color: rgba(147, 197, 253, 0.7);
    color: #ffffff !important;
}

/* FAQ contrast on service pages in dark mode */
.dark-theme #faq .faq-item {
    border-color: rgba(148, 163, 184, 0.35) !important;
}

.dark-theme #faq .faq-question-title {
    color: #bfdbfe !important;
}

.dark-theme #faq .faq-question-chevron {
    color: #cbd5e1 !important;
}

.dark-theme #faq .faq-answer-text {
    color: #cbd5e1 !important;
    border-top-color: rgba(148, 163, 184, 0.2) !important;
}

.dark-theme #faq .faq-cta-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-color: rgba(96, 165, 250, 0.55) !important;
}

.dark-theme #faq .faq-cta-text {
    color: #cbd5e1 !important;
}

/* Article pages: contrast fixes in dark mode */
.dark-theme .article-page .text-blue-900,
.dark-theme .article-page .text-blue-800 {
    color: #bfdbfe !important;
}

.dark-theme .article-page .text-blue-900\/90 {
    color: #cfe3ff !important;
}

.dark-theme .article-page .text-blue-700,
.dark-theme .article-page .text-blue-600 {
    color: #93c5fd !important;
}

.dark-theme .article-page .hover\:text-blue-700:hover,
.dark-theme .article-page .hover\:text-blue-800:hover {
    color: #dbeafe !important;
}

/* Article info callouts (blue/indigo/purple/green/amber etc.) */
.dark-theme .article-page .bg-blue-50,
.dark-theme .article-page .bg-blue-50\/60,
.dark-theme .article-page .bg-indigo-50,
.dark-theme .article-page .bg-indigo-50\/60,
.dark-theme .article-page .bg-purple-50,
.dark-theme .article-page .bg-purple-50\/60,
.dark-theme .article-page .bg-emerald-50,
.dark-theme .article-page .bg-emerald-50\/60,
.dark-theme .article-page .bg-sky-50,
.dark-theme .article-page .bg-sky-50\/60,
.dark-theme .article-page .bg-rose-50,
.dark-theme .article-page .bg-rose-50\/60,
.dark-theme .article-page .bg-yellow-50,
.dark-theme .article-page .bg-yellow-50\/60,
.dark-theme .article-page .bg-amber-50,
.dark-theme .article-page .bg-amber-50\/60 {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
}

.dark-theme .article-page .border-blue-100,
.dark-theme .article-page .border-blue-200,
.dark-theme .article-page .border-indigo-100,
.dark-theme .article-page .border-indigo-200,
.dark-theme .article-page .border-purple-100,
.dark-theme .article-page .border-purple-200,
.dark-theme .article-page .border-emerald-100,
.dark-theme .article-page .border-emerald-200,
.dark-theme .article-page .border-sky-100,
.dark-theme .article-page .border-sky-200,
.dark-theme .article-page .border-rose-100,
.dark-theme .article-page .border-rose-200,
.dark-theme .article-page .border-yellow-100,
.dark-theme .article-page .border-yellow-200,
.dark-theme .article-page .border-amber-100,
.dark-theme .article-page .border-amber-200 {
    border-color: rgba(96, 165, 250, 0.4) !important;
}

/* Article amber callout: icon and text contrast in dark mode */
.dark-theme .article-page .bg-amber-50 .text-amber-600 {
    color: #fbbf24 !important;
}

.dark-theme .article-page .bg-amber-50 .text-slate-800 {
    color: #fef3c7 !important;
}

/* Privacy page final note card */
.dark-theme .privacy-final-note {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border: 1px solid rgba(96, 165, 250, 0.45);
}

.dark-theme .privacy-final-note-title {
    color: #dbeafe !important;
}

.dark-theme .privacy-final-note-text {
    color: #cbd5e1 !important;
}

/* Home services section: improve dark-mode contrast for category cards and filter pills */
.dark-theme #services-grid .category-link-card h3 {
    color: #bfdbfe !important;
}

.dark-theme #services-grid .category-link-card p {
    color: #cbd5e1 !important;
}

.dark-theme #filter-pill .filter-btn:not(.active) {
    background: rgba(30, 41, 59, 0.92) !important;
    color: #93c5fd !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
}

.dark-theme #filter-pill .filter-btn:not(.active) span {
    color: #93c5fd !important;
}

.dark-theme #filter-pill .filter-btn:not(.active):hover {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.55) !important;
}

.dark-theme .location-feature-card:hover {
    background: rgba(30, 41, 59, 0.78) !important;
}

/* Price table: fix light strips/hover in dark mode */
.dark-theme .uslugi-price-page .bg-slate-50\/80 {
    background-color: rgba(30, 41, 59, 0.9) !important;
}

.dark-theme .uslugi-price-page .bg-blue-50\/50 {
    background-color: rgba(59, 130, 246, 0.18) !important;
}

.dark-theme .uslugi-price-page .hover\:bg-slate-50:hover {
    background-color: rgba(51, 65, 85, 0.72) !important;
}

.dark-theme .uslugi-price-page .text-blue-900 {
    color: #bfdbfe !important;
}

/* Homepage maps block in dark mode */
.dark-theme #google-map .bg-white,
.dark-theme #yandex-map .bg-white {
    background-color: #0f172a !important;
}

.dark-theme .map-switch-btn.active {
    background: rgba(30, 41, 59, 0.95) !important;
    color: #dbeafe !important;
    border: 1px solid rgba(96, 165, 250, 0.45) !important;
}

.dark-theme .map-switch-btn:not(.active) {
    color: #93c5fd !important;
}

.dark-theme #google-map iframe,
.dark-theme #yandex-map iframe {
    filter: brightness(0.85) contrast(1.15) saturate(0.85) hue-rotate(165deg);
}

/* Review tiles */
.dark-theme .review-tile-inner {
    background: linear-gradient(180deg, var(--md-sys-color-surface-variant) 0%, var(--md-sys-color-surface) 100%);
    border-color: var(--md-sys-color-outline);
}

.dark-theme .review-tile-link {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border-color: var(--md-sys-color-outline);
}

/* Form inputs */
.dark-theme input:not([type="checkbox"]):not([type="radio"]),
.dark-theme textarea,
.dark-theme select {
    background-color: var(--md-sys-color-surface) !important;
    color: var(--md-sys-color-on-surface) !important;
    border-color: var(--md-sys-color-outline) !important;
}

.dark-theme input:not([type="checkbox"]):not([type="radio"])::placeholder,
.dark-theme textarea::placeholder {
    color: var(--md-sys-color-on-surface-variant) !important;
}

/* Custom checkbox */
.dark-theme .custom-checkbox {
    background-color: var(--md-sys-color-surface) !important;
    border-color: var(--md-sys-color-outline) !important;
}

.dark-theme .custom-checkbox:checked {
    background-color: var(--md-sys-color-primary-container) !important;
    border-color: var(--md-sys-color-primary) !important;
}

/* Order form gradient border - adjust for dark theme */
.dark-theme .awT8De,
.dark-theme .order-form-card {
    background: linear-gradient(var(--md-sys-color-surface), var(--md-sys-color-surface)) content-box,
        linear-gradient(var(--md-sys-color-surface), var(--md-sys-color-surface)) padding-box,
        linear-gradient(31.5deg, #3186ff 54%, #00a5b7 61%, #0ebc5f 67%, #0ebc5f 70%, #ebcb04 78%, #fc0 80%, #fc0 84%, #ffbd06 86%, #ff6b2b 91%, #ff4641 94%, #ff4641 97%, #fa506b 100%) border-box;
}

/* Success popup */
.dark-theme .success-popup-content {
    background: linear-gradient(var(--md-sys-color-surface-variant), var(--md-sys-color-surface-variant)) padding-box,
        linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899) border-box;
}

.dark-theme .success-popup-title {
    color: var(--md-sys-color-on-surface);
}

.dark-theme .success-popup-message {
    color: var(--md-sys-color-on-surface-variant);
}

/* Back to top button */
.dark-theme .back-to-top {
    background-color: var(--md-sys-color-primary);
}

.dark-theme .back-to-top:hover {
    background-color: #93c5fd;
}

/* ========================================
   DARK THEME - POPUPS & MODALS
======================================== */
.dark-theme .popup-overlay {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.dark-theme .popup-content {
    background: var(--md-sys-color-surface-variant);
    border-color: var(--md-sys-color-outline);
}

.dark-theme .popup-title {
    color: var(--md-sys-color-on-surface);
}

.dark-theme #booking-popup .popup-title-icon {
    color: #93c5fd !important;
}

.dark-theme .quick-message-icon {
    color: #93c5fd !important;
}

.dark-theme .quick-message-title {
    color: #dbeafe !important;
}

.dark-theme .appointment-card {
    border-color: rgba(147, 197, 253, 0.55) !important;
    background:
        radial-gradient(120% 85% at 12% 0%, rgba(96, 165, 250, 0.16) 0%, rgba(96, 165, 250, 0) 58%),
        linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    box-shadow: 0 22px 40px rgba(2, 6, 23, 0.42), inset 0 0 0 1px rgba(191, 219, 254, 0.08);
}

.dark-theme .appointment-icon-wrap {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.82) 0%, rgba(79, 70, 229, 0.78) 100%);
    color: #dbeafe;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.dark-theme .appointment-title {
    color: #dbeafe;
}

.dark-theme .appointment-title-accent {
    color: #60a5fa;
}

.dark-theme .appointment-text {
    color: #cbd5e1;
}

.dark-theme .appointment-cta {
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3), 0 0 0 1px rgba(147, 197, 253, 0.1);
}

.dark-theme .popup-description {
    color: var(--md-sys-color-on-surface-variant);
}

.dark-theme .popup-close {
    background: rgba(255, 255, 255, 0.1);
    color: var(--md-sys-color-on-surface);
}

.dark-theme .popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Form labels in dark mode */
.dark-theme label {
    color: var(--md-sys-color-on-surface);
}

.dark-theme .text-gray-600,
.dark-theme .text-slate-500 {
    color: var(--md-sys-color-on-surface-variant) !important;
}

.dark-theme .discount-notice-card {
    background: linear-gradient(135deg, #312e81 0%, #3730a3 48%, #1d4ed8 100%);
}

.dark-theme .discount-cta-btn {
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(96, 165, 250, 0.45);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.45), inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.dark-theme .discount-cta-btn:hover {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(129, 194, 255, 0.7);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(96, 165, 250, 0.25);
}

/* ========================================
   BACK TO TOP BUTTON
======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: auto;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--md-sys-color-primary);
    color: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--md-sys-elevation-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #1d4ed8;
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        left: 1.5rem;
        right: auto;
        width: 3rem;
        height: 3rem;
    }

    /* Force Chatwoot widget to match back-to-top position (default: 1.5rem) */
    #chatwoot-widget-container,
    .woot-widget-holder,
    .woot-bubble-holder,
    div[class*="woot-widget"],
    div[id*="chatwoot-widget"] {
        bottom: 1.5rem !important;
        right: 1.5rem !important;
    }

    /* Fix Chat Window Width on small screens */
    .woot-widget-holder {
        width: calc(100% - 2rem) !important;
        max-width: calc(100vw - 2rem) !important;
        left: 1rem !important;
        right: 1rem !important;
        margin: 0 !important;
    }

    /* Service pages only: raise widget above the sticky CTA bar */
    body.has-mobile-cta .back-to-top {
        bottom: 100px;
        left: 1rem;
        right: auto;
    }

    body.has-mobile-cta #chatwoot-widget-container,
    body.has-mobile-cta .woot-widget-holder,
    body.has-mobile-cta .woot-bubble-holder,
    body.has-mobile-cta div[class*="woot-widget"],
    body.has-mobile-cta div[id*="chatwoot-widget"] {
        bottom: 100px !important;
        right: 1rem !important;
    }
}

/* Hide ALL Chatwoot elements when the mobile menu is open */
body.mobile-menu-open #chatwoot-widget-container,
body.mobile-menu-open .woot-widget-bubble,
body.mobile-menu-open .woot-elements--right,
body.mobile-menu-open .woot-widget-holder {
    display: none !important;
    visibility: hidden !important;
}

/* Opened chat window fills the screen on mobile */
@media (max-width: 768px) {
    .woot-widget-holder.woot--opened {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
}
