/* ==========================================
   ГЛАВНЫЙ ПУЛЬТ УПРАВЛЕНИЯ
   ========================================== */
:root {
    --font-main: 'Montserrat', sans-serif;

    /* РАЗМЕРЫ ТЕКСТА */
    --size-1-fs: clamp(30px, 5vw, 60px);
    --size-1-color: #ffffff;

    --size-2-fs: 15px;
    --size-2-color: #666666;
    --size-2-weight: 300;

    --size-3-fs: 21px;
    --size-3-color: #333333;
    --size-3-weight: 300;
    --size-3-spacing: 4px;

    /* ЦВЕТ АКТИВНОЙ ССЫЛКИ В МЕНЮ */
    --menu-active-color: #333333;
    /* Тот же цвет, что и у остальных, чтобы не отличалась */
    --menu-hover-color: #aaaaaa;

    /* ОТСТУПЫ В ШАПКЕ (чтобы размер был везде один) */
    --header-padding: 25px 60px;

    /* Остальные настройки */
    --bg-page: #ffffff;
    --bg-grey: #f8f8f8;
    --accent-red: #cc4646;
    --divider-color: #777777;
    --transition-speed: 1.5s;
    --hero-height: 85vh;
    --gap-after-slider: 8vh;
    --block-margin-v: 5vh;
    --footer-padding: 20px;
    --contacts-top-padding: 6vh;
}

/* ==========================================
   ОБЩИЕ СТИЛИ
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-page);
    color: var(--size-2-color);
    -webkit-font-smoothing: antialiased;
}

/* --- ШАПКА (ОДИНАКОВАЯ ДЛЯ ВСЕХ СТРАНИЦ) --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--header-padding);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #f0f0f0;
    height: 60px;
    /* Фиксируем высоту шапки для стабильности */
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 4px;
    color: #333;
    cursor: pointer;
    text-transform: none;
    line-height: 1.2;
}

.logo-text p {
    font-size: 10px;
    color: #999;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: -2px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 35px;
}

nav ul li a {
    text-decoration: none;
    color: var(--size-3-color);
    font-size: var(--size-2-fs);
    font-weight: var(--size-2-weight);
    letter-spacing: 2px;
    transition: 0.3s;
    text-transform: uppercase;
}

nav ul li a:hover {
    color: var(--menu-hover-color);
}

/* Класс для ссылки текущей страницы */
.active-link {
    color: var(--menu-active-color) !important;
    font-weight: 500 !important;
    /* Можно поставить 300, чтобы была как все */
}

/* --- ОСТАЛЬНЫЕ СТИЛИ (СЛАЙДЕРЫ, ГРИДЫ И Т.Д.) --- */
.hero {
    position: relative;
    height: var(--hero-height);
    margin-top: 60px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    margin-bottom: var(--gap-after-slider);
}

.slide-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity var(--transition-speed) ease-in-out;
    opacity: 0;
    z-index: 1;
}

.slide-layer.active {
    opacity: 1;
    z-index: 2;
}

.ken-burns {
    animation: kenBurnsEffect 20s infinite alternate linear;
}

@keyframes kenBurnsEffect {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    pointer-events: none;
    text-align: center;
}

.hero-content h2 {
    color: var(--size-1-color);
    font-size: var(--size-1-fs);
    font-weight: 300;
    letter-spacing: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-transform: none;
}

.hero-content span {
    font-weight: 700;
    text-transform: uppercase;
}

.thumbnails {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.thumb {
    width: 70px;
    height: 45px;
    background-size: cover;
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: 0.4s;
    opacity: 0.7;
}

.thumb.active,
.thumb:hover {
    opacity: 1;
    border-color: white;
    transform: translateY(-3px);
}

/* Секции */
section {
    padding: 5vh 10%;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: var(--block-margin-v);
}

.section-header h3 {
    font-size: var(--size-3-fs);
    color: var(--size-3-color);
    font-weight: var(--size-3-weight);
    letter-spacing: var(--size-3-spacing);
    text-transform: uppercase;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--block-margin-v) auto;
    width: 160px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--divider-color);
    opacity: 0.3;
}

.divider span {
    margin: 0 15px;
    color: var(--divider-color);
    font-size: 14px;
}

.section-desc {
    font-size: var(--size-2-fs);
    color: var(--size-2-color);
    font-weight: var(--size-2-weight);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    text-align: center;
}

/* Инфо-блоки */
.info-block {
    display: flex;
    align-items: center;
    gap: 5%;
    padding: var(--block-margin-v) 10%;
}

.info-block.reverse {
    flex-direction: row-reverse;
}

.info-image {
    flex: 1;
    max-width: 50%;
    overflow: hidden;
}

.info-image img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: 1s ease;
}

.info-text {
    flex: 1;
    text-align: center;
    padding: 0 2%;
}

.info-text h3 {
    font-size: var(--size-3-fs);
    color: var(--size-3-color);
    margin-bottom: 2vh;
    letter-spacing: 3px;
}

.info-text p {
    font-size: var(--size-2-fs);
    color: var(--size-2-color);
    font-weight: var(--size-2-weight);
    line-height: 1.8;
    text-align: justify;
}

/* Галерея */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 10% 10vh;
    margin-top: 40px;
}

.project-item {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s ease;
}

.project-item:hover img {
    transform: scale(1.05);
}

/* Просмотрщик */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.5s;
}

#lightbox.active {
    display: block;
    opacity: 1;
}

.lightbox-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s;
    opacity: 0;
}

.lightbox-layer.visible {
    opacity: 1;
}

#progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-red);
    width: 0%;
    z-index: 2100;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #333;
    cursor: pointer;
    z-index: 2200;
    font-weight: 200;
}

.nav-arrow {
    position: absolute;
    top: 0;
    height: 100%;
    width: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    z-index: 2150;
    transition: 0.3s;
    user-select: none;
}

.nav-arrow:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.02);
}

.arrow-prev {
    left: 0;
}

.arrow-next {
    right: 0;
}

/* Текстовый блок на Projects */
.intro-section {
    padding: 120px 10% 40px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.intro-section h2 {
    font-size: var(--size-3-fs);
    color: var(--size-3-color);
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

/* Контакты и Футер */
.contacts-section {
    padding: var(--contacts-top-padding) 10% 10vh 10%;
    text-align: center;
}

.studio-title {
    font-size: var(--size-3-fs);
    color: var(--size-3-color);
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: var(--block-margin-v);
}

.contacts-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
}

.eye-image {
    width: 20vw;
    min-width: 250px;
    filter: grayscale(10%);
}

.contacts-text {
    flex: 1;
}

.contacts-text p,
.info-row {
    font-size: var(--size-2-fs);
    color: var(--size-2-color);
    font-weight: var(--size-2-weight);
    line-height: 1.8;
    margin-bottom: 2vh;
}

.email-link {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: 400;
}

footer {
    background-color: #333;
    color: #fff;
    padding: var(--footer-padding) 0;
    text-align: center;
    font-size: 11px;
    letter-spacing: 4px;
}

@media (max-width: 900px) {
    header {
        padding: 15px 20px;
        height: 70px;
    }

    .hero {
        margin-top: 70px;
    }

    .intro-section {
        padding: 100px 10% 30px;
    }

    nav {
        display: none;
    }

    .info-block {
        flex-direction: column !important;
        gap: 3vh;
    }

    .info-image {
        max-width: 100%;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacts-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}