/* * ========================================
 * 1. ГЛОБАЛЬНЫЙ СБРОС (АНТИ-СИНИЙ ЦВЕТ И RAMKA)
 * ========================================
 */
/* 1. Отключаем подсветку на уровне всего документа */
html {
    -webkit-tap-highlight-color: transparent;
}

/* 2. Отключаем подсветку и рамку для интерактивных элементов */
a, button, input, textarea, select, .gallery-item {
    -webkit-tap-highlight-color: transparent;
    outline: none !important; 
    /* Дополнительные хаки для старых Android */
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* 3. Сброс фона при нажатии и фокусе */
a:active, a:focus,
button:active, button:focus,
.gallery-item:active, .gallery-item:focus {
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    /* Устраняет мигание текста, заставляя цвет меняться мгновенно */
    transition: none !important; 
}
/* * ========================================
 * 2. БАЗОВЫЕ СТИЛИ
 * ========================================
 */
body {
    margin: 0;
    font-family: 'Cormorant Garamond', 'Times New Roman', serif;
    background-color: #1a1a1a;
    color: #C6A668; /* ЗОЛОТОЙ */
    
    display: block; 
    overflow-y: auto; 
    overflow-x: hidden; /* Запрет горизонтального скролла */
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
    width: 100%;
}

/* * ========================================
 * 3. СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ (index.html)
 * ========================================
 */
.page-mission {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden; /* Скролл отключен только здесь */
    width: 100%;
    position: fixed;
}

.scene-container {
    text-align: center;
    max-width: 800px;
    padding: 20px;
}

.living-image img {
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: breathing-pulse 8s infinite alternate;
    max-width: 100%;
    height: auto;
}

@keyframes breathing-pulse {
    0% { transform: scale(1); opacity: 0.95; }
    100% { transform: scale(1.02); opacity: 1; }
}

.artwork-title-mission {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: normal;
    font-style: italic;
    text-align: center;
    color: #C6A668;
    margin-top: 35px;
    margin-bottom: 35px;
}

.poem-text {
    margin-top: 40px;
    font-size: 1.5rem;
    font-style: italic;
    min-height: 100px;
    color: #C6A668;
}

#unlock-key {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    padding: 12px 25px;
    margin-top: 30px;
    background: none;
    border: 1px solid #C6A668;
    color: #C6A668;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
}

#unlock-key:hover {
    background-color: #C6A668;
    color: #1a1a1a;
}

#unlock-key.hidden {
    opacity: 0;
    pointer-events: none;
}

/* * ========================================
 * 4. СТРУКТУРА КОНТЕНТА
 * ========================================
 */
.content-wrapper {
    max-width: 1100px;
    padding: 60px 0 20px 0; /* Без боковых отступов для карусели */
    margin: 0 auto; 
    box-sizing: border-box; 
    width: 100%;
}

.content-wrapper h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Cormorant Garamond', serif;
    color: #C6A668;
    padding: 0 20px; /* Безопасная зона для текста */
}

.subtitle {
    text-align: center;
    font-style: italic;
    font-size: 1rem;
    color: #C6A668;
    margin-top: -30px;
    margin-bottom: 40px;
    padding: 0 20px;
}

/* * ========================================
 * 5. ТЕКСТОВЫЕ БЛОКИ 
 * ========================================
 */
.artist-description {
    max-width: 750px;
    margin: 0 auto 40px auto;
    font-size: 1.2rem;
    line-height: 1.8;
    padding: 30px; /* Отступ для вензелей */
    box-sizing: border-box;
    position: relative; /* Для позиционирования вензелей */
    color: #C6A668;
}

.artist-description em {
    display: block;
    font-size: 1.3rem;
    margin-top: 30px;
    line-height: 1.7;
    text-align: center;
}

.artist-description h2,
.artist-description h3 {
    text-align: left;
    color: #1a1a1a;
    font-weight: bold;
    font-style: italic;
}

/* * ========================================
 * 6. КАРУСЕЛЬ (PRESENCIA)
 * ========================================
 */
.carousel-container {
    width: 100%;
    height: 70vh;
    max-width: 900px;
    margin: 40px auto;
    overflow: hidden;
    position: relative;
    display: flex;
    touch-action: pan-y;
}

.carousel-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
    transform: translateX(0%);
}

.carousel-slide {
    flex-basis: 100%;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 0 5%; /* Адаптивный отступ */
    text-align: center;
}

.carousel-slide img {
    max-width: 100%; 
    max-height: 85%;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #444;
    width: auto; 
    height: auto;
}

.slide-description h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #C6A668;
}

.description-text {
    width: 100%; 
    max-width: 700px;
    margin: 0 auto;
    padding: 0; 
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.7;
    font-family: 'Cormorant Garamond', serif;
    color: #C6A668;
}

.caption {
    font-style: italic;
    color: #C6A668;
    margin-top: 10px;
}

/* Навигация */
.carousel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px;
    margin: 20px auto 40px auto;
    padding: 0 20px;
}

.nav-button {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    padding: 12px 30px;
    background: none;
    border: 1px solid #C6A668;
    color: #C6A668;
    cursor: pointer;
    transition: all 0.3s ease; 
}

.nav-button:hover, 
.nav-button:active { 
    background-color: #C6A668;
    color: #1a1a1a;
    transition: none !important; 
}

.dots-container {
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #444;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #C6A668;
}

/* * ========================================
 * 7. ГАЛЕРЕЯ
 * ========================================
 */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1050px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.gallery-item {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.gallery-item:active {
    background-color: transparent !important;
    transform: scale(0.98);
    box-shadow: none;
}

.artwork-image-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #333;
    position: relative;
}

.artwork-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover .artwork-image-wrapper img {
    transform: scale(1.05);
}

.artwork-title {
    font-size: 1.2rem;
    font-style: italic;
    color: #C6A668;
    margin: 0;
}

.artwork-details {
    font-size: 0.9rem;
    color: #C6A668; 
    margin-top: 5px;
    margin-bottom: 0;
    text-align: center;
}

/* !!! ВОССТАНОВЛЕНО: Оверлей для "Coming Soon" (для 3-й картины) !!! */
.soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item.coming-soon:hover .soon-overlay {
    opacity: 1;
}

.soon-overlay p {
    color: #C6A668;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Заглушка для Umbral (постоянная) */
.placeholder-text-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
}

.placeholder-text-content h2 {
    font-size: 1.8rem;
    color: #C6A668;
    font-style: italic;
    margin: 5px 0;
}

.placeholder-text-content p {
    font-size: 1.1rem;
    color: #C6A668;
    margin: 5px 0;
}

/* * ========================================
 * 8. ФУТЕР
 * ========================================
 */
.site-footer {
    width: 100%;
    padding: 0;
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
}

.footer-text-content {
    text-align: center;
    padding: 30px 20px;
    max-width: 750px;
    width: 100%;
    color: #C6A668;
    font-size: 0.9rem;
    margin: 0; 
}

.footer-text-content a {
    color: #C6A668;
    text-decoration: none;
}

.footer-text-content a:hover {
    text-decoration: underline;
}

/* * ========================================
 * 9. НАВИГАЦИЯ И ЯЗЫКИ
 * ========================================
 */
.menu-toggle-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    font-size: 2rem;
    background: none;
    border: none;
    color: #C6A668; 
    cursor: pointer;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #0a0a0a;
    box-shadow: 4px 0 10px rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.4s ease-out;
    padding-top: 80px;
}

.side-menu.open {
    transform: translateX(0);
}

.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-menu li a {
    display: block;
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.2rem;
    color: #C6A668;
}

.side-menu li a:hover {
    background-color: #333;
}

.language-switcher {
    position: fixed;
    top: 25px;
    right: 20px;
    z-index: 1001;
    font-size: 0.9rem;
    font-family: 'Cormorant Garamond', serif;
}

.lang-link {
    color: #C6A668;
    text-decoration: none;
    transition: color 0.2s ease;
    opacity: 0.6;
}

.lang-link:hover, .active-lang {
    opacity: 1;
    font-weight: bold;
}

/* * ========================================
 * 10. КОНТАКТЫ
 * ========================================
 */
.contact-container {
    max-width: 750px; 
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.contact-prompt {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px; 
    text-align: center; 
}

.mailto-container {
    margin-bottom: 50px; 
}

.submit-button, a.submit-button {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    padding: 12px 30px;
    background: none;
    border: 1px solid #C6A668;
    color: #C6A668;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block; 
    text-decoration: none;
    text-align: center;
}

.submit-button:hover, a.submit-button:hover {
    background-color: #C6A668;
    color: #1a1a1a;
}

/* * ========================================
 * 11. ТЕМЫ (LIGHT/DARK)
 * ========================================
 */
.page-light-paper {
    background-color: #f7f3e8;
    color: #1a1a1a;
    animation: fadeIn 1.5s ease-in;
    
    display: block;
    overflow: auto;
    min-height: auto;
}

/* Переопределения для светлой темы */
.page-light-paper .menu-toggle-button,
.page-light-paper .content-wrapper h1,
.page-light-paper .subtitle,
.page-light-paper .artist-description,
.page-light-paper .footer-text-content,
.page-light-paper .footer-text-content a,
.page-light-paper .language-switcher .lang-link,
.page-light-paper .submit-button {
    color: #1a1a1a;
}

.page-light-paper .site-footer {
    border-top: 1px solid #ccc;
}

.page-light-paper .submit-button {
    border: 1px solid #1a1a1a;
}

.page-light-paper .submit-button:hover {
    background-color: #1a1a1a;
    color: #fff;
}

/* Вензеля на светлой теме должны быть темными */
.page-light-paper .artist-description::before,
.page-light-paper .artist-description::after {
    color: #1a1a1a;
    opacity: 0.3;
}

.page-dark {
    animation: fadeIn 1.5s ease-in;
}

.page-dark .site-footer {
    border-top: 1px solid #444;
}

/* * ========================================
 * 12. МОБИЛЬНАЯ АДАПТАЦИЯ
 * ========================================
 */
@media (max-width: 900px) {
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .content-wrapper h1 {
        font-size: 2rem;
    }
    .artist-description {
        font-size: 1.1rem;
        /* Важно: padding уже задан выше в основном блоке как 20px */
    }
}

@media (max-width: 450px) {
    .nav-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    .slide-description h2 {
        font-size: 2rem;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .living-image img {
        max-width: 60%; 
        max-height: 60vh; 
    }
    .poem-text {
        font-size: 1.2rem; 
        margin-top: 15px; 
    }
    .artwork-title-mission {
        font-size: 1.6rem; 
        margin-top: 20px;
        margin-bottom: 20px;
    }
    #unlock-key {
        padding: 8px 20px; 
        margin-top: 15px;
    }
}

/* * ========================================
 * Стили для СТРАНИЦЫ-ЗАГЛУШКИ (Umbral)
 * ========================================
 */

.placeholder-content {
    text-align: center;
    padding: 80px 20px;
    min-height: 40vh; /* Высота блока */
    
    /* Центрирование содержимого */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    border-radius: 4px;
    border: 1px dashed #555; /* Декоративная пунктирная рамка */
    margin-top: 40px;
    box-sizing: border-box;
}

.placeholder-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    color: #C6A668; /* Золотой */
    margin: 0;
}

.placeholder-content p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: #C6A668; /* Золотой */
    margin-top: 10px;
}