﻿/* === Базовые переменные и сброс === */
        :root {
            --bg-main: #0a0a0a;
            --bg-sec: #171717;
            --bg-card: #1f1f1f;
            --text-main: #e5e5e5;
            --text-muted: #a3a3a3;
            --border-color: #262626;
            --accent: #ffffff;
            
            --font-sans: 'Inter', sans-serif;
            --font-serif: 'Cormorant Garamond', serif;
            
            --container-width: 1200px;
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            background-color: var(--bg-main);
            color: var(--text-main);
            font-family: var(--font-sans);
            line-height: 1.6;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
        }

        ::selection {
            background-color: var(--accent);
            color: var(--bg-main);
        }

        /* === Скроллбар === */
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: var(--bg-main); }
        ::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #555; }

        a { color: inherit; text-decoration: none; transition: var(--transition); }
        ul { list-style: none; }
        img { max-width: 100%; display: block; }
        button { cursor: pointer; border: none; background: none; font-family: inherit; }

        .container {
            max-width: var(--container-width);
            margin: 0 auto;
            padding: 0 24px;
        }

        /* === Типографика === */
        h1, h2, h3, .font-serif { font-family: var(--font-serif); font-weight: 400; }
        .uppercase-track { text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.85rem; }
        .text-center { text-align: center; }

        /* === Анимация появления === */
        .fade-in {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.8s ease-out, transform 0.8s ease-out;
        }
        .fade-in.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* === Навигация === */
        .navbar {
            position: fixed;
            top: 0; left: 0; width: 100%;
            z-index: 40;
            transition: var(--transition);
        }
        .navbar.scrolled { background: rgba(10, 10, 10, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); }
        .nav-container {
            display: flex; justify-content: space-between; align-items: center;
            padding: 20px 24px; max-width: 1400px; margin: 0 auto;
        }
        .logo { font-family: var(--font-serif); font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 600; }
        .nav-links { display: flex; gap: 30px; }
        .nav-links a { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); }
        .nav-links a:hover { color: var(--accent); }
        .mobile-btn { display: none; color: white; font-size: 1.5rem; }
        
        /* Выезжающее мобильное меню */
        .mobile-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(3px);
            z-index: 99; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
        }
        .mobile-overlay.active { opacity: 1; pointer-events: all; }
        .mobile-menu {
            display: flex; flex-direction: column; background: var(--bg-sec);
            position: fixed; top: 0; left: -320px; width: 300px; height: 100vh;
            z-index: 100; transition: left 0.3s ease; box-shadow: 5px 0 25px rgba(0,0,0,0.8);
        }
        .mobile-menu.active { left: 0; }
        .mobile-menu-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 20px 24px; border-bottom: 1px solid var(--border-color);
        }
        .mobile-links {
            display: flex; flex-direction: column; padding: 30px 24px; gap: 25px; flex-grow: 1;
            overflow-y: auto;
        }
        .mobile-links a { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-main); font-weight: 500; }
        .mobile-links a:hover { color: var(--accent); }
        .mobile-menu-footer {
            padding: 24px; border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 20px;
        }
        .mobile-socials { display: flex; gap: 20px; font-size: 1.5rem; color: var(--text-muted); justify-content: center; }
        .mobile-socials a:hover { color: var(--accent); }
        .mobile-login-btn { text-align: center; width: 100%; padding: 12px; }

        /* === Hero Секция === */
        .hero {
            position: relative; height: 100vh;
            display: flex; align-items: center; justify-content: center; text-align: center;
            overflow: hidden;
        }
        .hero-slider {
            position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; background: var(--bg-main);
        }
        .hero-bg {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            object-fit: cover; opacity: 0; transition: opacity 1.5s ease-in-out;
        }
        .hero-bg.active { opacity: 0.5; }
        .hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,10,10,0.3), rgba(10,10,10,0.85)); z-index: 1; }
        .hero-content { position: relative; z-index: 10; padding: 0 20px; max-width: 800px; margin-top: 50px; }
        .hero-subtitle { color: var(--text-muted); margin-bottom: 20px; display: block; }
        .hero-title { font-size: clamp(3rem, 8vw, 6rem); line-height: 1.1; margin-bottom: 20px; }
        .hero-desc { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 40px; font-weight: 300; }
        .hero-pagination {
            position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
            display: flex; gap: 12px; z-index: 20;
        }
        .hero-dot {
            width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.2);
            cursor: pointer; transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.5);
        }
        .hero-dot.active { background: #fff; border-color: #fff; transform: scale(1.2); }
        .hero-dot:hover { background: rgba(255, 255, 255, 0.5); }
        .btn-outline {
            display: inline-block; border: 1px solid rgba(255,255,255,0.3); padding: 12px 32px;
            text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.85rem;
        }
        .btn-outline:hover { background: var(--accent); color: var(--bg-main); }
        .btn-solid { background: var(--accent); color: var(--bg-main); padding: 12px 32px; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.85rem; font-weight: 500; }
        .btn-solid:hover { background: #ccc; }

        /* === Портфолио (Masonry) === */
        .section { padding: 100px 0; }
        .section-header { text-align: center; margin-bottom: 60px; }
        .section-title { font-size: 3rem; margin-bottom: 15px; }
        .section-divider { width: 60px; height: 1px; background: #444; margin: 0 auto; }
        
        .gallery-grid {
            column-count: 4; column-gap: 16px; max-width: 1400px; margin: 0 auto; padding: 0 20px;
        }
        .gallery-item {
            break-inside: avoid; margin-bottom: 16px; position: relative; cursor: pointer; overflow: hidden; border-radius: 4px;
        }
        .gallery-item img { width: 100%; transition: transform 0.7s ease; }
        .gallery-item:hover img { transform: scale(1.05); }
        .gallery-overlay {
            position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0;
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            transition: opacity 0.3s ease; pointer-events: none;
        }
        .gallery-item:hover .gallery-overlay { opacity: 1; }
        .gallery-overlay i { font-size: 1.5rem; margin-bottom: 10px; }

        /* === Услуги (Горизонтальный Слайдер) === */
        .services-wrapper {
            background: var(--bg-sec); border-top: 1px solid var(--border-color);
        }
        .slider-container {
            display: flex; overflow-x: auto; gap: 24px; padding: 20px 24px 40px;
            scroll-snap-type: x mandatory; max-width: 1400px; margin: 0 auto;
        }
        .service-card {
            flex: 0 0 320px; scroll-snap-align: start; background: var(--bg-card); padding: 40px 30px;
            text-align: center; border: 1px solid transparent; transition: transform 0.3s ease; position: relative;
        }
        .service-card:hover { transform: translateY(-10px); }
        .service-card.popular { border-color: #444; }
        .popular-badge {
            position: absolute; top: -12px; right: 20px; background: var(--accent); color: var(--bg-main);
            font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 6px 16px; border-radius: 20px;
            box-shadow: 0 4px 12px rgba(255,255,255,0.1);
        }
        .service-title { font-size: 1.5rem; margin-bottom: 10px; }
        .service-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
        .service-price { font-size: 2rem; font-weight: 300; margin-bottom: 20px; color: var(--accent); }
        .service-list { text-align: left; margin-bottom: 30px; color: var(--text-muted); font-size: 0.9rem; display: flex; flex-direction: column; gap: 10px; }
        .service-list li::before { content: '—'; margin-right: 10px; color: #555; }
        
        /* Стилизация ползунка (пагинации) слайдера */
        .slider-container::-webkit-scrollbar { height: 6px; }
        .slider-container::-webkit-scrollbar-track { background: var(--bg-main); border-radius: 10px; margin: 0 20px; }
        .slider-container::-webkit-scrollbar-thumb { background: #444; border-radius: 10px; }
        .slider-container::-webkit-scrollbar-thumb:hover { background: #666; }

        .all-services-btn-wrapper { text-align: center; margin-top: 30px; padding-bottom: 60px; }

        /* === Модальное окно (Корзина Услуг) === */
        .modal {
            position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(5px);
            z-index: 100; display: flex; justify-content: center; align-items: center;
            opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
        }
        .modal.active { opacity: 1; pointer-events: all; }
        .modal-content {
            background: var(--bg-sec); width: 100%; max-width: 800px; max-height: 90vh;
            border: 1px solid var(--border-color); display: flex; flex-direction: column;
            border-radius: 8px; overflow: hidden; transform: scale(0.95); transition: transform 0.3s ease;
        }
        .modal.active .modal-content { transform: scale(1); }
        .modal-header { padding: 20px 30px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
        .modal-close { font-size: 1.5rem; color: var(--text-muted); transition: color 0.2s; }
        .modal-close:hover { color: var(--accent); }
        .modal-body { padding: 30px; overflow-y: auto; }
        
        /* Таблица услуг */
        .service-row {
            display: grid; grid-template-columns: 2fr 1fr 120px 1fr; align-items: center;
            padding: 15px 0; border-bottom: 1px solid var(--border-color); gap: 15px;
        }
        .service-row:last-child { border-bottom: none; }
        .s-name { font-weight: 500; }
        .s-price { color: var(--text-muted); }
        .qty-controls { display: flex; align-items: center; gap: 15px; background: var(--bg-main); border-radius: 20px; padding: 5px 15px; justify-content: space-between; }
        .qty-btn { color: var(--accent); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
        .qty-btn:hover { color: #888; }
        .qty-val { font-weight: 600; min-width: 20px; text-align: center; }
        .s-sum { text-align: right; font-weight: 600; color: var(--accent); }

        .modal-footer {
            padding: 20px 30px; background: var(--bg-main); border-top: 1px solid var(--border-color);
        }
        .summary-list { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; max-height: 80px; overflow-y: auto; }
        .summary-list li { margin-bottom: 5px; }
        .summary-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 1.2rem; }
        .summary-total span:last-child { font-size: 1.5rem; font-weight: 600; font-family: var(--font-serif); }

        /* === Обо мне === */
        .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
        .about-img { position: relative; }
        .about-img img { border-radius: 4px; filter: grayscale(100%); transition: filter 0.5s ease; }
        .about-img:hover img { filter: grayscale(0%); }
        .about-decor { position: absolute; bottom: -20px; right: -20px; width: 120px; height: 120px; border: 1px solid #444; z-index: -1; }
        .about-text h2 { margin-bottom: 20px; }
        .about-text h3 { color: var(--text-muted); font-size: 1.2rem; font-style: italic; margin-bottom: 20px; }
        .about-text p { color: var(--text-muted); margin-bottom: 20px; font-weight: 300; }
        .signature { width: 150px; filter: invert(1); opacity: 0.5; margin-top: 20px; }

        /* === Контакты === */
        .contact-form { max-width: 800px; margin: 0 auto; text-align: left; }
        .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }
        .form-group { margin-bottom: 30px; }
        .form-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 10px; }
        .form-input { 
            width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--border-color);
            padding: 10px 0; color: var(--text-main); font-family: inherit; transition: border-color 0.3s;
        }
        .form-input:focus { outline: none; border-color: var(--accent); }
        textarea.form-input { resize: vertical; min-height: 100px; }

        /* === Футер === */
        footer { background-color: #1a1a1a; color: #aaa; padding: 40px 5% 20px; text-align: center; }
        .footer-links { display: flex; justify-content: center; gap: 25px; margin-bottom: 25px; flex-wrap: wrap; font-weight: 500; }
        .footer-links a:hover { color: #fff; }
        .social-buttons { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; flex-wrap: wrap; }
        .social-btn { 
            width: 45px; height: 45px; border-radius: 50%; background-color: #333; 
            display: flex; align-items: center; justify-content: center; 
            transition: all 0.3s ease; color: #fff; font-size: 1.2rem; 
        }
        .social-btn.vk:hover { background-color: #0077FF; }
        .social-btn.tg:hover { background-color: #229ED9; }
        .social-btn.yt:hover { background-color: #FF0000; }
        .social-btn.pin:hover { background-color: #E60023; }
        .social-btn.x:hover { background-color: #000000; box-shadow: 0 0 5px rgba(255,255,255,0.5); }
        .social-btn.insta:hover { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
        .copyright { font-size: 0.9rem; color: #888; margin-bottom: 15px; }
        .legal-links { font-size: 0.75rem; color: #666; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; border-top: 1px solid #333; padding-top: 15px; }
        .legal-links a:hover { text-decoration: underline; color: #999; }

        /* === Мобильная Адаптация === */
        @media (max-width: 1024px) {
            .gallery-grid { column-count: 3; }
        }
        @media (max-width: 860px) {
            .nav-links { display: none; }
            .mobile-btn { display: block; }
            
            /* Отключаем жесткие 100vh и задаем контролируемые отступы */
            .hero { height: auto; min-height: 80vh; padding: 100px 0 60px; }
            .hero-content { margin-top: 0; }
            
            .hero-title { font-size: 3.5rem; }
            .hero-pagination { bottom: 25px; }
            .gallery-grid { column-count: 2; }
            .about-grid { grid-template-columns: 1fr; }
            .form-grid { grid-template-columns: 1fr; }
            .service-row { grid-template-columns: 1fr; gap: 10px; text-align: center; border-bottom: 1px solid #333; padding: 20px 0; }
            .service-row > div { justify-content: center; }
            .qty-controls { max-width: 150px; margin: 0 auto; }
            .s-sum { text-align: center; }
            .modal-content { height: 100vh; max-height: 100vh; border-radius: 0; }
            /* Уменьшаем глобальные отступы секций на мобилках */
            .section { padding: 50px 0; }
            .section-header { margin-bottom: 30px; }
        }
        @media (max-width: 480px) {
            /* Делаем блок hero еще компактнее на телефонах */
            .hero { min-height: auto; padding: 80px 0 40px; }
            .hero-content { margin-top: 0; }
            
            /* Убираем лишние пустые места между текстом в главном экране */
            .hero-subtitle { margin-bottom: 5px; }
            .hero-title { font-size: 2.2rem; margin-bottom: 10px; }
            .hero-desc { font-size: 0.95rem; margin-bottom: 15px; }
            .hero-pagination { bottom: 15px; }
            .gallery-grid { column-count: 1; }
            .service-card { flex: 0 0 280px; padding: 30px 20px; }
            .section { padding: 40px 0; }
            .section-header { margin-bottom: 25px; }
        }
