/* Базовые настройки */
:root {
    --bg-color: #f9f8f6; 
    --text-color: #1a1a1a;
    --accent-color: #8c7a6b; 
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
}

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

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

/* Навигация */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 30px 50px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeInDown 1s ease-out;
}

.logo h1 { font-family: var(--font-heading); font-size: 1.5rem; letter-spacing: 2px; color: #fff; }
.logo span { font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase; color: #eee; }

/* Кнопка Login */
.login-link {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.3s;
}
.login-link:hover { color: #fff; }

/* Hero Section */
.hero {
    height: 100vh;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('Image/IMG_1478.jpeg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 20px;
    animation: zoomIn 2s ease-out;
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: slideUp 1s ease-out 0.3s both;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 1px;
    animation: slideUp 1s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    animation: slideUp 1s ease-out 0.9s both;
}

.btn-primary, .btn-secondary {
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    min-width: 220px;
    text-align: center;
    border: 1px solid transparent;
}

.btn-primary { background-color: #fff; color: #000; }
.btn-primary:hover { background-color: var(--accent-color); color: #fff; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.btn-secondary { background-color: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.7); }
.btn-secondary:hover { background-color: #fff; color: #000; border-color: #fff; transform: translateY(-3px); }

/* Секции */
.section { padding: 120px 20px; }
.container { max-width: 1200px; margin: 0 auto; }
.section-title { font-family: var(--font-heading); font-size: 3rem; text-align: center; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: #666; margin-bottom: 60px; }

/* --- БЛОК THE WORK (АККОРДЕОН) --- */
.work-list { display: flex; flex-direction: column; border-top: 1px solid #ddd; }
.work-accordion { border-bottom: 1px solid #ddd; transition: background-color 0.3s ease; }
.work-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    text-decoration: none;
    color: var(--text-color);
    cursor: pointer;
    list-style: none;
    transition: padding-left 0.3s ease, color 0.3s ease;
}
.work-item::-webkit-details-marker { display: none; }
.work-item:hover { padding-left: 20px; color: var(--accent-color); }

.work-number { font-size: 0.9rem; color: #888; width: 50px; }
.work-name { font-family: var(--font-heading); font-size: 2.5rem; flex-grow: 1; }
.work-arrow { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; color: var(--text-color); transition: color 0.3s; }
.work-arrow:hover { color: var(--accent-color); text-decoration: underline; }

/* Лента с фото внутри аккордеона */
.work-gallery {
    display: flex;
    gap: 15px;
    padding: 0 0 30px 50px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; 
}
.work-gallery::-webkit-scrollbar { display: none; }
.work-gallery img {
    height: 300px;
    width: auto;
    object-fit: cover;
    border-radius: 4px;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}
.work-gallery img:hover { transform: scale(1.02); }

details[open] .work-gallery { animation: slideDown 0.5s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Блок Обо мне */
.about-container { display: flex; align-items: center; gap: 60px; }
.about-image { flex: 1; overflow: hidden; }
.about-image img { width: 100%; height: auto; object-fit: cover; transition: transform 0.8s ease; }
.about-image:hover img { transform: scale(1.05); }
.about-text { flex: 1; }
.about-text h3 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 20px; line-height: 1.3; }

/* Блок Цен (Investment) */
.bg-light { background-color: #f0ede8; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; margin-top: 40px; }
.pricing-card { background: #fff; padding: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border-top: 4px solid var(--text-color); display: flex; flex-direction: column; }
.pricing-card h4 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 10px; }
.pricing-card .price { font-size: 3rem; font-weight: 600; margin-bottom: 5px; }
.package-desc { color: #888; margin-bottom: 30px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.features { list-style: none; margin-bottom: 30px; padding: 0; flex-grow: 1; }
.features li { padding: 10px 0; border-bottom: 1px solid #eee; font-size: 0.95rem; color: #444; }
.features li::before { content: "✓"; margin-right: 10px; color: var(--accent-color); font-weight: bold; }

/* Блок Локаций (Locations) */
.locations-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.location-card { padding: 30px; background: #fff; border: 1px solid #eee; }
.location-card h4 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 15px; }
.location-card p { color: #666; line-height: 1.8; }

/* Подвал */
footer { text-align: center; padding: 40px; background-color: #1a1a1a; color: #fff; }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.insta-link { color: #fff; text-decoration: underline; transition: color 0.3s; }
.insta-link:hover { color: var(--accent-color); }

/* Модальные окна */
.modal {
    display: none; position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
}
.modal-content {
    background-color: var(--bg-color); margin: 15% auto; padding: 40px; max-width: 600px;
    position: relative; box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: modalScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.close { position: absolute; top: 15px; right: 25px; font-size: 2rem; cursor: pointer; transition: color 0.3s ease; }
.close:hover { color: var(--accent-color); }

@keyframes modalScale { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { transform: scale(1.05); } to { transform: scale(1); } }

/* Мобильная версия */
@media (max-width: 768px) {
    .navbar { padding: 20px; }
    .hero-content h2 { font-size: 2.6rem; }
    .hero-content p { font-size: 1rem; margin-bottom: 30px; }
    .hero-buttons { flex-direction: column; gap: 15px; padding: 0 20px; }
    .btn-primary, .btn-secondary { width: 100%; max-width: 320px; margin: 0 auto; }
    
    .about-container { flex-direction: column; gap: 30px; }
    .work-name { font-size: 1.6rem; }
    .work-item { padding: 20px 0; }
    .work-arrow { display: none; }
    .work-gallery { padding-left: 0; gap: 10px; }
    .work-gallery img { height: 220px; }
    .section { padding: 80px 20px; }
    .section-title { font-size: 2.5rem; }
    .footer-content { flex-direction: column; gap: 15px; }
}

/* =========================================
   АНИМАЦИИ И ПРОСМОТР ФОТО (LIGHTBOX)
   ========================================= */

/* Делаем скролл плавным и с прилипанием */
.work-gallery {
    scroll-behavior: smooth;
    padding-bottom: 40px; /* Отступ, чтобы было удобно скроллить */
}

.work-gallery img {
    cursor: zoom-in; /* Курсор в виде лупы */
    transition: transform 0.4s ease, filter 0.4s ease;
}

.work-gallery img:hover {
    filter: brightness(0.8); /* Фото чуть темнеет при наведении */
}

/* --- МОДАЛЬНОЕ ОКНО ДЛЯ ПРОСМОТРА ФОТО --- */
.lightbox {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Темный фон */
    backdrop-filter: blur(10px); /* Размытие заднего фона */
    opacity: 0;
    transition: opacity 0.4s ease;
    cursor: zoom-out; /* Курсор для закрытия */
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

/* Сама картинка внутри просмотра */
.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    
    /* Анимация расширения (зум) */
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.lightbox.active img {
    transform: scale(1);
    opacity: 1;
}

/* Кнопка закрытия */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .lightbox img {
        max-width: 95%;
        max-height: 85vh;
    }
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2.5rem;
    }
}

/* Кнопка добавления пакета */
#editPricingBtn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}
#editPricingBtn:hover {
    background: #fff;
    color: #000;
}

/* Стили для кнопки редактирования (карандаш) */
.edit-package-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.edit-package-btn:hover {
    background: #1a1a1a;
    transform: scale(1.1);
}

/* Обертка для фото, чтобы позиционировать крестик */
.photo-wrapper {
    position: relative;
    display: inline-block;
    scroll-snap-align: start;
}

/* Кнопка удаления (крестик) */
.delete-photo-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0; /* Скрыт по умолчанию */
    transition: opacity 0.3s ease, background 0.3s ease;
    z-index: 10;
}

/* Показываем крестик при наведении на фото */
.photo-wrapper:hover .delete-photo-btn {
    opacity: 1;
}

.delete-photo-btn:hover {
    background: #ff4d4d; /* Красный при наведении */
}

/* В мобильной версии крестик всегда виден (там нет наведения мыши) */
@media (max-width: 768px) {
    .delete-photo-btn {
        opacity: 1; 
    }
}

/* Чтобы фото внутри обертки не теряло стили */
.photo-wrapper img {
    height: 300px;
    width: auto;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

/* Карандаш для блока Обо мне */
#editAboutBtn {
    position: absolute;
    top: 0;
    right: 20px;
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

#editAboutBtn:hover {
    background: #1a1a1a;
    transform: scale(1.1);
}

/* Делаем карандаш на главном экране заметным */
#editHeroBtn {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid #ddd;
    z-index: 100;
}

#editHeroBtn:hover {
    background-color: #8c7a6b !important;
    color: #ffffff !important;
    transform: scale(1.1);
}

/* --- СТРЕЛКИ ДЛЯ ЛАЙТБОКСА --- */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 3rem;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    border-radius: 5px;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* На мобильных телефонах делаем стрелки чуть меньше */
@media (max-width: 768px) {
    .lightbox-nav {
        font-size: 2rem;
        padding: 15px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}
