/* Подключаем шрифт Albert Sans из Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@400;600;700&display=swap');

:root {
    /* Базовые цвета */
    --color-text: #141414;
    --bg-main: #FFFFFF;
    --bg-sidebar: #EEF0F2;

    /* Градиенты кнопок */
    --btn-primary: linear-gradient(98.37deg, #2E96DB -25.06%, #0D21A1 128.28%);
    --btn-secondary: linear-gradient(98.37deg, #EEC643 -25.06%, #DA5112 128.28%);

    /* Маски и затемнения */
    --overlay-color: rgba(1, 22, 56, 0.5);
    --overlay-gradient: linear-gradient(180deg, rgba(1, 22, 56, 0.5) 0%, #011638 100%);

    /* Типографика */
    --font-main: 'Albert Sans', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--bg-main);
    display: flex;
    min-height: 100vh;
}

/* --- ОСНОВНОЙ КАРКАС --- */
.sidebar {
    width: 220px;
    /* Фиксир
ованная ширина меню */
    background-color: var(--bg-sidebar);
    padding: 40px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- ОСНОВНОЙ КОНТЕЙНЕР --- */
.main-content {
    margin-left: 220px;
    width: calc(100% - 220px);
    min-height: 100vh;
    /* Добавляем ограничитель ширины */
    /* 1640px + 280px (сайдбар) = 1920px (максимальная ширина стандартного Full HD/4K макета) */
    max-width: 1640px;

    /* Дополнительно: если экран шире 1920px, можно центрировать этот блок,
       но так как сайдбар прибит слева, обычно оставляют как есть (белое пространство будет справа) */
}

/* --- ВНУТРЕННОСТИ САЙДБАРА --- */
.logo {
    margin-bottom: 50px;
}

.logo img {
    max-width: 120px;
    height: auto;
    display: block;
}

.main-nav {
    margin-bottom: 40px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text);
    font-size: 16px;
    font-weight: 400;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
    color: #2E96DB;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 60px;
    transition: opacity 0.3s ease;
}

.lang-switcher:hover {
    opacity: 0.7;
}

.contact-info {
    margin-top: 0;
}

.contact-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #DFE2E6;
    border-radius: 50%;
    font-size: 12px;
}

.contact-link {
    text-decoration: none;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #2E96DB;
}

.bg-cover-section {
    width: 100%;
    height: 100vh;
    min-height: 300px;
    max-height: 640px;
    box-sizing: border-box;
    display: flex;

    background-color: var(--bg-main);
    background-size: cover;
    background-repeat: no-repeat !important;
}

/* =========================================
   СЕКЦИЯ 1: HERO BLOCK
   ========================================= */
.hero-block {
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(60px, 10vh, 120px) 0 0 clamp(40px, 8vw, 100px);

    background-image: url('../images/index-hero.jpg');
    background-position: left top;
}

/* --- ЗАГОЛОВОК --- */
.hero-title {
    /* Базовый размер 100px, минимальный 60px (ровно 60%) */
    font-size: clamp(60px, 6.5vw, 100px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-text);

    /* Отступ до кнопки: макс 40px, мин 24px (тоже 60%) */
    margin: 0 0 clamp(24px, 3vw, 40px) 0;
    text-transform: none;
}

/* --- СТИЛЬ КНОПКИ С ГРАДИЕНТОМ И ПЕРЕХОДОМ --- */
.btn-main {
    display: inline-block;
    padding: clamp(8px, 1.5vw, 10px) clamp(40px, 2vw, 70px);
    font-size: clamp(12px, 1.2vw, 18px);

    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    position: relative;
    z-index: 1;
    background: linear-gradient(98.37deg, #2E96DB -25.06%, #0D21A1 128.28%);
    transition: transform 0.1s ease, box-shadow 0.3s ease;
}

.btn-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(98.37deg, #EEC643 -25.06%, #DA5112 128.28%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-main:hover::before {
    opacity: 1;
}

.btn-main:hover {
    box-shadow: 0 10px 20px rgba(238, 198, 67, 0.3);
}

.btn-main:active {
    transform: translateY(2px);
    box-shadow: 0 5px 10px rgba(238, 198, 67, 0.4);
}

/* =========================================
   СЕКЦИЯ 2: UNSER UNTERNEHMEN
   ========================================= */
.about-block {
    flex-direction: column;
    align-items: flex-end;
    /* Прижимаем контейнер с текстом к правому краю */

    /* 1. ПРИЖИМАЕМ ТЕКСТ К ВЕРХУ */
    justify-content: flex-start;

    /* 2. Отступ сверху точно такой же, как у Hero (clamp 60-120px), чтобы заголовки были на одной линии */
    padding: clamp(20px, 10vh, 40px) clamp(40px, 8vw, 100px) 0 0;

    background-image: url('../images/house-sketch.png');

    /* 3. ПРИЖИМАЕМ КАРТИНКУ К ВЕРХУ И САЙДБАРУ */
    background-position: left top;

    /* 4. ВЫСОТА 100%: Картинка будет строго равна высоте блока (как в Hero), ширина подстроится */
    background-size: auto 85%;

    /* 5. Умножение цветов (убирает серые рамки вокруг картинки, оставляя только чертеж) */
    background-blend-mode: multiply;
}

.about-text-content {
    max-width: 480px;
    width: 45%;
    text-align: right;
}

.section-title {
    /* 1. Уменьшили размер шрифта заголовка */
    font-size: clamp(49px, 3vw, 55px);
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 24px 0;

    /* 2. Жесткий запрет переноса на новую строку */
    white-space: nowrap;
}

.about-description {
    /* Слегка уменьшили основной текст, чтобы он смотрелся пропорционально заголовку */
    font-size: clamp(19px, 1.1vw, 22px);
    line-height: 1.6;
    color: #4A4A4A;
}

.about-description p {
    margin: 0 0 20px 0;
}

.about-description p:last-child {
    margin-bottom: 0;
}

/* =========================================
   СЕКЦИЯ 3: DIENSTLEISTUNGEN (СЛАЙДЕР)
   ========================================= */
.services-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: #1A1A1A;
    /* Темный фон на случай загрузки картинок */
}

.services-slider-container {
    position: relative;
    width: 100%;
    height: 70vh;
    /* Высота слайдера */
    min-height: 550px;
}

.services-main-title {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);

    /* 1. Уменьшили шрифт примерно на 10% */
    font-size: clamp(32px, 3.6vw, 48px);

    font-weight: 700;
    color: #FFFFFF;
    z-index: 10;
    margin: 0;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

/* --- ТРЕК СЛАЙДЕРА (Scroll Snap) --- */
.services-track {
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: auto;
    /* Включаем горизонтальный скролл */
    scroll-snap-type: x mandatory;
    /* Физика прилипания слайдов */
    scrollbar-width: none;
    /* Прячем скроллбар в Firefox */
}

.services-track::-webkit-scrollbar {
    display: none;
    /* Прячем скроллбар в Chrome/Safari */
}

/* --- СЛАЙД --- */
.service-slide {
    flex: 0 0 33.3333%;
    /* Строго 3 слайда на экране (33.3%) */
    height: 100%;
    scroll-snap-align: center;
    /* Центрируем при остановке скролла */
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    /* Текст прижат к низу */
    justify-content: center;
    padding: 0 30px 100px 30px;
    /* 100px снизу — место под точки */
    box-sizing: border-box;
    transition: all 0.4s ease;
}

/* СИНЯЯ 50% МАСКА (для неактивных слайдов) */
.service-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Цвет взят из вашего --btn-primary (#0D21A1) с прозрачностью 65% */
    background-color: rgba(13, 33, 161, 0.65);
    z-index: 1;
    transition: opacity 0.4s ease;
}

/* Убираем синюю маску у АКТИВНОГО слайда */
.service-slide.active::before {
    opacity: 0;
}

/* Градиент затемнения снизу, чтобы белый текст читался даже без маски */
.service-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%);
    z-index: 2;
}

/* --- РЕАКЦИЯ НА МЫШЬ (Только для устройств с мышью) --- */
@media (hover: hover) {

    /* При наведении убираем синюю маску 
    .service-slide:hover::before {
        opacity: 0.5;
    }
*/
    /* При наведении делаем текст ярче и приподнимаем */
    .service-slide:hover .service-content {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* --- ТЕКСТ ВНУТРИ СЛАЙДА --- */
.service-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #FFFFFF;
    max-width: 380px;
    opacity: 0.7;
    /* Неактивный текст немного приглушен */
    transition: all 0.4s ease;
}

.service-slide.active .service-content {
    opacity: 1;
    /* Активный текст яркий */
    transform: translateY(-10px);
    /* Слегка приподнимается */
}

.service-title {
    font-size: clamp(20px, 1.8vw, 26px);
    font-weight: 700;
    margin: 0 0 15px 0;
}

.service-desc {
    font-size: clamp(12px, 1.1vw, 15px);
    line-height: 1.6;
    margin: 0;
}

/* --- ТОЧКИ ПРОГРЕССА --- */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background-color: #FFFFFF;
    transform: scale(1.3);
}

/* --- КНОПКА ВО ВСЮ ШИРИНУ --- */
.btn-full-width {
    position: relative;
    display: block;
    width: 100%;

    /* 2. Сделали кнопку заметно уже (было 24px, стало 16px) */
    padding: 16px 0;

    text-align: center;
    color: #FFFFFF;
    font-size: clamp(18px, 1.5vw, 22px);
    font-weight: 700;
    text-decoration: none;
    z-index: 1;
    background: var(--btn-primary);
}

/* Переход в желтый градиент при наведении (как у кнопки из первого блока) */
.btn-full-width::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--btn-secondary);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-full-width:hover::before {
    opacity: 1;
}

/* --- РЕАКЦИЯ НА ПЕРЕТАСКИВАНИЕ МЫШЬЮ (Drag-to-Scroll) --- */
.services-track {
    cursor: grab;
    /* Курсор в виде открытой руки */
}

/* Класс .grabbing будет добавляться через JS при зажатии мыши */
.services-track.grabbing {
    cursor: grabbing !important;
    /* Курсор "сжатый кулак" */
}

.services-track.grabbing .service-slide {
    pointer-events: none;
    /* Блокируем случайные клики при перетаскивании */
    user-select: none;
    /* Запрещаем случайное выделение текста */
}