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

/* Шрифты */
@font-face {
    font-family: 'NauryzRedKeds';
    src: url('/static/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;
}

/* Первый экран: только отступы между блоками, высоты блоков не трогаем */
@media (min-width: 1024px) {
    html.home-page .home-first-screen {
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 24px;
        box-sizing: border-box;
        position: relative;
        overflow: visible;
    }

    /* Дети hero участвуют в общем вертикальном распределении */
    html.home-page .home-first-screen .hero {
        display: contents;
    }

    html.home-page .home-first-screen .main-nav {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    html.home-page .home-first-screen .hero-tagline {
        flex-shrink: 0;
        margin-top: 32px;
        margin-bottom: 40px;
    }

    html.home-page .home-first-screen .hero-min-tier {
        flex-shrink: 0;
        margin-top: 0;
        margin-bottom: 32px;
    }

    html.home-page .home-first-screen .hero-actions {
        flex-shrink: 0;
        margin-top: 0;
        margin-bottom: 0;
    }

    html.home-page .home-first-screen .collective-orders-wrap {
        flex-shrink: 0;
        margin-top: 20px;
        margin-bottom: 0;
    }

    html.home-page .main-content {
        margin-top: 24px;
    }
}

/* Chrome (nav, footer, фон) — preview-chrome.css */

/* Коллективные заказы: карусель навигация */
html.home-page .collective-orders-nav .hp-icon-dual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html.home-page .collective-orders-nav i {
    display: block;
    color: #7231FF;
    font-size: 18px;
    line-height: 1;
    width: 1em;
    text-align: center;
    pointer-events: none;
}

html.home-page .collective-orders-nav .hp-icon-fallback {
    width: 18px;
    height: 18px;
    color: #7231FF;
    pointer-events: none;
}

html.home-page .footer-social .social-link-text {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

html.home-page .lightbox-close {
    font-size: 32px;
    line-height: 1;
    font-weight: 300;
}

/* На home-preview в меню только текст — прячем FA-иконки, если они подставятся из общих стилей */
html.home-page .nav-links .nav-link > i {
    display: none !important;
}

html.home-page .footer-social .social-link i,
html.home-page .collect-password-toggle i,
html.home-page .container i.fa-lock {
    display: inline-block !important;
}

html.home-page .collect-modal-close-btn {
    font-size: 1.5rem;
    line-height: 1;
    color: #333;
}


.hero {
    text-align: left;
    padding: 0;
    position: relative;
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}


/* Заголовок над кнопками */
.hero-tagline {
    --hero-tagline-font-size: clamp(34px, 5.2vw, 70px);
    margin: 0 0 40px;
    padding: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-family: 'Unbounded', sans-serif;
    font-size: var(--hero-tagline-font-size);
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
    text-align: left;
    vertical-align: bottom;
}

.hero-min-tier {
    margin: 0 0 32px;
    padding: 0;
    font-family: 'Unbounded', sans-serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    min-height: 1.3em;
}

.hero-typewriter__text {
    color: #fff;
    font-size: 36px;
}

.hero-typewriter__highlight {
    color: rgba(255, 192, 29, 1);
}

.hero-typewriter__cursor {
    color: rgba(255, 192, 29, 1);
    font-size: 36px;
    font-weight: 400;
    animation: hero-typewriter-cursor-blink 0.9s step-end infinite;
}

@keyframes hero-typewriter-cursor-blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-typewriter__cursor {
        display: none;
        animation: none;
    }
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
}

.hero-action-stack {
    position: relative;
    display: inline-flex;
    padding-bottom: 6px;
}

.hero-action-stack::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 10px;
    bottom: 0;
    border-radius: 9999px;
    z-index: 0;
    pointer-events: none;
}

.hero-action-stack--primary::before {
    background: #fff;
}

.hero-action-stack--secondary::before {
    background: rgba(255, 192, 29, 1);
}

.hero-action-stack > a {
    position: relative;
    z-index: 1;
}

/* Стили кнопок перенесены в buttons.css */
/* Переопределения для hero секции на главной странице */
.hero-actions .btn-primary.btn-lg {
    background: rgba(255, 192, 29, 1);
    color: #000;
    border: none;
    font-size: 17px;
    font-weight: 400;
    min-width: 240px;
    width: 240px;
    border-radius: 9999px;
    justify-content: center;
}

.hero-actions .btn-primary.btn-lg:hover {
    background: rgba(255, 192, 29, 1);
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-actions .btn-secondary.btn-lg {
    background: #fff;
    color: #000;
    border: none;
    font-size: 17px;
    font-weight: 400;
    min-width: 240px;
    width: 240px;
    border-radius: 9999px;
    justify-content: center;
}

.hero-actions .btn-secondary.btn-lg:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

/* =============================================
   Секции контента
   ============================================= */
.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-wrap {
    position: relative;
    margin-top: 20px;
    overflow: visible;
}

#collective-orders {
    padding-top: 16px;
    padding-bottom: 16px;
    margin-top: 0;
    overflow: visible;
    position: relative;
    z-index: 2;
    background: white;
}

.collective-orders-mascot {
    position: absolute;
    right: 0;
    bottom: calc(100% - 18px);
    z-index: 1;
    display: block;
    width: auto;
    height: clamp(168px, 26vh, 264px);
    max-width: min(276px, 36vw);
    object-fit: contain;
    object-position: bottom right;
    pointer-events: none;
    user-select: none;
}

@media (min-width: 1024px) {
    .collective-orders-mascot {
        /* На десктопе размер задаёт height; max-width только потолок, не основной рычаг */
        height: clamp(192px, 31vh, 312px);
        max-width: min(300px, 34vw);
        bottom: calc(100% - 22px);
    }
}

#collective-orders .section-header--collects {
    --collects-subtitle-font: 12px;
    --collects-subtitle-lh: 1.35;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
    margin-bottom: 12px;
}

#collective-orders .section-title {
    justify-content: flex-start;
    text-align: left;
    text-transform: uppercase;
    margin: 0;
    margin-top: calc(
        var(--collects-subtitle-font) * var(--collects-subtitle-lh)
        - 1em * 1.15 / 2
    );
    flex-shrink: 0;
    display: block;
    font-size: 24px;
    line-height: 1.15;
}

#collective-orders .section-subtitle--collects {
    margin: 0;
    margin-left: auto;
    margin-top: 0;
    color: #000;
    font-size: var(--collects-subtitle-font);
    line-height: var(--collects-subtitle-lh);
    text-align: right;
    display: block;
    max-width: min(320px, 42%);
}

#collective-orders .section-subtitle--collects span {
    display: block;
}

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

#gallery {
    padding-top: 16px;
    padding-bottom: 8px;
    overflow: hidden;
}

#gallery .section-header {
    text-align: left;
    margin-bottom: 12px;
}

#gallery .section-title {
    justify-content: flex-start;
    text-align: left;
    text-transform: uppercase;
    margin: 0;
    display: block;
    font-size: 24px;
    line-height: 1.15;
}

.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;
}

.title-icon i {
    font-size: 1em;
    line-height: 1;
    color: #7231FF;
    font-weight: 900;
}

.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;
    position: relative;
}

.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;
    flex-shrink: 0;
}

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

.collective-orders-indicator-active-line {
    position: absolute;
    height: 8px;
    background: #7231FF;
    border-radius: 4px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.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;
    align-items: stretch;
}

/* Кнопки навигации галереи */
.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;
    padding: 0;
    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,
.collective-orders-nav .hp-icon-fallback {
    color: #7231FF;
    pointer-events: none;
}

.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 transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(120, 120, 120, 0.22);
    opacity: 0;
    transform: translateX(20px);
    animation: slideInCard 0.4s ease-out forwards;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

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

.collect-card:hover {
    transform: translateY(-4px);
    border-color: #7231FF;
    box-shadow: 0 6px 18px rgba(120, 120, 120, 0.28);
}

.collect-card-content {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
}

.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;
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

.collect-card-title {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
    line-height: 1.3;
    min-width: 0;
}

.collect-card-title__text {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

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

.collect-card-meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.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: 0;
}

.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: #3d4349;
}

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

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

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

/* Кнопка действия в карточке коллекта */
.collect-card-action-btn {
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 192, 29, 1);
    color: #000;
    font-size: 15px;
    font-weight: 400;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.collect-card-action-btn:hover {
    background: rgba(255, 192, 29, 1);
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.collect-card-action-btn__text {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.collect-card-action-btn__icon,
.collect-card-action-btn .hp-icon-dual--arrow-right {
    flex-shrink: 0;
    font-size: 16px;
    color: #000;
    line-height: 1;
}

.collect-card-action-btn .hp-icon-fallback {
    width: 16px;
    height: 16px;
    color: #000;
}

/* Модальное окно коллекта — основные стили в collect_modal.css */
.collect-modal-overlay {
    backdrop-filter: blur(4px);
}

.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;
}

/* =============================================
   Галерея
   ============================================= */

/* =============================================
   Карусель фотографий из прайса — как на production /
   ============================================= */
.price-carousel-container {
    position: relative;
    width: 100%;
    margin: -8px 0 0 0;
    overflow: hidden;
    background: white;
    border-radius: 0;
    padding: 0 0 4px;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.price-carousel-container.is-dragging {
    cursor: grabbing;
}

.price-carousel-container.is-dragging .price-carousel-item:hover {
    transform: none;
}

.price-carousel-container[hidden] {
    display: none !important;
}

.price-carousel-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 0 10px;
}

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

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

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

.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;
    margin: 0;
    position: relative;
    z-index: 1;
}

.price-carousel-item:hover {
    transform: scale(1.05);
    box-shadow: none;
    z-index: 10; /* Поднимаем элемент выше при hover */
}

.price-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    pointer-events: none;
}

.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); }
}

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

.gallery-grid:empty {
    display: none;
    margin: 0;
    padding: 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-item {
        width: 156px;
        height: 156px;
        border-radius: 16px;
    }

    .price-carousel {
        gap: 16px;
    }

    .price-carousel-placeholder {
        width: 156px;
        height: 156px;
        border-radius: 16px;
    }
}

/* =============================================
   Адаптивность
   ============================================= */

/* Маскот мешает на узком экране (в т.ч. desktop mode на телефоне, viewport ~980px) */
@media (max-width: 1100px), (max-width: 1280px) and (hover: none) and (pointer: coarse) {
    .collective-orders-mascot {
        display: none;
    }
}

@media (max-width: 1023px) {
    html.home-page .home-first-screen .main-nav {
        margin-bottom: 20px !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    #collective-orders .section-header--collects {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #collective-orders .section-title {
        margin-top: 0;
    }

    #collective-orders .section-subtitle--collects {
        margin-left: 0;
        max-width: 100%;
        text-align: left;
        align-items: flex-start;
    }

    /* Hero секция */
    .hero {
        padding: 0;
        position: relative;
        z-index: 1;
    }

    .hero-tagline {
        --hero-tagline-font-size: clamp(22px, 7.8vw, 36px);
        line-height: 1.05;
        margin-top: 10px;
        margin-bottom: 2px;
        padding: 0;
        width: 100%;
        max-width: 100%;
    }

    .hero-min-tier {
        width: fit-content;
        max-width: 100%;
        margin-bottom: 12px;
        overflow: visible;
    }

    .hero-typewriter__text,
    .hero-typewriter__cursor {
        font-size: clamp(12px, 3.8vw, 17px);
        line-height: 1.25;
        white-space: nowrap;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }

    .hero-actions .btn-primary.btn-lg,
    .hero-actions .btn-secondary.btn-lg {
        width: 100%;
        max-width: none;
        min-width: auto;
        justify-content: center;
        font-size: 15px;
        padding: 14px 24px;
        border-radius: 9999px;
    }

    .hero-action-stack {
        width: 100%;
        max-width: none;
    }
    
    /* Секции контента */
    .section {
        padding: 20px 14px;
        border-radius: 20px;
    }
    
    .section-header {
        margin-bottom: 16px;
    }
    
    #collective-orders .section-title {
        font-size: 18px;
        line-height: 1.15;
    }

    #gallery .section-title {
        font-size: 23px;
        line-height: 1.15;
    }

    .section-title {
        font-size: 18px;
        gap: 8px;
    }

    .title-icon {
        font-size: 20px;
    }
    
    .section-subtitle {
        font-size: 13px;
        margin-top: 10px;
    }
    
    /* Коллективные заказы — горизонтальный swipe */
    .collective-orders-grid.collective-orders-grid--mobile-scroll,
    .collective-orders-grid {
        display: flex;
        align-items: stretch;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 12px;
        padding: 10px 8px 14px;
        scroll-padding-inline: 8px;
    }

    .collective-orders-grid.collective-orders-grid--mobile-scroll::-webkit-scrollbar,
    .collective-orders-grid::-webkit-scrollbar {
        display: none;
    }

    .collective-orders-grid .collect-card {
        flex: 0 0 var(--collects-card-basis, 86%);
        scroll-snap-align: center;
        scroll-snap-stop: always;
        box-sizing: border-box;
        min-width: 0;
        min-height: 180px;
        height: auto;
        align-self: stretch;
        box-shadow: 0 6px 18px rgba(80, 60, 140, 0.28);
    }

    .collective-orders-container {
        padding: 0;
    }

    .collective-orders-indicator {
        margin-top: 4px;
        padding: 2px 0 0;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .collect-card {
        padding: 16px;
        border-radius: 16px;
    }
    
    .collect-card-content {
        gap: 12px;
        margin-bottom: 8px;
        flex: 1 1 auto;
        min-height: 0;
        align-items: stretch;
    }
    
    .collect-card-avatar {
        width: 100px;
        height: 100px;
        min-width: 100px;
        min-height: 100px;
        border-radius: 10px;
    }
    
    .collect-card-avatar img {
        width: 100px;
        height: 100px;
    }

    .collect-card-info {
        min-height: 100px;
        display: flex;
        flex-direction: column;
    }
    
    .collect-card-title {
        font-size: 16px;
        margin-bottom: 0;
        line-height: 1.3;
    }

    .collect-card-title__text {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .collect-card-meta {
        margin-top: auto;
    }
    
    .collect-card-deadlines {
        gap: 5px;
        margin-bottom: 0;
    }
    
    .deadline-item {
        font-size: 12px;
        gap: 6px;
    }
    
    .deadline-item i {
        width: 14px;
        font-size: 12px;
    }
    
    .status-badge {
        padding: 3px 10px;
        font-size: 11px;
    }
    
    .collect-card-action-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 40px;
    }
    
    .collective-orders-nav {
        display: none !important;
    }

    #gallery {
        padding: 10px 10px 6px;
    }

    #gallery .section-header {
        margin-bottom: 10px;
    }

    /* Лента работ — +30% к мобильным размерам */
    #gallery .price-carousel-container {
        width: 100%;
        margin-top: 0;
        margin-bottom: 10;
        padding: 0;
    }

    #gallery .price-carousel-wrapper {
        padding: 0 10px 10px 10px;
    }

    #gallery .price-carousel {
        padding: 5px 0;
        gap: 10px;
    }

    #gallery .price-carousel-item {
        width: clamp(156px, 44.2vw, 208px);
        height: clamp(156px, 44.2vw, 208px);
        border-radius: 16px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    }

    #gallery .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 13px;
        margin-top: 0;
    }

    #gallery .gallery-item {
        border-radius: 21px;
    }

    #gallery .gallery-item-overlay {
        padding: 16px;
    }

    #gallery .gallery-item-title {
        font-size: 18px;
    }
    
    /* Новости */
    .news-card-content {
        padding: 16px;
    }
    
    .news-card-title {
        font-size: 15px;
    }
    
    .news-card-summary {
        font-size: 13px;
    }
    
    .news-card-date {
        font-size: 11px;
    }
    
    /* Lightbox */
    .lightbox-content {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .lightbox-close {
        top: -35px;
        font-size: 20px;
    }
    
    .lightbox-image {
        max-height: 75vh;
    }
    
    .lightbox-caption {
        font-size: 13px;
        margin-top: 12px;
    }
    
    /* Footer для мобильных — см. preview-chrome.css */
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .footer-copyright {
        font-size: 11px;
        padding-top: 16px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    html.home-page .home-first-screen .main-nav {
        margin-bottom: 16px !important;
    }

    /* Nav/footer mobile — preview-chrome.css */

    .social-link {
        width: 36px;
        height: 36px;
        font-size: 16px;
        flex-shrink: 0;
    }
    
    .footer-copyright {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    /* Hero секция для маленьких экранов */
    .hero {
        padding: 0;
    }
    
    .hero-tagline {
        --hero-tagline-font-size: clamp(20px, 6vw, 32px);
        line-height: 1.05;
    }

    .hero-min-tier {
        width: fit-content;
        max-width: 100%;
        overflow: visible;
    }

    .hero-typewriter__text,
    .hero-typewriter__cursor {
        font-size: clamp(11px, 3.6vw, 16px);
    }

    .hero-actions .btn-primary.btn-lg,
    .hero-actions .btn-secondary.btn-lg {
        font-size: 14px;
        padding: 12px 20px;
    }
    
    /* Секции контента */
    .section {
        padding: 16px 12px;
        border-radius: 16px;
    }
    
    .section-title {
        font-size: 18px;
        gap: 8px;
    }
    
    .title-icon {
        font-size: 20px;
    }
    
    .section-subtitle {
        font-size: 12px;
    }
    
    /* Карточки коллектов для маленьких экранов — горизонтальный layout */
    .collective-orders-grid .collect-card {
        min-height: 158px;
    }

    .collect-card {
        padding: 14px;
        border-radius: 14px;
    }

    .collect-card-content {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 12px;
    }

    .collect-card-avatar {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
        aspect-ratio: auto;
        border-radius: 10px;
    }

    .collect-card-avatar img {
        width: 80px;
        height: 80px;
    }

    .collect-card-info {
        min-height: 80px;
    }
    
    .collect-card-title {
        font-size: 15px;
        margin-bottom: 0;
    }
    
    .collect-card-deadlines {
        gap: 4px;
        margin-bottom: 0;
    }
    
    .deadline-item {
        font-size: 11px;
        gap: 5px;
    }
    
    .deadline-item i {
        width: 13px;
        font-size: 11px;
    }
    
    .status-badge {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .collect-card-action-btn {
        padding: 10px 18px;
        font-size: 13px;
        min-height: 38px;
    }
    
    /* Карусель прайса — +30% */
    #gallery .price-carousel-item {
        width: 156px;
        height: 156px;
    }
    
    #gallery .price-carousel {
        gap: 10px;
        padding: 7px 0;
    }
    
    #gallery {
        padding-top: 13px;
    }

    #gallery .gallery-grid {
        gap: 10px;
    }

    /* Новости */
    .news-card-image {
        height: 160px;
    }
    
    .news-card-content {
        padding: 14px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .hero {
        padding: 0;
    }
    
    .hero-tagline {
        --hero-tagline-font-size: clamp(18px, 7vw, 28px);
        line-height: 1.05;
    }

    .hero-min-tier {
        width: fit-content;
        max-width: 100%;
        overflow: visible;
    }

    .hero-typewriter__text,
    .hero-typewriter__cursor {
        font-size: clamp(10px, 3.4vw, 15px);
    }

    .section {
        padding: 14px 10px;
    }
    
    .collect-card {
        padding: 12px;
        min-height: 150px;
    }
    
    #gallery .price-carousel-item {
        width: 130px;
        height: 130px;
    }
    
    #gallery {
        padding-top: 10px;
    }

    #gallery .gallery-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }
}

