/* ===== ОСНОВНЫЕ НАСТРОЙКИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
}

body {
    background-color: #0a0a0a;
    color: #f0f0f0;
    line-height: 1.5;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== ШАПКА И МЕНЮ ===== */
header {
    background: #000;
    padding: 12px 0;
    border-bottom: 2px solid #e63946;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.2);
}

.menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
    padding: 4px 0 8px 0;
    cursor: grab;
    user-select: none;
    scroll-snap-type: x mandatory;
}

.menu-wrapper::-webkit-scrollbar {
    display: none;
}

.menu-wrapper.active {
    cursor: grabbing;
}

.menu-item {
    display: inline-block;
    padding: 8px 24px;
    margin: 0 4px;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px solid #e63946;
    transition: all 0.2s;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.menu-item:first-child {
    margin-left: 0;
}

.menu-item:last-child {
    margin-right: 0;
}

.menu-item:hover,
.menu-item:focus {
    background: #e63946;
    color: #000;
    border-color: #fff;
    outline: none;
}

.swipe-hint {
    text-align: center;
    font-size: 0.75rem;
    color: #e63946;
    margin-top: 4px;
    display: none;
}

@media (max-width: 480px) {
    .swipe-hint {
        display: block;
    }
}

/* ===== РАЗДЕЛЫ ===== */
.section {
    margin: 48px 0;
    border-bottom: 1px dashed #333;
    padding-bottom: 40px;
    scroll-margin-top: 90px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border-left: 6px solid #e63946;
    padding-left: 20px;
}

.preview-container {
    background: #111;
    border-radius: 28px;
    padding: 20px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
}

.image-frame {
    width: 100%;
    background: #222;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 2px solid #e63946;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #1a1a1a;
    display: block;
}

.placeholder-text {
    color: #aaa;
    font-style: italic;
    background: #1a1a1a;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.toggle-btn {
    background: #000;
    color: #e63946;
    border: 2px solid #e63946;
    padding: 12px 32px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 8px;
    width: fit-content;
}

.toggle-btn:hover {
    background: #e63946;
    color: #000;
}

.expandable-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease, margin 0.3s;
    margin-top: 0;
    background: #0d0d0d;
    border-radius: 20px;
    padding: 0 20px;
    border: 1px solid transparent;
}

.expandable-content.open {
    max-height: 800px;
    opacity: 1;
    margin-top: 24px;
    padding: 20px;
    border-color: #e63946;
    background: #111;
    overflow-y: auto;
}

.content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.content-card {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 16px;
    min-width: 150px;
    text-align: center;
    border-left: 4px solid #e63946;
}

.empty-message {
    color: #777;
    font-size: 1.3rem;
    padding: 30px;
    text-align: center;
    width: 100%;
}

/* ===== КОНТАКТЫ ===== */
.contacts-footer {
    background: #000;
    border-top: 3px solid #e63946;
    padding: 40px 0 30px;
    margin-top: 60px;
}

.contacts-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.contacts-inner p {
    font-size: 1.3rem;
    color: #eee;
    margin-bottom: 24px;
    border-left: 6px solid #e63946;
    padding-left: 20px;
}

.share-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.social-btn {
    background: #1a1a1a;
    color: white;
    border: 1px solid #e63946;
    padding: 12px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.social-btn:hover {
    background: #e63946;
    color: #000;
    transform: translateY(-2px);
}

/* ===== КНОПКА НАВЕРХ ===== */
#goTop {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: #e63946;
    color: black;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.6);
    transition: 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    border: 2px solid white;
    z-index: 99;
}

#goTop.visible {
    opacity: 1;
    visibility: visible;
}

#goTop:hover {
    background: #ff4d5e;
    transform: scale(1.1);
}

/* ===== МЕДИА ГАЛЕРЕЯ ===== */
.media-gallery {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-height: 600px;
    overflow-y: auto;
    padding: 15px;
    scrollbar-width: thin;
    scrollbar-color: #e63946 #333;
}

.media-gallery::-webkit-scrollbar {
    width: 8px;
}

.media-gallery::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.media-gallery::-webkit-scrollbar-thumb {
    background: #e63946;
    border-radius: 4px;
}

.media-item {
    background: #111;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #333;
    transition: all 0.3s;
}

.media-item:hover {
    border-color: #e63946;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.2);
}

.media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.media-title {
    color: #e63946;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.media-meta {
    color: #777;
    font-size: 0.9rem;
}

.video-player-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 2px solid #e63946;
}

.video-element {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.photo-card {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #333;
    transition: all 0.3s;
    cursor: pointer;
}

.photo-card:hover {
    border-color: #e63946;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.3);
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid #e63946;
}

.photo-card .photo-title {
    padding: 10px;
    color: #ccc;
    font-size: 0.9rem;
    text-align: center;
    background: #111;
}

.empty-media {
    text-align: center;
    padding: 60px 20px;
    color: #777;
    font-size: 1.2rem;
}

.empty-media span {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.5;
}

.loading-spinner {
    text-align: center;
    padding: 60px;
    color: #e63946;
}

.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top-color: #e63946;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal img {
    max-width: 100%;
    max-height: 80vh;
    border: 3px solid #e63946;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(230, 57, 70, 0.5);
    object-fit: contain;
    background: #111;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: all 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    border: 2px solid #e63946;
}

.modal-close:hover {
    color: #e63946;
    transform: rotate(90deg);
    background: #000;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #e63946;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1001;
}

.modal-nav:hover {
    background: #e63946;
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

.modal-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid #e63946;
    font-size: 1rem;
    letter-spacing: 1px;
}

.modal-counter span {
    color: #e63946;
    font-weight: bold;
}

.modal-info {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ccc;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 20px;
    border: 1px solid #333;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .modal-nav.prev {
        left: 5px;
    }
    
    .modal-nav.next {
        right: 5px;
    }
    
    .modal-close {
        top: 5px;
        right: 5px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    
    .modal-counter {
        bottom: -30px;
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}

@media (max-width: 600px) {
    .menu-item {
        padding: 8px 18px;
        font-size: 1rem;
    }
    .section-header h2 {
        font-size: 1.8rem;
    }
    .share-buttons {
        justify-content: center;
    }
}