/* ============================================================
   «Мастер на дом» — основной CSS
   ============================================================ */

:root {
    --primary: #0f3a5f;
    --primary-dark: #0a2842;
    --primary-light: #1e5b8a;
    --accent: #ff7a00;
    --accent-dark: #e66d00;
    --text: #1a1f2e;
    --text-muted: #6b7280;
    --bg: #ffffff;
    --bg-light: #f5f7fa;
    --bg-dark: #0f1a2a;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.2s ease;
}

/* ─────────── Сброс ─────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--text); font-weight: 700; }
h1 { font-size: 2.4rem; margin-bottom: 0.5em; }
h2 { font-size: 1.8rem; margin-bottom: 0.6em; }
h3 { font-size: 1.3rem; margin-bottom: 0.5em; }
p { margin-bottom: 1em; }
ul, ol { padding-left: 1.5em; margin-bottom: 1em; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: var(--text-muted); font-size: 0.9em; }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.5rem; }
.lead { font-size: 1.1rem; color: var(--text-muted); }

/* ─────────── Кнопки ─────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius);
    font-weight: 600; font-size: 0.95rem; line-height: 1;
    border: 2px solid transparent; cursor: pointer;
    text-decoration: none; transition: var(--transition);
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-outline-white { background: transparent; color: white; border-color: white; }
.btn-outline-white:hover { background: white; color: var(--primary); }
.btn-white { background: white; color: var(--primary); border-color: white; }
.btn-white:hover { background: var(--bg-light); color: var(--primary); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; color: white; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-width: 1px; }
.btn-block { display: flex; width: 100%; }

/* ─────────── Topbar ─────────── */
.topbar { background: var(--primary-dark); color: rgba(255,255,255,0.85); font-size: 0.85rem; padding: 8px 0; }
.topbar a { color: inherit; }
.topbar a:hover { color: var(--accent); }
.topbar-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.topbar-left, .topbar-right { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar-item { display: inline-flex; align-items: center; gap: 5px; }

/* ─────────── Header ─────────── */
.header { background: white; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon { font-size: 38px; line-height: 1; }
.logo-name { font-size: 1.3rem; font-weight: 800; color: var(--primary); display: block; }
.logo-tagline { font-size: 0.75rem; color: var(--text-muted); }
.logo-dot { color: var(--accent); }
.main-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav-link {
    padding: 8px 14px; border-radius: 6px; color: var(--text); font-weight: 500; font-size: 0.95rem;
}
.nav-link:hover, .nav-link.active { background: var(--bg-light); color: var(--primary); }
.header-cta { padding: 10px 20px; }
.mobile-toggle { display: none; background: transparent; border: 0; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; }
.mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--primary); }

/* ─────────── Main ─────────── */
.main-content { flex: 1; }
.section { padding: 70px 0; }
.section-light { background: var(--bg-light); }
.section-dark { background: var(--bg-dark); color: white; }
.section-dark h2, .section-dark h3 { color: white; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section-head-light { color: white; }
.section-title { font-size: 2.2rem; margin-bottom: 12px; }
.section-sub { color: var(--text-muted); font-size: 1.1rem; }
.section-head-light .section-sub { color: rgba(255,255,255,0.75); }

/* ─────────── Hero ─────────── */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    color: white;
    padding: 70px 0 90px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(255,122,0,0.12) 0, transparent 40%),
                      radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0, transparent 50%);
    pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: center; position: relative; z-index: 1; }
.hero-badge {
    display: inline-block; background: rgba(255,122,0,0.15); color: var(--accent);
    padding: 6px 14px; border-radius: 100px; font-size: 0.85rem; font-weight: 600;
    border: 1px solid rgba(255,122,0,0.3); margin-bottom: 20px;
}
.hero-title { color: white; font-size: 2.8rem; line-height: 1.15; margin-bottom: 16px; }
.hero-subtitle { font-size: 1.2rem; opacity: 0.92; margin-bottom: 32px; }
.hero-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 32px; }
.hero-feature { display: flex; align-items: center; gap: 10px; }
.hf-icon { font-size: 28px; }
.hf-text { font-size: 0.85rem; line-height: 1.3; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-form-wrap { background: white; color: var(--text); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 32px; }
.hero-form h3 { font-size: 1.4rem; margin-bottom: 4px; }
.hero-form-sub { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }

/* ─────────── Формы ─────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.form-control {
    display: block; width: 100%; padding: 11px 14px;
    font-size: 0.95rem; font-family: inherit; line-height: 1.5;
    color: var(--text); background: white;
    border: 1.5px solid var(--border); border-radius: 8px;
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(30,91,138,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { margin-top: 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 4px; }
.form-note { font-size: 0.8rem; color: var(--text-muted); margin: 12px 0 0; }
.req { color: var(--danger); }

/* ─────────── Статистика ─────────── */
.stats { padding: 60px 0; background: white; border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-card { text-align: center; padding: 20px; }
.stat-num { font-size: 2.6rem; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.stat-label { color: var(--text-muted); font-size: 0.95rem; }

/* ─────────── Категории ─────────── */
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card {
    background: white; border-radius: var(--radius-lg);
    padding: 28px 20px; text-align: center;
    text-decoration: none; color: var(--text);
    border: 2px solid var(--border);
    transition: var(--transition);
}
.cat-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    color: var(--text);
}
.cat-icon { font-size: 48px; margin-bottom: 12px; line-height: 1; }
.cat-name { font-size: 1.05rem; margin-bottom: 6px; }
.cat-meta { font-size: 0.85rem; color: var(--text-muted); }

/* ─────────── Почему мы ─────────── */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card { background: var(--bg-light); border-radius: var(--radius-lg); padding: 30px; transition: var(--transition); }
.why-card:hover { background: white; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.why-num { font-size: 2rem; font-weight: 800; color: var(--accent); margin-bottom: 12px; }

/* ─────────── Шаги ─────────── */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg); padding: 28px; text-align: center; }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--accent); color: white; font-size: 1.5rem; font-weight: 800;
    margin-bottom: 16px;
}
.step-card p { color: rgba(255,255,255,0.8); margin-bottom: 0; }

/* ─────────── Мастера ─────────── */
.masters-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.masters-grid-detailed { grid-template-columns: repeat(3, 1fr); }
.master-card {
    background: white; border-radius: var(--radius-lg);
    padding: 28px 20px; text-align: center;
    text-decoration: none; color: var(--text);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.master-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); color: var(--text); }
.master-card-detailed { padding: 32px 24px; text-align: left; }
.master-card-detailed .master-avatar { margin: 0 auto 16px; }
.master-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; margin: 0 auto 14px;
}
.master-avatar.lg { width: 100px; height: 100px; font-size: 2.6rem; }
.master-avatar.xl { width: 130px; height: 130px; font-size: 3.5rem; }
.master-name { font-size: 1.1rem; margin-bottom: 4px; text-align: center; }
.master-card-detailed .master-name { text-align: left; }
.master-spec { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; text-align: center; }
.master-card-detailed .master-spec { text-align: left; }
.master-meta { font-size: 0.85rem; color: var(--text); display: flex; justify-content: center; gap: 6px; }
.master-card-detailed .master-meta { justify-content: flex-start; }
.master-stats { display: flex; gap: 16px; margin: 16px 0; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.master-stats > div { flex: 1; text-align: center; }
.master-stats strong { display: block; font-size: 1.1rem; color: var(--primary); }
.master-stats span { font-size: 0.75rem; color: var(--text-muted); }
.master-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
    display: inline-block; background: var(--bg-light); color: var(--text);
    padding: 4px 10px; border-radius: 100px; font-size: 0.8rem;
    text-decoration: none;
}
a.tag:hover { background: var(--primary); color: white; }
.master-bio { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }

.master-profile {
    display: grid; grid-template-columns: 130px 1fr; gap: 24px; align-items: center;
    margin-bottom: 30px;
}

/* ─────────── Отзывы ─────────── */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-card {
    background: white; border-radius: var(--radius-lg);
    padding: 24px; border: 1px solid var(--border);
}
.review-rating { font-size: 1.1rem; margin-bottom: 10px; }
.review-text { color: var(--text); margin-bottom: 14px; }
.review-author { font-size: 0.9rem; }
.review-meta { color: var(--text-muted); }
.review-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* Star rating input */
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating-input input { display: none; }
.rating-input label { font-size: 28px; cursor: pointer; filter: grayscale(1); opacity: 0.4; }
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label { filter: grayscale(0); opacity: 1; }

/* ─────────── CTA лента ─────────── */
.cta-band { background: linear-gradient(135deg, var(--accent) 0%, #ff9933 100%); padding: 60px 0; color: white; }
.cta-band h2 { color: white; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.95); margin: 0; }
.cta-band-row { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─────────── Footer ─────────── */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.75); padding: 60px 0 24px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { color: white; margin-bottom: 16px; font-size: 1rem; }
.footer-logo { font-size: 1.4rem; font-weight: 800; color: white; margin-bottom: 14px; }
.footer-about { font-size: 0.9rem; line-height: 1.6; margin-bottom: 18px; }
.footer-links, .footer-contacts { list-style: none; padding: 0; }
.footer-links li, .footer-contacts li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-links a, .footer-contacts a { color: rgba(255,255,255,0.75); }
.footer-links a:hover, .footer-contacts a:hover { color: var(--accent); }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 18px; color: white; }
.footer-socials a:hover { background: var(--accent); }
.footer-bottom { padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.85rem; }

/* ─────────── Плавающие кнопки ─────────── */
.float-cta, .float-wa {
    position: fixed; right: 20px; width: 56px; height: 56px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 26px; text-decoration: none;
    box-shadow: var(--shadow-lg); z-index: 99;
    transition: var(--transition);
}
.float-cta { bottom: 90px; background: var(--accent); color: white; }
.float-wa { bottom: 20px; background: #25d366; color: white; }
.float-cta:hover, .float-wa:hover { transform: scale(1.1); color: white; }

/* ─────────── Алерты ─────────── */
.alert { padding: 14px 18px; border-radius: var(--radius); margin: 20px auto; max-width: 1200px; font-weight: 500; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.alert-error { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-info { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--info); }

/* ─────────── Прайс-лист ─────────── */
.page-header {
    background: linear-gradient(135deg, var(--bg-light) 0%, white 100%);
    padding: 50px 0 40px;
    border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 8px; }
.page-header p { color: var(--text-muted); max-width: 800px; }
.breadcrumbs { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumbs span { margin: 0 6px; opacity: 0.5; }
.breadcrumbs span:last-child { color: var(--text); opacity: 1; margin: 0; }

.services-block { background: white; border-radius: var(--radius-lg); padding: 30px; margin-bottom: 24px; box-shadow: var(--shadow); }
.services-block-head { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.sb-icon { font-size: 56px; line-height: 1; }
.services-block h2 { margin-bottom: 4px; font-size: 1.5rem; }
.services-block-head p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.price-table th { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; background: var(--bg-light); }
.price-desc { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.price-dur, .price-val { white-space: nowrap; font-weight: 600; }
.price-val { color: var(--primary); }
.badge { display: inline-block; background: #d1fae5; color: var(--success); padding: 3px 10px; border-radius: 100px; font-size: 0.8rem; font-weight: 600; }

/* ─────────── Двухколоночная страница ─────────── */
.service-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.sidebar-card { background: white; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.sidebar-card h3 { margin-bottom: 8px; }
.sidebar-card h4 { margin-bottom: 12px; }
.sidebar-info { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.sidebar-info h3 { color: white; }
.sidebar-info p { color: rgba(255,255,255,0.9); margin-bottom: 16px; }

.check-list { list-style: none; padding: 0; }
.check-list li { padding: 8px 0 8px 28px; position: relative; font-size: 0.95rem; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 8px; color: var(--success); font-weight: 700; }

/* ─────────── Карточки/общее ─────────── */
.card { background: white; border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.order-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.order-form h2 { font-size: 1.2rem; padding-bottom: 10px; margin: 30px 0 16px; border-bottom: 2px solid var(--bg-light); }
.order-form h2:first-child { margin-top: 0; }

/* ─────────── Success/Status ─────────── */
.success-card { background: white; border-radius: var(--radius-lg); padding: 50px 40px; text-align: center; box-shadow: var(--shadow-md); }
.success-icon { font-size: 80px; line-height: 1; margin-bottom: 20px; }
.order-card-info { text-align: left; background: var(--bg-light); border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.order-card-info > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.order-card-info > div:last-child { border-bottom: 0; }
.order-card-info span { color: var(--text-muted); }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.status-badge {
    display: inline-block; padding: 5px 14px; border-radius: 100px;
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.st-new       { background: #dbeafe; color: #1e40af; }
.st-confirmed { background: #e0e7ff; color: #3730a3; }
.st-assigned  { background: #fce7f3; color: #9d174d; }
.st-progress  { background: #fef3c7; color: #92400e; }
.st-done      { background: #d1fae5; color: #065f46; }
.st-cancelled { background: #fee2e2; color: #991b1b; }

.timeline { list-style: none; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 20px 32px; }
.tl-dot { position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 3px solid white; box-shadow: 0 0 0 1px var(--border); }
.tl-content strong { display: block; font-size: 0.95rem; }
.tl-comment { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.tl-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; }
.order-num { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.order-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

/* ─────────── Контакты ─────────── */
.contacts-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 18px; background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ci-icon { font-size: 28px; line-height: 1; }
.contact-item h3 { margin-bottom: 2px; font-size: 1rem; }
.contact-item p { margin: 0; color: var(--text-muted); }
.contact-item a { color: var(--primary); }
.map-placeholder { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.map-note { padding: 12px 16px; background: white; font-size: 0.9rem; color: var(--text-muted); border-top: 1px solid var(--border); }

/* ─────────── About ─────────── */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.stats-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats-mini .stat-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.stats-mini .stat-num { font-size: 1.8rem; }

/* ─────────── Логин ─────────── */
.login-section { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); min-height: 70vh; display: flex; align-items: center; }
.login-card { padding: 40px; }
.login-head { text-align: center; margin-bottom: 24px; }
.login-logo { font-size: 56px; line-height: 1; margin-bottom: 12px; }
.login-head h1 { font-size: 1.6rem; margin-bottom: 4px; }
.login-head p { color: var(--text-muted); margin: 0; }
.login-hint { text-align: center; margin-top: 16px; color: var(--text-muted); }
.login-hint code { background: var(--bg-light); padding: 2px 6px; border-radius: 4px; }

/* ─────────── Адаптив ─────────── */
/* ─────────── Hero floating icons ─────────── */
.hero-floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-float {
    position: absolute; font-size: 56px; opacity: 0.12;
    animation: float-around 12s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}
.hero-float.f1 { top: 10%; left: 8%; animation-delay: 0s; }
.hero-float.f2 { top: 65%; left: 4%; animation-delay: 1.5s; font-size: 48px; }
.hero-float.f3 { top: 20%; right: 35%; animation-delay: 3s; font-size: 44px; }
.hero-float.f4 { top: 75%; right: 38%; animation-delay: 4.5s; font-size: 50px; }
.hero-float.f5 { top: 8%; right: 8%; animation-delay: 6s; font-size: 52px; }
.hero-float.f6 { top: 80%; left: 45%; animation-delay: 7.5s; font-size: 38px; }
@keyframes float-around {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25%      { transform: translate(15px, -20px) rotate(8deg); }
    50%      { transform: translate(-10px, -10px) rotate(-5deg); }
    75%      { transform: translate(8px, 15px) rotate(3deg); }
}

/* ─────────── Категории — большие SVG-иллюстрации ─────────── */
.cat-illust {
    width: 100%; max-width: 130px; margin: 0 auto 12px;
    position: relative; z-index: 1;
}
.cat-illust svg { width: 100%; height: auto; display: block; border-radius: 16px; }
.cat-card { padding: 20px 18px 18px; }

/* ─────────── Галерея «Что мы ремонтируем» ─────────── */
.section-gallery { padding: 70px 0; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.gallery-card {
    background: white; border-radius: var(--radius-lg);
    overflow: hidden; text-decoration: none; color: var(--text);
    box-shadow: var(--shadow); transition: var(--transition);
    display: flex; flex-direction: column;
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }
.gallery-img { aspect-ratio: 1.4 / 1; overflow: hidden; background: var(--bg-light); }
.gallery-img svg { width: 100%; height: 100%; display: block; transition: transform 0.4s; }
.gallery-card:hover .gallery-img svg { transform: scale(1.05); }
.gallery-info { padding: 14px 18px 18px; }
.gallery-info h3 { font-size: 1.05rem; margin: 0 0 4px; }
.gallery-meta { font-size: 0.85rem; color: var(--text-muted); }

/* ─────────── Why-card SVG-иконки ─────────── */
.why-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px; transition: var(--transition);
}
.why-icon svg { width: 32px; height: 32px; }
.why-card:hover .why-icon { transform: rotate(-5deg) scale(1.1); }
.why-icon-orange { background: rgba(255,122,0,0.12); color: var(--accent); }
.why-icon-blue   { background: rgba(15,58,95,0.12);  color: var(--primary); }
.why-icon-green  { background: rgba(16,185,129,0.12); color: #059669; }
.why-icon-purple { background: rgba(124,58,237,0.12); color: #7c3aed; }
.why-icon-teal   { background: rgba(13,148,136,0.12); color: #0d9488; }
.why-icon-rose   { background: rgba(190,24,93,0.12);  color: #be185d; }

/* ─────────── Шаги — иконки ─────────── */
.step-card { position: relative; }
.step-icon {
    width: 64px; height: 64px; margin: 0 auto 14px;
    background: rgba(255,255,255,0.1); border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
}
.step-icon svg { width: 36px; height: 36px; }
.step-num {
    position: absolute; top: -12px; right: -12px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--accent); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.95rem;
    box-shadow: 0 4px 8px rgba(255,122,0,0.4);
}

/* ─────────── Баннер категории на странице услуги ─────────── */
.category-banner {
    background: linear-gradient(135deg, var(--bg-light) 0%, white 100%);
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}
.category-banner-grid {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.category-banner h1 { font-size: 2.2rem; margin: 8px 0 12px; }
.category-banner-desc { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 20px; max-width: 600px; }
.category-banner-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.category-banner-illust { max-width: 320px; margin-left: auto; }
.category-banner-illust svg { width: 100%; height: auto; border-radius: 24px; box-shadow: var(--shadow-lg); }

/* ─────────── Услуги: иллюстрация в шапке блока ─────────── */
.sb-illust { width: 80px; flex-shrink: 0; }
.sb-illust svg { width: 100%; height: auto; border-radius: 12px; }

/* ─────────── Office illustration ─────────── */
.office-illust { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ─────────── Cookie banner ─────────── */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 110;
    background: #0f1a2a; color: white; padding: 16px 0; box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
}
.cookie-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 0.9rem; }
.cookie-row a { color: var(--accent); }

/* ─────────── Header actions ─────────── */
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-login {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-light); display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-size: 18px; transition: var(--transition);
}
.header-login:hover { background: var(--primary); color: white; }
.header-cabinet { padding: 8px 14px; }

/* ─────────── Consent checkbox ─────────── */
.consent-group { background: var(--bg-light); padding: 14px; border-radius: 10px; }
.consent-label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; font-size: 0.9rem; }
.consent-label input { margin-top: 3px; flex-shrink: 0; }

/* ─────────── Cabinet ─────────── */
.cabinet-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cabinet-stats .stat-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; text-align: center; }

/* ─────────── Payment ─────────── */
.payment-card { padding: 30px; }
.payment-amount { text-align: center; padding: 24px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border-radius: var(--radius-lg); margin-bottom: 24px; }
.payment-amount small { opacity: 0.85; font-size: 0.9rem; }
.payment-sum { font-size: 2.4rem; font-weight: 800; margin-top: 4px; }
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.payment-method { display: flex; gap: 12px; align-items: center; padding: 14px; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; transition: var(--transition); }
.payment-method:hover { border-color: var(--primary-light); background: var(--bg-light); }
.payment-method input { margin: 0; }
.payment-method input:checked + span { color: var(--primary); }
.payment-method:has(input:checked) { border-color: var(--accent); background: rgba(255,122,0,0.05); }

/* ─────────── Legal pages ─────────── */
.legal-content h2 { margin-top: 28px; padding-bottom: 6px; border-bottom: 2px solid var(--bg-light); }
.legal-content ul li { padding: 4px 0; }

/* ─────────── Skip link (a11y) ─────────── */
.skip-link {
    position: absolute; top: -100px; left: 0;
    background: var(--accent); color: white; padding: 12px 20px;
    text-decoration: none; font-weight: 600; z-index: 9999;
}
.skip-link:focus { top: 0; color: white; }

/* ─────────── Open-now индикатор ─────────── */
.open-indicator { display: inline-flex; align-items: center; gap: 6px; }
.open-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.is-open .open-dot { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.25); animation: pulse-dot 2s infinite; }
.is-closed .open-dot { background: #ef4444; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.25); } 50% { box-shadow: 0 0 0 6px rgba(16,185,129,0.05); } }

/* ─────────── Hero декорации (фоновый паттерн + волна) ─────────── */
.hero { padding-bottom: 130px; }
.hero-bg-pattern {
    position: absolute; inset: 0; opacity: 0.08; pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.6) 1.5px, transparent 1.5px),
        radial-gradient(circle, rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 40px 40px, 25px 25px;
    background-position: 0 0, 12px 12px;
}
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.hero-wave svg { display: block; width: 100%; height: 80px; }
.stats { padding-top: 0; padding-bottom: 60px; margin-top: -1px; }

.hero-form-wrap { position: relative; }
.hero-form-decor {
    position: absolute; top: -50px; right: -30px; width: 160px; opacity: 0.95;
    pointer-events: none; z-index: 1;
}
.hero-form-decor svg { width: 100%; height: auto; }
.hero-form { position: relative; z-index: 2; }

.hero-trust { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); }
.trust-avatars { display: flex; }
.trust-avatars img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--primary-dark); margin-left: -10px; box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.trust-avatars img:first-child { margin-left: 0; }
.trust-rating { font-weight: 700; font-size: 1rem; }
.trust-text { font-size: 0.85rem; opacity: 0.85; }

/* ─────────── Stat icon ─────────── */
.stat-icon { font-size: 36px; margin-bottom: 4px; }

/* ─────────── Категории — улучшенный hover ─────────── */
.cat-card { position: relative; overflow: hidden; }
.cat-decor {
    position: absolute; top: -40px; right: -40px; width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(255,122,0,0.18) 0%, transparent 70%);
    border-radius: 50%; transition: transform 0.4s; pointer-events: none;
}
.cat-card:hover .cat-decor { transform: scale(1.4); }
.cat-arrow {
    position: absolute; bottom: 12px; right: 14px;
    color: var(--accent); font-size: 1.4rem;
    opacity: 0; transform: translateX(-8px); transition: all 0.3s;
}
.cat-card:hover .cat-arrow { opacity: 1; transform: translateX(0); }

/* ─────────── Master avatar (img) ─────────── */
img.master-avatar { object-fit: cover; }

/* ─────────── Reviews — кавычки + аватар ─────────── */
.review-card { position: relative; padding-top: 50px; }
.review-quote {
    position: absolute; top: 12px; left: 24px;
    font-size: 80px; line-height: 1; color: var(--accent); opacity: 0.3;
    font-family: Georgia, serif;
}
.review-footer { display: flex; gap: 12px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.review-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }

/* ─────────── FAQ ─────────── */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: white; border-radius: var(--radius-lg); padding: 20px 24px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.faq-item summary {
    cursor: pointer; font-weight: 600; font-size: 1.05rem;
    list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+'; font-size: 1.5rem; color: var(--accent); font-weight: 300;
    transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 14px 0 0; color: var(--text-muted); }

/* ─────────── Footer credit ─────────── */
.footer-credit { font-size: 0.85rem; opacity: 0.8; }
.footer-credit strong { color: var(--accent); }

/* ─────────── Form loading state ─────────── */
.btn.is-loading {
    pointer-events: none; opacity: 0.7; position: relative; color: transparent !important;
}
.btn.is-loading::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 18px; height: 18px; margin: -9px 0 0 -9px;
    border: 2.5px solid currentColor; border-right-color: transparent;
    border-radius: 50%; animation: spin 0.7s linear infinite;
    color: white;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────── About illustration ─────────── */
.about-illust { width: 100%; height: auto; display: block; }
.error-illust { max-width: 400px; width: 100%; height: auto; margin: 0 auto; display: block; }

/* ═════════════════════════════════════════════════════
   AI-чат поддержки
   ═════════════════════════════════════════════════════ */
.ai-chat { position: fixed; right: 20px; bottom: 20px; z-index: 100; }
.ai-chat-toggle {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white; border: 0; cursor: pointer;
    box-shadow: 0 4px 20px rgba(15,58,95,0.4);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); position: relative;
}
.ai-chat-toggle:hover { transform: scale(1.08); }
.ai-chat-icon { font-size: 28px; line-height: 1; }
.ai-chat-pulse {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid var(--primary-light);
    animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.4); opacity: 0; } }

.ai-chat.is-open .ai-chat-toggle { transform: scale(0); pointer-events: none; opacity: 0; }
.ai-chat.is-open .float-cta, .ai-chat.is-open ~ .float-cta { display: none; }

/* Скрываем плавающие кнопки заявки/wa когда чат внизу */
.float-cta { bottom: 154px; }
.float-wa { bottom: 90px; }

.ai-chat-window {
    position: fixed; right: 20px; bottom: 20px;
    width: 380px; max-width: calc(100vw - 40px);
    height: 580px; max-height: calc(100vh - 40px);
    background: white; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    display: none; flex-direction: column;
    overflow: hidden; z-index: 101;
}
.ai-chat.is-open .ai-chat-window { display: flex; animation: chat-in 0.25s ease-out; }
@keyframes chat-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.ai-chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white; padding: 16px 18px;
    display: flex; align-items: center; gap: 12px;
}
.ai-chat-header-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.ai-chat-header-info { flex: 1; line-height: 1.3; }
.ai-chat-header-info strong { display: block; font-size: 0.95rem; }
.ai-chat-header-info small { font-size: 0.75rem; opacity: 0.85; display: flex; align-items: center; gap: 5px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; display: inline-block; }
.ai-chat-close {
    background: rgba(255,255,255,0.15); border: 0; color: white;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    font-size: 22px; line-height: 1; padding: 0;
}
.ai-chat-close:hover { background: rgba(255,255,255,0.3); }

.ai-chat-messages {
    flex: 1; padding: 18px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 12px;
    background: #f8fafc;
}
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 85%; }
.msg-bot { align-self: flex-start; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary-light); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.msg-user .msg-avatar { background: var(--accent); }
.msg-bubble {
    padding: 10px 14px; border-radius: 16px;
    background: white; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 0.9rem; line-height: 1.5; word-break: break-word;
    white-space: pre-wrap;
}
.msg-user .msg-bubble { background: var(--accent); color: white; }
.msg-bubble a { color: var(--primary-light); }
.msg-typing { display: inline-flex; gap: 4px; padding: 14px; }
.msg-typing span { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; animation: typing 1.2s infinite; }
.msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

.ai-chat-quick { padding: 10px 14px; display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--border); background: white; }
.quick-btn {
    background: var(--bg-light); color: var(--text); border: 0;
    padding: 7px 12px; border-radius: 100px; cursor: pointer;
    font-size: 0.78rem; transition: var(--transition);
}
.quick-btn:hover { background: var(--accent); color: white; }

.ai-chat-form { display: flex; padding: 12px; gap: 8px; background: white; border-top: 1px solid var(--border); }
.ai-chat-input {
    flex: 1; padding: 10px 14px; border: 1.5px solid var(--border);
    border-radius: 100px; font-size: 0.9rem; outline: none; font-family: inherit;
}
.ai-chat-input:focus { border-color: var(--primary-light); }
.ai-chat-send {
    width: 42px; height: 42px; border-radius: 50%; border: 0;
    background: var(--accent); color: white; cursor: pointer;
    font-size: 18px; transition: var(--transition);
}
.ai-chat-send:hover { background: var(--accent-dark); transform: scale(1.05); }
.ai-chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .category-banner-grid { grid-template-columns: 1fr; text-align: center; }
    .category-banner-illust { margin: 0 auto; max-width: 240px; }
    .category-banner-actions { justify-content: center; }
    .why-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .masters-grid { grid-template-columns: repeat(2, 1fr); }
    .masters-grid-detailed { grid-template-columns: repeat(2, 1fr); }
    .reviews-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .service-detail-grid, .order-grid, .contacts-grid, .about-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .hero-float { display: none; }
}
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    .section-title { font-size: 1.6rem; }
    .hero-title { font-size: 2rem; }
    .hero { padding: 50px 0 60px; }
    .section { padding: 50px 0; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; flex-direction: column; padding: 16px; box-shadow: var(--shadow-md); }
    .main-nav.open { display: flex; }
    .nav-link { padding: 12px 16px; }
    .header-cta { display: none; }
    .mobile-toggle { display: flex; }
    .topbar-row { font-size: 0.8rem; }
    .hero-features { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .categories-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .why-grid, .steps-grid { grid-template-columns: 1fr; }
    .masters-grid { grid-template-columns: 1fr; }
    .masters-grid-detailed { grid-template-columns: 1fr; }
    .reviews-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .cta-band-row { flex-direction: column; text-align: center; }
    .master-profile { grid-template-columns: 1fr; text-align: center; }
    .master-profile .master-avatar { margin: 0 auto; }
    .price-table { font-size: 0.85rem; }
    .price-table th, .price-table td { padding: 8px 6px; }
    .price-table .btn { padding: 6px 10px; font-size: 0.75rem; }
    .stat-num { font-size: 2rem; }
}
