/* --- style.css: ФИНАЛ (ИДЕНТИЧНЫЕ ШРИФТЫ) --- */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500&family=Manrope:wght@300;400;500&family=Jost:wght@300;400;500&display=swap');

/* 1. БАЗА (HELVETICA) */
body {
    margin: 0;
    padding: 0;
    background-color: #f6f3ec; 
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 
    color: #b9a691; 
    font-size: 18px; 
    overflow-x: hidden; 
}

/* 2. СПЕЦИАЛЬНЫЙ КЛАСС ДЛЯ РУССКИХ ЗАГОЛОВКОВ (JOST) */
.ru-font {
    font-family: 'Jost', sans-serif !important;
    letter-spacing: 0.5px;
    text-transform: none !important;
    font-weight: 400;
}

/* 3. ШАПКА */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 60px;
    position: relative;
    z-index: 50; 
}

.logo-img { height: 50px; width: auto; display: block; transition: 0.3s; position: relative; z-index: 51; }
.logo-img:hover { opacity: 0.7; }

/* Прячем мобильный заголовок на ПК */
.mobile-page-title {
    display: none;
}

/* МЕНЮ */
nav { display: flex; align-items: center; gap: 25px; }

nav a { 
    text-decoration: none; 
    color: #b9a691; 
    font-size: 17px; 
    font-family: 'Outfit', sans-serif; 
    letter-spacing: 0.5px;
    transition: color 0.3s ease; 
    font-weight: 400; 
}

nav a:hover, nav a.active { 
    color: #5f4f3c; 
    font-weight: 400; 
}

.icon-link { display: flex; align-items: center; justify-content: center; color: #b9a691; transition: 0.3s ease; }
.icon-link:hover { color: #5f4f3c; transform: scale(1.1); }
.divider { color: #D3D0C9; font-size: 14px; }

/* ДРОПДАУН (ДЕСКТОП) */
.lang-dropdown {
    position: relative; display: inline-block; cursor: pointer;
    font-family: 'Outfit', sans-serif; font-size: 17px; font-weight: 400;
    color: #b9a691; transition: 0.3s ease; z-index: 200;
    padding-top: 20px; padding-bottom: 20px; top: 0; 
}
.lang-dropdown:hover { color: #5f4f3c; }
.lang-content { position: absolute; top: 100%; left: 0; min-width: 40px; margin-top: -15px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: 0.3s; }
.lang-content a { color: #b9a691 !important; text-decoration: none; display: block; font-size: 18px; transition: 0.3s ease; padding-top: 0; }
.lang-content a:hover { color: #5f4f3c !important; }
.lang-dropdown:hover .lang-content { opacity: 1; visibility: visible; transform: translateY(0); }

.hamburger-open { display: none; cursor: pointer; color: #b9a691; }
.hamburger-open svg { width: 32px; height: 32px; stroke-width: 1px; }
.menu-close-btn { display: none; position: absolute; top: 30px; right: 20px; cursor: pointer; color: #b9a691; }
.menu-close-btn svg { width: 32px; height: 32px; stroke-width: 1px; }

/* 4. КОНТЕЙНЕРЫ */
.container { max-width: 1600px; margin: 0 auto; padding: 40px 60px; }
.project-container { padding-top: 0 !important; }

/* ГАЛЕРЕИ */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.gallery-item { text-decoration: none; display: block; color: #5f4f3c; }
.gallery-item img { width: 100%; height: auto; display: block; object-fit: cover; aspect-ratio: 4/5; transition: 0.4s; }
.caption { 
    margin-top: 15px; font-size: 16px; color: #5f4f3c; 
    font-family: 'Outfit', sans-serif; 
}

.project-title {
    text-align: center;
    font-family: 'Outfit', sans-serif; 
    font-weight: 400; font-size: 32px; text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 60px; margin-top: 0; color: #5f4f3c; 
}

/* СТИЛИ ГАЛЕРЕЙ (ОБЩИЕ) */
.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.column { flex: 33.33%; max-width: 33.33%; padding: 0 10px; box-sizing: border-box; }
.column a { display: block; margin-bottom: 20px; }
.column img { margin-top: 0; width: 100%; display: block; transition: 0.4s; }

/* Masonry */
.masonry-gallery { column-count: 3; column-gap: 20px; }
.masonry-gallery a { display: block; margin-bottom: 20px; break-inside: avoid; }
.masonry-gallery img { width: 100%; display: block; border-radius: 2px; transition: 0.4s; }

/* ABOUT ME */
.about-container { max-width: 1050px; margin: 0 auto; display: flex; gap: 60px; justify-content: space-between; align-items: flex-start; padding-top: 0; }
.about-text { flex: 1.5; font-size: 18px; line-height: 1.6; color: #5f4f3c; }
.about-text h1 { font-family: 'Outfit', sans-serif; font-weight: 400; font-size: 32px; margin-top: 0; margin-bottom: 30px; color: #5f4f3c; }
.about-text p { margin-bottom: 20px; }
.about-text strong { font-weight: 600; }
.about-image { flex: 1; display: flex; justify-content: flex-start; }
.about-image img { width: 100%; max-width: 350px; height: auto; display: block; }

/* НАВИГАЦИЯ ВНИЗУ */
.project-nav { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 60px; padding-top: 40px; border-top: 1px solid #e0e0e0; }
.nav-item { display: flex; flex-direction: column; text-decoration: none; font-size: 16px; line-height: 1.4; color: #b9a691; transition: color 0.3s ease; font-family: 'Outfit', sans-serif; }
.nav-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; margin-bottom: 5px; }
.back-link { text-align: center; margin-top: 40px; margin-bottom: 40px; }
.back-link a { transition: color 0.3s ease; font-family: 'Outfit', sans-serif; }
footer { text-align: center; padding: 80px 20px; color: #b9a691; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-family: 'Outfit', sans-serif; }

/* УПРАВЛЕНИЕ ВИДИМОСТЬЮ ГАЛЕРЕЙ */
.mobile-only { display: none; } 
.desktop-only { display: block; } 

/* ГЛОБАЛЬНЫЙ ФИКС ЦВЕТОВ */
a { text-decoration: none !important; color: inherit; }
.caption, .project-title, .gallery-item, .about-text { color: #5f4f3c !important; }
nav a, .icon-link, .back-link a, .nav-item, footer, .hamburger-open, .menu-close-btn, .lang-dropdown { color: #b9a691 !important; }
nav a:hover, .icon-link:hover, nav a.active, .nav-item:hover, .lang-dropdown:hover, .lang-content a:hover, .back-link a:hover { 
    color: #5f4f3c !important; 
    font-weight: 400 !important; 
}

/* Прячем мобильный переключатель языков на компьютере (ЖЕЛЕЗОБЕТОННО) */
.mobile-menu-lang {
    display: none !important;
}

/* =========================================
   МОБИЛЬНАЯ ВЕРСИЯ (АДАПТИВНАЯ + ФИКС. КРЕСТИК)
   ========================================= */
@media (max-width: 768px) {
    
    /* 1. ГЛОБАЛЬНЫЕ НАСТРОЙКИ СЕТКИ */
    .row { margin: 0 -5px; }
    .column { flex: 50%; max-width: 50%; padding: 0 5px; }
    .column a, .masonry-gallery a { margin-bottom: 10px; }
    .masonry-gallery { column-count: 3; column-gap: 5px; }
    
    .mobile-only { display: block; }
    .desktop-only { display: none; }

    /* 2. ШАПКА */
    header { 
        padding: 20px 20px; 
        height: auto; 
        box-sizing: border-box;
        margin-bottom: 30px; 
        align-items: center; 
        position: relative;
        z-index: 50; 
    } 
    
    /* 3. ЯЗЫК */
    .lang-dropdown { 
        font-size: 20px; 
        padding: 0; margin: 0; 
        height: 32px; 
        display: flex; 
        align-items: center; 
        position: relative; 
        z-index: 51; 
    }
    
    /* На телефоне отключаем открытие по наведению */
    .lang-dropdown:hover .lang-content { opacity: 0; visibility: hidden; }
    
    .lang-content { 
        position: absolute; 
        left: 40px; 
        
        /* [РУЧНАЯ НАСТРОЙКА ВЫСОТЫ БУКВ RU] */
        top: 11.1px;  
        
        height: auto;
        display: flex; 
        align-items: center;
        border: none; background: transparent; padding: 0;
        
        /* Анимация: слева направо */
        transform: translateX(-15px); 
        opacity: 0; 
        visibility: hidden; 
        transition: all 0.3s ease; 
    }
    
    .lang-content a { 
        font-size: 20px; 
        display: block; 
        line-height: 1; 
        padding: 10px 10px 10px 0; 
        pointer-events: auto; 
    }
    
    /* Открытие только по клику */
    .lang-dropdown.active .lang-content {
        opacity: 1 !important; 
        visibility: visible !important; 
        transform: translateX(0);
    }

    /* БУРГЕР */
    .hamburger-open { display: flex; height: 32px; align-items: center; }
    .hamburger-open svg { width: 32px; height: 32px; }

   /* 4. МЕНЮ (ПОЛНОЕ РУЧНОЕ УПРАВЛЕНИЕ В ПРОЦЕНТАХ) */
    nav { 
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh; 
        background-color: #f6f3ec; 
        display: flex; flex-direction: column; 
        
        /* ВАЖНО: ОТКЛЮЧАЕМ ЦЕНТРОВКУ, ВКЛЮЧАЕМ ОТСЧЕТ СВЕРХУ */
        justify-content: flex-start; 
        align-items: center; 
        
        /* --- [1] РЫЧАГ ДЛЯ ТЕКСТА (About Me, Overview...) --- */
        /* 25vh = Текст начнется на высоте 25% от верха экрана */
        padding-top: 30vh;  
        
        gap: 40px; 
        opacity: 0; pointer-events: none; z-index: 99999; 
        transition: 0.3s; 
    }
    nav.open { opacity: 1; pointer-events: all; }
    
    nav a { font-size: 28px; color: #5f4f3c !important; }
    .divider { display: none; }
    
    /* КРЕСТИК (ОСТАЕТСЯ КАК БЫЛ) */
    .menu-close-btn { 
        display: block; color: #5f4f3c !important; position: absolute; 
        top: 20px; right: 20px; 
        margin: 0; align-self: auto;
        height: 32px; width: 32px; display: flex; align-items: center; justify-content: center; z-index: 100000;
    }
    
    /* ИКОНКИ В МЕНЮ */
    nav div { 
        position: static; 
        
        /* --- [2] РЫЧАГ ДЛЯ ИКОНОК --- */
        /* Отступ ОТ ТЕКСТА МЕНЮ до ИКОНОК */
        margin-top: 22vh; 
        
        gap: 40px !important; 
    }
    nav .icon-link { color: #5f4f3c !important; }
    nav .icon-link svg { width: 28px; height: 28px; }
    
    /* 5. НАСТРОЙКИ СТРАНИЦЫ ОБО МНЕ */
    .about-container { flex-direction: column-reverse; gap: 30px; max-width: 100%; padding: 0 15px; }
    .about-image { 
        width: 100%; 
        justify-content: center; 
        margin-top: 0 !important; 
        margin-bottom: 30px; 
    }
    .about-image img { max-width: 100%; width: 100%; }
    
    /* 6. ОСТАЛЬНЫЕ ОТСТУПЫ */
    .container { padding: 0 10px 60px; } 
    .project-title { font-size: 18px; margin-bottom: 20px; margin-top: 0 !important; letter-spacing: 1px; line-height: 1.2; }
    
    /* Лайтбокс */
    :root { --f-carousel-slide-padding: 30px; }
    .f-carousel__slide { padding-left: 30px !important; padding-right: 30px !important; }
    .f-button.is-prev { left: 0 !important; }
    .f-button.is-next { right: 0 !important; }
    .f-button { background: transparent !important; }
    
    .gallery-grid { grid-template-columns: 1fr; padding: 0 15px; }
    .project-nav { flex-direction: row; font-size: 12px; padding: 20px 0; } 
    footer { text-align: center !important; padding: 40px 20px; }
	
	/* ШРИФТЫ В ПРОЕКТАХ (СТРОГО КАК НА ПК) */
    .caption { 
        /* Английский шрифт */
        font-family: 'Outfit', sans-serif !important; 
        font-weight: 400 !important;
        font-size: 20px !important;  
        margin-top: 10px; 
    } 

    .caption.ru-font { 
        /* Русский шрифт */
        font-family: 'Jost', sans-serif !important; 
        font-weight: 500 !important; 
        font-size: 20px !important; 
        line-height: 1.4; 
    }

	/* НИЖНЯЯ НАВИГАЦИЯ И КНОПКИ */
    .project-nav {
        border-top: none !important; 
        margin-top: 30px !important; 
        padding-top: 0 !important; 
    }

    .back-link {
        margin-top: 60px !important; 
        margin-bottom: -10px !important; 
    }

    footer {
        padding-top: 0 !important;
        padding-bottom: 30px !important; 
    }

    /* --- ЯЗЫК ВНУТРИ БУРГЕР-МЕНЮ (НАСТРОЙКИ) --- */
    /* ВНИМАНИЕ: Это правило теперь ВНУТРИ @media (max-width: 768px),
       поэтому оно сработает ТОЛЬКО на телефоне и перебьет display: none */
    .mobile-menu-lang {
        display: flex !important; 
        position: absolute !important;
        
        top: 20px; 
        left: 20px; 
        z-index: 100001; 
        margin: 0 !important;
        
        /* ЦВЕТ ГЛАВНОГО СЛОВА (EN) - ТЕМНЫЙ */
        color: #5f4f3c !important; 
    }
    
    /* ЦВЕТ ВЫПАДАЮЩЕГО СЛОВА (RU) - СВЕТЛЫЙ */
    .mobile-menu-lang .lang-content a {
        color: #b9a691 !important;
    }
	/* --- ГАЛЕРЕЯ: ЖЕЛЕЗОБЕТОННАЯ ФИКСАЦИЯ КНОПОК --- */
    
    /* Мы обращаемся к кнопкам даже в режиме "простоя" (is-idle), 
       чтобы перебить стандартные настройки скрытия */
    .f-carousel.is-idle .f-button, 
    .f-carousel.is-idle .f-toolbar,
    .f-button, 
    .f-toolbar {
        opacity: 1 !important; 
        visibility: visible !important;
        display: flex !important; /* Гарантируем, что они не исчезнут */
        transition: none !important; /* Убираем эффект затухания */
    }

    /* Отключаем затемнение и увеличение фото при касании на телефоне */
    .gallery-item:hover img, 
    .column a:hover img { 
        filter: none !important; 
        transform: none !important; 
    }
	/* --- ЗАГОЛОВОК СТРАНИЦЫ В ШАПКЕ (МОБИЛЬНЫЙ) --- */
    .mobile-page-title {
        display: block; /* Показываем на телефоне */
        
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%); /* Идеальная центровка */
        
        font-family: 'Outfit', sans-serif;
        font-weight: 400;
        font-size: 15px; /* Такой же размер, как у языка */
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #b9a691; /* Цвет как у иконок */
        
        pointer-events: none; /* Чтобы текст не мешал нажимать на что-либо */
        white-space: nowrap;
    }
	/* КОРРЕКЦИЯ ДЛЯ РУССКОГО ЗАГОЛОВКА (ОПУСКАЕМ НИЖЕ) */
    .mobile-page-title.ru-font {
        /* Добавляем отступ сверху, чтобы сдвинуть вниз */
        margin-top: 2px; /* <--- МЕНЯЙТЕ ЦИФРУ ЗДЕСЬ (3px, 4px, 5px...) */
    }
}

/* =========================================
   НАСТРОЙКИ ШРИФТОВ ДЛЯ КОМПЬЮТЕРА
   (Вставлять перед @media)
   ========================================= */

/* 1. ДЛЯ АНГЛИЙСКОГО (Обычный .caption) */
.caption { 
    font-size: 19px !important; /* <--- МЕНЯЙТЕ ЗДЕСЬ ДЛЯ АНГЛИЙСКОГО */
    margin-top: 15px;
}

/* 2. ДЛЯ РУССКОГО (Спец. класс) */
/* Этот блок должен идти ВТОРЫМ, чтобы перекрывать английский для русских страниц */
.caption.ru-font { 
    font-size: 19px !important; /* <--- МЕНЯЙТЕ ЗДЕСЬ ДЛЯ РУССКОГО */
    line-height: 1.4; 
    font-weight: 400 !important;
}


/* --- ЖИРНОСТЬ ТОЛЬКО ДЛЯ РУССКОЙ ВЕРСИИ --- */
.ru-mode .nav-item, .ru-mode .nav-label, .ru-mode .back-link a { font-weight: 500 !important; }
.ru-mode .nav-item:hover, .ru-mode .back-link a:hover { font-weight: 500 !important; }

/* АНИМАЦИЯ */
@keyframes simpleFade { 0% { opacity: 0; } 100% { opacity: 1; } }
.gallery-item img, .masonry-gallery img, .column img, .about-image img { animation: simpleFade 0.8s ease-in-out forwards; }

/* =========================================
   ЭФФЕКТЫ ПРИ НАВЕДЕНИИ (ТОЛЬКО ДЛЯ КОМПЬЮТЕРА)
   ========================================= */
@media (min-width: 769px) {
    /* Затемнение и увеличение при наведении мыши */
    .gallery-item:hover img, 
    .column a:hover img, 
    .masonry-gallery a:hover img { 
        filter: brightness(70%); 
        transform: scale(1.02); 
        cursor: pointer; 
    }
}