/* =============================================
   ArtMastex - Главная страница
   Стили в едином дизайн-коде с калькулятором
   ============================================= */

/* Шрифты */
@font-face {
    font-family: 'NauryzRedKeds';
    src: url('/calculator/font/NauryzRedKeds.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
}

/* Базовые стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Разрешаем выделение для полей ввода и редактируемых элементов */
input,
textarea,
select,
[contenteditable="true"],
[contenteditable="true"] * {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Фон вынесен в common.css */
/* Переопределяем font-family для главной страницы */
body {
    font-family: "Unbounded", sans-serif !important;
    font-size: 14px;
    font-weight: 400;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* =============================================
   Навигация - Glass Effect
   ============================================= */
/* Стили навигации вынесены в common.css */

/* Специфичные стили для главной страницы */
.nav-actions .nav-link img {
    display: block;
    flex-shrink: 0;
}

/* =============================================
   Hero секция
   ============================================= */
.hero {
    text-align: center;
    padding: 15px 20px 20px;
    position: relative;
}


.hero-brand {
    font-family: 'NauryzRedKeds', 'Unbounded', sans-serif;
    font-size: clamp(48px, 8vw, 96px);
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.25);
    margin-bottom: 8px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(28px, 4vw, 36px);
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: clamp(14px, 2vw, 18px);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 32px;
}

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

/* Стили кнопок перенесены в buttons.css */
/* Переопределения для hero секции на главной странице */
.hero-actions .btn-primary.btn-lg {
    background: white;
    color: #7231FF;
    font-size: 17px;
    min-width: 240px;
    width: 240px;
}

.hero-actions .btn-primary.btn-lg i {
    color: #7231FF;
    font-size: 17px;
}

.hero-actions .btn-secondary.btn-lg {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    font-size: 17px;
    min-width: 240px;
    width: 240px;
}

.hero-actions .btn-secondary.btn-lg:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-actions .btn-secondary.btn-lg i {
    color: white;
    font-size: 17px;
}

/* Кот убран временно */

/* =============================================
   Секции контента
   ============================================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 0px;
    padding-top: 0px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.section {
    background: white;
    border-radius: 30px;
    padding: 32px;
}

/* Специфичные отступы для секций */
#collective-orders {
    padding-top: 16px;
    padding-bottom: 16px;
}

#news {
    padding-top: 16px;
    padding-bottom: 16px;
}

#gallery {
    padding-top: 16px;
    padding-bottom: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-icon {
    font-size: 28px;
}

.section-subtitle {
    color: #666;
    margin-top: 12px;
    font-size: 14px;
}

.section-empty {
    text-align: center;
    padding: 40px;
    color: #888;
}

.section-empty p {
    margin-bottom: 16px;
}

/* Загрузка */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px;
    color: #888;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e9ecef;
    border-top-color: #7231FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* =============================================
   Коллективные заказы (коллекты)
   ============================================= */
/* Контейнер для галереи коллектов */
.collective-orders-container {
    position: relative;
    width: 100%;
    padding: 4px 0; /* Отступ для hover эффекта карточек */
}

/* Индикатор точек для галереи коллектов */
.collective-orders-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 4px 0;
}

.collective-orders-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(114, 49, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.collective-orders-indicator-dot:hover {
    background: rgba(114, 49, 255, 0.5);
    transform: scale(1.2);
}

.collective-orders-indicator-dot.active {
    background: #7231FF;
    width: 24px;
    border-radius: 4px;
    border-color: #7231FF;
}

.collective-orders-indicator-dot.visible {
    background: rgba(114, 49, 255, 0.6);
    border-color: rgba(114, 49, 255, 0.4);
}

.collective-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 4px 0; /* Отступ сверху и снизу для hover эффекта */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Кнопки навигации галереи */
.collective-orders-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(114, 49, 255, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: none; /* Показываем только если коллектов больше видимых через JS */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.collective-orders-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 1);
    border-color: #7231FF;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(114, 49, 255, 0.3);
}

.collective-orders-nav.prev {
    left: -24px;
}

.collective-orders-nav.next {
    right: -24px;
}

.collective-orders-nav i {
    color: #7231FF;
    font-size: 20px;
}

.collective-orders-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.collective-orders-nav:disabled:hover {
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(114, 49, 255, 0.3);
}

.collect-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    border: 2px solid rgba(114, 49, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(20px);
    animation: slideInCard 0.4s ease-out forwards;
}

@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.collect-card:hover {
    border-color: #7231FF;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(114, 49, 255, 0.2);
}

.collect-card-content {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.collect-card-avatar {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    min-width: 140px;
    min-height: 140px;
    border-radius: 12px;
    overflow: hidden;
    background: #e9ecef;
}

.collect-card-avatar img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    flex-shrink: 0;
}

.collect-card-info {
    flex: 1;
    min-width: 0;
}

.collect-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.3;
}

.collect-card-deadlines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.deadline-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.deadline-item i {
    color: #7231FF;
    width: 16px;
}

.collect-card-status {
    margin-top: 8px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-preparation {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

.status-recruiting {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-closed {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-completed {
    background: rgba(114, 49, 255, 0.2);
    color: #7231FF;
}

/* Иконка замочка для закрытых коллектов */
.collect-card-title .fa-lock {
    color: #7231FF;
    margin-left: 8px;
    font-size: 16px;
    opacity: 0.8;
}

/* Стили кнопок перенесены в buttons.css */
/* Переопределения для кнопок в карточках коллектов */
.collect-card button.btn-success {
    width: 100%;
}

/* Модальное окно коллекта */
.collect-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.collect-modal {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.collect-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.collect-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.collect-modal-close i {
    color: #333;
    font-size: 18px;
}

.collect-modal-header {
    display: flex;
    gap: 20px;
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
    align-items: flex-start;
}

.collect-modal-avatar {
    width: auto;
    height: 100px;
    max-width: 200px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
    background: #e9ecef;
}

.collect-modal-header-info {
    flex: 1;
    min-width: 0;
}

.collect-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.collect-modal-body {
    padding: 24px;
}

.collect-modal-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.collect-modal-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #333;
}

.detail-item i {
    color: #7231FF;
    width: 20px;
    text-align: center;
}

.detail-item a {
    color: #7231FF;
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

.collect-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
}

/* Стили кнопок перенесены в buttons.css */

/* =============================================
   Новости
   ============================================= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.news-card {
    background: #f8f9fa;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.news-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #e9ecef;
}

.news-card-content {
    padding: 20px;
}

.news-card-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.news-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.news-card-summary {
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================
   Галерея
   ============================================= */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.filter-btn:hover {
    border-color: #7231FF;
    color: #7231FF;
}

.filter-btn.active {
    background: #7231FF;
    color: white;
    border-color: #7231FF;
}

/* =============================================
   Карусель фотографий из прайса - бесконечная лента
   ============================================= */
.price-carousel-container {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    background: white;
    border-radius: 0;
    padding: 0;
}

.price-carousel-wrapper {
    overflow: hidden;
    width: 100%;
}

.price-carousel {
    display: flex;
    gap: 16px;
    width: fit-content;
    animation: scroll-left 270s linear infinite;
    will-change: transform;
}

.price-carousel:hover {
    animation-play-state: paused;
}

.price-carousel-track {
    display: flex;
    gap: 16px;
    width: fit-content;
}

.price-carousel-item {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.price-carousel-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.price-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.price-carousel-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 300px;
    background: #f8f9fa;
    border-radius: 12px;
}

.spinner-small {
    width: 32px;
    height: 32px;
    border: 3px solid #E0DDEB;
    border-top-color: #7231FF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Скрываем кнопки навигации для бесконечной ленты */
.price-carousel-prev,
.price-carousel-next {
    display: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 0;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-item-title {
    font-size: 14px;
    font-weight: 500;
}

/* =============================================
   Lightbox
   ============================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
}

.lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 16px;
    font-size: 14px;
}

/* Стили подвала вынесены в common.css */

/* =============================================
   Кнопки
   ============================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #7231FF 0%, #9B59B6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 49, 255, 0.3);
}

/* Адаптивность для карусели */
@media (max-width: 768px) {
    .price-carousel-container {
        margin-bottom: 20px;
        padding: 15px 0;
    }
    
    .price-carousel-item {
        width: 120px;
        height: 120px;
    }
    
    .price-carousel {
        gap: 12px;
    }
}

/* =============================================
   Адаптивность
   ============================================= */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link span {
        display: none;
    }
    
    .hero {
        padding: 10px 16px 15px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn-primary.btn-lg,
    .hero-actions .btn-secondary.btn-lg {
        width: 100%;
        max-width: 280px;
        min-width: auto;
        justify-content: center;
        font-size: 16px;
    }
    
    .hero-actions .btn-primary.btn-lg i,
    .hero-actions .btn-secondary.btn-lg i {
        font-size: 16px;
    }
    
    .section {
        padding: 24px 16px;
        border-radius: 20px;
    }
    
    .collective-orders-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .collective-orders-nav {
        width: 40px;
        height: 40px;
    }
    
    .collective-orders-nav.prev {
        left: 8px;
    }
    
    .collective-orders-nav.next {
        right: 8px;
    }
    
    .collective-orders-nav i {
        font-size: 16px;
    }
    
    .collective-orders-container {
        padding: 0 8px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

