:root {
    --bg-color: #080808;
    --sidebar-bg: #0f0f0f;
    --text-primary: #ededed;
    --text-secondary: #737373;
    --border-color: #262626;
    --accent-color: #ffffff;
    --accent-hover: #cccccc;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 320px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1.5px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.sidebar-footer {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-footer p {
    margin-bottom: 5px;
}

/* Main Content */
.content {
    flex: 1;
    margin-left: 320px;
    padding: 0 100px;
    max-width: 2000px; /* Расширяем для больших 2K экранов */
}

section {
    padding: 120px 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.border-top {
    border-top: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
}

/* Hero Section */
.section-hero {
    min-height: 100vh; /* Возвращаем полноэкранный размер */
    position: relative;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.hero-bg-image {
    position: absolute;
    right: -150px; /* Вернул оригинальную позицию */
    bottom: 0; /* Остается на новой границе раздела */
    height: 120vh; /* Возврат базовой высоты */
    max-height: 1200px; /* Лимит 1200 */
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(-5px 0px 30px rgba(0,0,0,0.8));
}

@media (max-width: 1400px) {
    .hero-bg-image {
        opacity: 0.15; /* Прячем картинку на фон, если экран узкий и текст начинает налезать */
    }
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.hero-text h1 {
    font-size: 56px;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 30px;
    max-width: 800px;
    letter-spacing: -1px;
}

.hero-text .description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 50px;
}

/* Buttons */
.actions {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 18px 36px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border-radius: 2px;
}

.btn-solid {
    background-color: var(--accent-color);
    color: #000;
}

.btn-solid:hover {
    background-color: var(--accent-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--text-primary);
    color: #000;
}

.hero-stats {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    font-size: 16px; /* Увеличил размер шрифта */
    color: #fff; /* Единый белый цвет для всех пунктов */
    letter-spacing: 0.5px;
    font-weight: 500;
}

.hero-stats .dot {
    color: rgba(255, 255, 255, 0.3); /* Приглушенные точки-разделители */
}

/* Slider */
.slider-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    border: 1px solid var(--border-color);
}

.grid-portfolio .slider-container {
    max-width: 100%;
}

.image-container {
    position: relative;
    width: 100%;
    cursor: col-resize;
    overflow: hidden;
    background-color: var(--bg-color);
}

.image-after {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    z-index: 1;
}

.image-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    z-index: 2;
    transition: clip-path 0.1s cubic-bezier(0.25, 1, 0.5, 1);
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 3;
    pointer-events: none;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    transition: left 0.1s cubic-bezier(0.25, 1, 0.5, 1);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    z-index: 4;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    transition: left 0.1s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.image-container:hover .slider-button {
    transform: translate(-50%, -50%) scale(1.15); /* Увеличивается при захвате */
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.7); /* Яркое свечение (Glow) */
}

.slider-button::before {
    content: '';
    width: 8px;
    height: 8px;
    border-left: 2px solid #000;
    border-bottom: 2px solid #000;
    transform: rotate(45deg);
}

.slider-button::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid #000;
    border-top: 2px solid #000;
    transform: rotate(45deg);
}

/* Coverflow Carousel */
.coverflow-carousel {
    position: relative;
    width: 100%;
    height: 750px; /* Пропорционально сжали высоту вслед за карточкой */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 50px;
    transform: translateX(80px); /* Легкий сдвиг вправо */
}

.coverflow-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coverflow-slide {
    position: absolute;
    width: 30vw; /* Еще минус 2 пункта ширины по просьбе (было 32vw) */
    max-width: 650px; /* Еще строже лимит максимальной ширины */
    min-width: 350px;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s, z-index 0.6s;
    opacity: 0;
    pointer-events: none;
    will-change: transform;
}

/* На закрытых вкладках убираем полосу (показываем чистую ретушь) */
.coverflow-slide:not(.active) .image-before {
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%) !important;
}

.coverflow-slide.active {
    opacity: 1;
    z-index: 5;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.coverflow-slide .slider-container {
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    transition: box-shadow 0.6s;
}

.coverflow-slide:not(.active) .slider-container {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.coverflow-slide:not(.active) .slider-handle,
.coverflow-slide:not(.active) .slider-button {
    opacity: 0 !important;
    pointer-events: none;
}

.slide-caption {
    display: none;
}

/* Nav Buttons */
.coverflow-nav {
    position: absolute;
    top: calc(50% - 30px);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.coverflow-nav svg {
    width: 24px;
    height: 24px;
}

.coverflow-nav:hover {
    background: var(--text-primary);
    color: #000;
}

.left-nav {
    left: 40px;
}

.right-nav {
    right: 40px;
}

/* Pricing Menu */
.pricing-menu {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.text-center {
    text-align: center;
}

.text-center p {
    margin: 0 auto;
}

.menu-category {
    margin-bottom: 60px;
}

.menu-category h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.menu-item {
    display: flex;
    align-items: baseline;
    margin-bottom: 30px;
    transition: opacity 0.3s;
}

.pricing-menu:hover .menu-item:not(:hover) {
    opacity: 0.4;
}

.menu-item.highlight {
    opacity: 1;
}

.menu-item-info {
    flex-shrink: 0;
    max-width: 500px;
}

.menu-item-info h4 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-primary);
    transition: color 0.3s;
}

.menu-item:hover .menu-item-info h4 {
    color: #fff;
}

.menu-item-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.menu-item-dots {
    flex-grow: 1;
    border-bottom: 1px dotted #404040;
    margin: 0 20px;
    position: relative;
    top: -6px;
    opacity: 0.5;
}

.menu-item-price {
    font-size: 24px;
    font-weight: 500;
    flex-shrink: 0;
    color: var(--text-primary);
}

.menu-item-price span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.express-banner {
    display: flex;
    align-items: center;
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    padding: 25px 35px;
    gap: 20px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #ededed;
    border-radius: 50%;
    box-shadow: 0 0 10px #ededed;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.express-banner-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.express-banner-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 120px;
}

.contact-card {
    border: 1px solid var(--border-color);
    padding: 40px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
}

.contact-card:hover {
    border-color: var(--text-secondary);
    background-color: #141414;
}

.contact-card h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.contact-card p {
    font-size: 16px;
    font-weight: 500;
}

/* RESPONSIVE DESIGN */

/* 1. Сжатие для стандартных широких мониторов (Full HD / 1920px) */
@media (max-width: 1920px) {
    .content {
        padding: 0 60px;
    }
    .hero-bg-image {
        right: 0; 
        bottom: 0;
        width: 47vw; /* Чуть-чуть уменьшили, чтобы дать воздух между текстом и плечом */
        max-width: 850px;
        height: auto; 
        max-height: 92vh; 
        object-fit: contain;
        object-position: bottom right; 
    }
    .coverflow-carousel {
        transform: translateX(0); /* Снимаем жесткий сдвиг вправо, возвращаем по центру */
        height: 750px;
    }
    .coverflow-slide {
        width: 26vw; /* Сужаем карточки в веере на FHD, чтобы влезли все пять */
        max-width: 520px;
    }
}

/* 2. Малые Ноутбуки (1280x720 / 1366x768) - до 1400px */
@media (max-width: 1400px) {
    .sidebar {
        width: 200px; /* Выжали еще 40px ради контента */
        padding: 40px 20px; /* Расширили пространство для слов */
    }
    .logo {
        font-size: 15px; /* Еще сильнее уменьшили Логотип */
        letter-spacing: 2px; /* Ужали межбуквенный интервал, чтобы не вылезал за края */
    }
    .nav-links a {
        font-size: 11px; /* Ужали текст меню */
        letter-spacing: 1px; /* Сжали межбуквенный интервал, чтобы слова стали короче */
    }
    .sidebar-footer {
        font-size: 8px; /* Максимально сжатый копирайт */
    }
    .content {
        margin-left: 200px; /* Контент придвинулся еще левее к панели */
        padding: 0 40px;
    }
    .section-hero {
        padding: 50px 0; /* Исходные отступы для 720p */
        min-height: auto;
        height: 100vh; /* Возвращаем высоту в весь экран */
    }
    .hero-text {
        max-width: 550px; /* Ограничиваем ширину текста сильнее */
    }
    .badge {
        font-size: 8px;
        padding: 3px 8px;
        margin-bottom: 10px;
    }
    .hero-text h1 {
        font-size: 28px; /* Еще сильнее уменьшаем заголовок */
        margin-bottom: 12px;
    }
    .hero-text .description {
        font-size: 13px; /* Уменьшаем описание */
        margin-bottom: 20px;
    }
    .actions {
        gap: 12px;
    }
    .btn {
        padding: 10px 20px; /* Компактные кнопки */
        font-size: 10px;
    }
    .hero-bg-image {
        right: -30px; 
        bottom: 0; /* Остается стоять на линии */
        width: 66vw; /* Восстановил ограничение ширины в 66vw (как вы утвердили) */
        height: auto; /* Высота подстраивается под ширину, чтобы не раздувался */
        max-height: 95vh;
        opacity: 1; /* Вернули 100% плотность Льва (как в оригинале) */
        object-fit: contain;
        object-position: bottom right;
    }
    .hero-stats {
        flex-wrap: wrap; 
        gap: 8px;
        margin-top: 10px;
        font-size: 11px; /* Сжимаем статистику */
    }
    .coverflow-carousel {
        height: 450px; 
        margin-top: 20px;
        transform: none; /* Убираем смещение на всех ноутбуках */
    }
    .coverflow-slide {
        width: 28vw; /* Сжимаем карточки, чтобы весь веер влез в узкий экран без обрезки краев */
        min-width: 250px;
        max-width: 420px;
    }
}

/* 3. Планшеты - до 1024px */
@media (max-width: 1024px) {
    .layout-wrapper {
        flex-direction: column; /* Боковая панель уезжает наверх */
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 15px 30px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        z-index: 100;
    }
    .logo {
        margin-bottom: 0;
    }
    .nav-links {
        display: flex;
        flex-direction: row;
        gap: 20px;
        margin-bottom: 0;
    }
    .nav-links a {
        font-size: 11px;
        padding: 0;
    }
    .sidebar-footer {
        display: none;
    }
    .content {
        margin-left: 0;
        padding: 0 40px;
        padding-top: 40px;
    }
    .pricing-split {
        grid-template-columns: 1fr; /* Складываем сплит-экран в одну колонку */
        gap: 40px;
    }
    .pricing-header-sticky {
        position: relative; /* Убираем залипание, так как оно мешает скроллу на планшетах */
        top: 0;
    }
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
    .coverflow-carousel {
        transform: none; /* Гарантируем строгий центр на планшетах */
    }
}

/* 4. Телефоны - до 768px */
@media (max-width: 768px) {
    section {
        padding: 40px 0; /* Еще сильнее подтягиваем блоки (по вашей просьбе) */
        min-height: auto;
    }
    .section-header {
        margin-bottom: 5px; /* Сбрил почти все отступы, контент теперь идет ВПРИТИРКУ под заголовком */
    }
    .section-header h2 {
        font-size: 26px; /* Строго приравниваем к H1 на Главной */
        line-height: 1.3; /* Идентичное межстрочное */
        font-weight: bold; /* Делаем заголовок таким же плотным, как главный H1 */
        letter-spacing: normal;
    }
    #portfolio {
        scroll-margin-top: 18vh; /* Останавливает скролл так, чтобы карусель встала математически ровно по центру экрана */
    }
    .sidebar {
        justify-content: center; /* Центрируем лого в мобильной шапке */
    }
    .nav-links {
        display: none; /* Скрываем боковое меню на телефонах */
    }
    .content {
        padding: 0 20px;
        padding-top: 10px; /* Прижимаем контент ближе к верхнему меню */
    }
    .section-hero {
        justify-content: flex-start; 
        padding-top: 20px; 
        height: auto; 
        min-height: auto; /* Я забыл отключить это правило для мобилок! Оно и создавало огромную черную дыру */
        padding-bottom: 0px; 
    }
    .hero-text h1 {
        font-size: 26px; /* Делаем H1 меньше, чем на ноутбуке! */
        line-height: 1.3;
    }
    .hero-text .description {
        font-size: 14px;
        margin-bottom: 20px;
    }
    .actions {
        flex-direction: column;
        gap: 15px;
    }
    .btn {
        text-align: center;
        width: 100%;
    }
    .hero-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .hero-stats .dot {
        display: none;
    }

    .hero-bg-image {
        position: relative; /* Отменяем фоновое поведение на телефоне */
        right: 0;
        bottom: 0;
        width: 80%; /* Занимает почти всю ширину мобилки */
        max-width: 350px;
        height: auto;
        margin: 30px auto 0 auto; /* Центрируем и делаем отступ в 30px от текста сверху */
        display: block;
    }

    /* Адаптация 3D-карусели под мобильные */
    .coverflow-carousel {
        height: 400px; /* Сделал чуть ниже для компактности */
        margin-top: 0px; /* Убил отступ! Карусель теперь вклеена в заголовок! */
        transform: none; /* Убиваем десктопное смещение вправо, возвращаем карусель строго в центр мобилки */
    }
    .coverflow-slide {
        width: 75vw; /* На мобилке центральная карточка на весь экран */
    }
    .left-nav, .right-nav {
        width: 45px;
        height: 45px;
    }
    .left-nav {
        left: 5px;
    }
    .right-nav {
        right: 5px;
    }

    /* Адаптация прайс-меню */
    .menu-category {
        margin-bottom: 30px; /* Ужимаем расстояние между категориями в 2 раза */
    }
    .menu-category h3 {
        margin-bottom: 15px; /* Прижимаем список цен прямо под заголовок "Основная работа" */
        padding-bottom: 10px;
    }
    .menu-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px; /* Делаем список цен плотнее, убирая гигантские дыры */
    }
    .menu-item-dots {
        display: none; /* Убираем точки на мобилке */
    }
    .menu-item-price {
        margin-top: 8px;
        font-size: 22px;
        color: #fff;
    }
    .express-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}
