/* ========================================
   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);
}

/* 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-heading {
    font-family: 'Space Grotesk', sans-serif !important;
}

@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%;
    overflow-x: hidden;
}

/* ========================================
   ЯКОРНЫЕ ССЫЛКИ — отступ под фиксированную шапку 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: max(100px, 4rem);
}

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


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

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Darker overlay with brand colors for better text contrast */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.7) 100%);
    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;
}

/* 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;
}

.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 .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;
}

/* 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(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(248, 250, 252, 0.98) 100%);
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
        z-index: 60;
        backdrop-filter: blur(6px);
        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: 0 8px 18px rgba(15, 23, 42, 0.12);
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .service-mobile-cta-btn.secondary {
        background: #ffffff;
        color: #1e3a8a;
        border: 1px solid #cbd5f5;
    }

    .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;
    }
}

/* ========================================
   BACK TO TOP BUTTON
======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    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;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
    }
}