@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;500;700&display=swap');

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

html {
    overflow-x: hidden;
}

:root {
    --primary-glow: rgba(99, 102, 241, 0.5);
    --active-glow: rgba(255, 107, 53, 0.8);
    --accent-glow: rgba(34, 211, 238, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 107, 53, 0.35);
    --glass-highlight: rgba(255, 255, 255, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.interactive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 220px);
    gap: 20px;
    max-width: 1471px;
    width: 100%;
    min-width: 0;
    perspective: 1000px;
    margin-top: 50px;
}

.banner {
    grid-column: 1 / 4;
    grid-row: 1 / 3;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 
        0 25px 50px -12px rgba(0,0,0,0.5),
        inset 0 1px 1px var(--glass-highlight);
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
    max-width: 100%;
}

.banner:hover {
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 
        0 30px 60px -12px rgba(99, 102, 241, 0.3),
        inset 0 1px 1px var(--glass-highlight);
}

.slider-container.swiper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 32px;
}

.slider-track.swiper-wrapper {
    height: 100%;
}

.slide.swiper-slide {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.12);
    transition: transform 6.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

.swiper-slide-active > img {
    transform: scale(1);
}

/* === ГРАДИЕНТ: черный → коричневый → оранжевый → прозрачный (desktop) === */
.slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        105deg,
        rgba(5, 2, 0, 0.98) 0%,
        rgba(15, 6, 1, 0.98) 15%,
        rgba(50, 20, 5, 0.97) 28%,
        rgba(120, 50, 10, 0.95) 36%,
        rgba(255, 60, 5, 0.92) 44%,
        rgba(255, 100, 25, 0.55) 56%,
        rgba(255, 150, 70, 0.18) 70%,
        transparent 82%
    );
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
    grid-gap: 15px;
    padding: 48px 48px 48px 48px;
}

.slide-text {
    max-width: 520px;
    pointer-events: auto;
    font-size: 16px;
}

.slide-text h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.4em, 2.2vw, 2.4em);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,0.7), 0 0 30px rgba(100, 30, 0, 0.6);
    letter-spacing: -0.02em;
}

.slide-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.9em, 1.2vw, 1.15em);
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 14px;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 10px rgba(255, 60, 5, 0.6), 0 0 20px rgba(255, 60, 5, 0.3);
}

.slide-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.slide-list li {
    font-size: clamp(0.8em, 1.0vw, 0.95em);
    font-weight: 500;
    line-height: 1.6;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 8px rgba(0,0,0,0.6), 0 0 15px rgba(100, 30, 0, 0.4);
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.slide-list li:last-child {
    margin-bottom: 0;
}

.list-marker {
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff3c05 0%, #ff6b35 50%, #ff8c00 100%);
    margin-top: 7px;
    box-shadow: 0 0 8px rgba(255, 60, 5, 0.6);
    animation: markerPulse 2s ease-in-out infinite;
    position: relative;
}

.list-marker::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid rgba(255, 60, 5, 0.5);
    animation: markerRing 2s ease-in-out infinite;
}

@keyframes markerPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 60, 5, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 18px rgba(255, 60, 5, 0.9), 0 0 30px rgba(255, 107, 53, 0.6);
        transform: scale(1.15);
    }
}

@keyframes markerRing {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
        border-color: rgba(255, 60, 5, 0.5);
    }
    50% {
        transform: scale(1.6);
        opacity: 0;
        border-color: rgba(255, 107, 53, 0.8);
    }
}

.slide-text h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 12px;
    border-radius: 2px;
    background: linear-gradient(90deg, #ff3c05, #ff6b35, #ff8c00);
    box-shadow: 0 0 12px rgba(255, 60, 5, 0.5);
}

.swiper .slide-indicator.swiper-pagination {
    max-width: fit-content;
    position: absolute;
    bottom: 24px;
    right: 24px;
    left: auto;
    top: auto;
    width: auto;
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.indicator-dot::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: all 0.3s;
}

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

.indicator-dot.active {
    background: #fff;
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(255,255,255,0.8);
}

.indicator-dot.active::before {
    border-color: rgba(255,255,255,0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(2); opacity: 0; }
}

.small-cell {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 107, 53, 0.5);
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.4),
        0 0 40px rgba(255, 107, 53, 0.25),
        inset 0 0 20px rgba(255, 107, 53, 0.05);
    width: 96%;
    height: 96%;
    justify-self: center;
    align-self: center;
    animation: orangeGlow 3s ease-in-out infinite;
}

@keyframes orangeGlow {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(0,0,0,0.4),
            0 0 40px rgba(255, 107, 53, 0.25),
            inset 0 0 20px rgba(255, 107, 53, 0.05);
        border-color: rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(0,0,0,0.4),
            0 0 60px rgba(255, 107, 53, 0.45),
            inset 0 0 30px rgba(255, 107, 53, 0.1);
        border-color: rgba(255, 107, 53, 0.75);
    }
}

.small-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.1) 0%,
        transparent 50%,
        rgba(255,255,255,0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    pointer-events: none;
}

.small-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9) contrast(1.1);
}

.small-cell:hover {
    animation: none;
    transform: translateY(-8px) scale(1.05) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.5),
        0 0 80px rgba(255, 107, 53, 0.7),
        inset 0 0 40px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 140, 80, 1);
    z-index: 20;
}

.small-cell:hover::before {
    opacity: 1;
}

.small-cell:hover img {
    transform: scale(1.15);
    filter: brightness(1.1) contrast(1.2);
}

.small-cell.active {
    animation: none;
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.5),
        0 0 80px rgba(255, 107, 53, 0.8),
        inset 0 0 40px rgba(255, 107, 53, 0.25);
    border-color: rgba(255, 140, 80, 1);
    z-index: 20;
}

.small-cell.active img {
    transform: scale(1.1);
    filter: brightness(1.15) saturate(1.2);
}

.small-1 { grid-column: 4; grid-row: 1; }
.small-2 { grid-column: 4; grid-row: 2; }
.small-3 { grid-column: 1; grid-row: 3; }
.small-4 { grid-column: 2; grid-row: 3; }
.small-5 { grid-column: 3; grid-row: 3; }
.small-6 { grid-column: 4; grid-row: 3; }

.small-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top, 
        rgba(10, 10, 15, 0.9) 0%, 
        rgba(10, 10, 15, 0.4) 40%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
}

.small-cell:hover::after,
.small-cell.active::after {
    opacity: 1;
}

.small-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 4;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.small-label::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b35, #ffaa5c);
    transition: width 0.3s ease;
}

.small-cell:hover .small-label,
.small-cell.active .small-label {
    opacity: 1;
    transform: translateY(0);
}

.small-cell:hover .small-label::before,
.small-cell.active .small-label::before {
    width: 100%;
}

.mobile-thumbs-row.swiper {
    display: none;
}

.slide-btn,
a.slide-btn:visited,
a.slide-btn:link {
    display: inline-block;
    padding: 12px 28px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff3c05 0%, #ff6b35 50%, #ff8c00 100%);
    box-shadow: 0 4px 20px rgba(255, 60, 5, 0.5), 0 0 40px rgba(255, 107, 53, 0.3);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: btnPulse 2.5s ease-in-out infinite;
    pointer-events: auto;
    z-index: 5;
    border: none;
    cursor: pointer;
    outline: none;
}

.slide-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
    z-index: 1;
}

.slide-btn:hover::before {
    left: 100%;
}

.slide-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 30px rgba(255, 60, 5, 0.7), 0 0 60px rgba(255, 107, 53, 0.5);
}

.slide-btn:active {
    transform: translateY(-1px) scale(0.98);
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 60, 5, 0.5), 0 0 40px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 0 6px 30px rgba(255, 60, 5, 0.7), 0 0 60px rgba(255, 107, 53, 0.5);
    }
}

@media (max-width: 768px) {
    body {
        padding: 16px 12px;
        justify-content: flex-start;
        align-items: stretch;
    }

    .interactive-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
        max-width: 100%;
        width: 100%;
        min-width: 0;
        perspective: none;
        margin-top: 0;
        overflow: visible;
        margin-top: 30px;
    }

    .banner {
        width: 100%;
        max-width: 100%;
        height: 610px;
        border-radius: 20px;
        grid-column: auto !important;
        grid-row: auto !important;
        min-width: 0;
        transform-style: flat;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transition: none;
    }

    .banner:hover {
        transform: none;
        box-shadow:
            0 25px 50px -12px rgba(0,0,0,0.5),
            inset 0 1px 1px var(--glass-highlight);
    }

    .slider-container.swiper {
        border-radius: 20px;
        max-width: 100%;
        -webkit-mask-image: -webkit-radial-gradient(white, black);
    }

    .slide.swiper-slide {
        max-width: 100%;
        isolation: isolate;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .slide-overlay {
        z-index: 2;
    }

    .slide > img {
        z-index: 0;
        transition: none;
        will-change: auto;
        transform: scale(1);
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 50%;
        object-fit: cover;
        object-position: right bottom;
    }

    .swiper-slide-active > img {
        transform: scale(1);
    }

    /* === ГРАДИЕНТ: черный → коричневый → оранжевый → прозрачный (mobile) === */
    .slide-overlay {
        background: linear-gradient(
            170deg, 
            rgba(5, 2, 0, 0.98) 8.86%, 
            rgba(15, 6, 1, 0.98) 21.64%, 
            rgba(50, 20, 5, 0.97) 32.71%, 
            rgba(120, 50, 10, 0.95) 39.52%, 
            rgba(255, 60, 5, 0.92) 46.34%, 
            rgba(255, 100, 25, 0.55) 56.56%, 
            rgba(255, 150, 70, 0.18) 68.48%, 
            rgba(0, 0, 0, 0.00) 78.7%
        );
        align-items: flex-start;
        padding: 24px 20px 20px 20px;
        justify-content: flex-start;
        grid-gap: 30px;
    }

    .slide-text {
        max-width: 520px;
    }

    .slide-text h2 {
        font-size: 25px;
        margin-bottom: 15px;
    }

    .slide-subtitle {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .slide-text h2::after {
        width: 36px;
        height: 2px;
        margin-top: 15px;
    }

    .slide-list li {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 6px;
        gap: 10px;
    }

    .slide-btn {
        left: 20px;
        bottom: 24px;
        padding: 10px 20px;
        font-size: 12px;
        border-radius: 10px;
    }

    .list-marker {
        width: 6px;
        height: 6px;
        min-width: 6px;
        min-height: 6px;
        margin-top: 5px;
    }

    .slide-indicator.swiper-pagination {
        bottom: 12px;
        right: 12px;
        padding: 6px 10px;
        gap: 8px;
    }

    .indicator-dot {
        width: 8px;
        height: 8px;
    }

    .interactive-grid > .small-cell {
        display: none !important;
    }

    .mobile-thumbs-row.swiper {
        display: block;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        overflow: visible;
        padding: 2px 0 22px 0;
        min-width: 0;
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-thumbs-row .swiper-wrapper {
        align-items: center;
        touch-action: pan-x;
    }

    .mobile-thumbs-row .swiper-slide {
        width: auto;
    }

    .mobile-thumbs-row::-webkit-scrollbar {
        display: none;
    }

    .mobile-thumbs-row .small-cell {
        
        aspect-ratio: 1/1;
        border-radius: 14px;
        animation: none;
        border: 2px solid rgba(255, 107, 53, 0.4);
        box-shadow: 
            0 4px 16px rgba(0,0,0,0.3),
            0 0 20px rgba(255, 107, 53, 0.15);
        grid-column: auto !important;
        grid-row: auto !important;
        justify-self: auto;
        align-self: auto;
        flex-shrink: 0;
    }

    .mobile-thumbs-row .small-cell.active,
    .mobile-thumbs-row .swiper-slide-thumb-active {
        transform: scale(1.08);
        border-color: rgba(255, 140, 80, 1);
        box-shadow: 
            0 8px 24px rgba(0,0,0,0.4),
            0 0 40px rgba(255, 107, 53, 0.6);
    }

    .mobile-thumbs-row .small-cell::after {
        opacity: 1;
        background: linear-gradient(
            to top, 
            rgba(10, 10, 15, 0.85) 0%, 
            rgba(10, 10, 15, 0.3) 50%,
            transparent 100%
        );
    }

    .mobile-thumbs-row .small-label {
        opacity: 1;
        transform: translateY(0);
        font-size: 9px;
        bottom: 6px;
        left: 4px;
        right: 4px;
        text-align: center;
        line-height: 1.2;
    }

    .mobile-thumbs-row .small-label::before {
        display: none;
    }

    .mobile-thumbs-row .small-cell:hover {
        transform: none;
        box-shadow: 
            0 4px 16px rgba(0,0,0,0.3),
            0 0 20px rgba(255, 107, 53, 0.15);
        border-color: rgba(255, 107, 53, 0.4);
    }

    .mobile-thumbs-row .small-cell:hover img {
        transform: none;
        filter: brightness(0.9) contrast(1.1);
    }

    .mobile-thumbs-row .small-cell:hover .small-label {
        opacity: 1;
        transform: translateY(0);
    }
    .swiper .slide-indicator.swiper-pagination{
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .interactive-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 160px);
        gap: 16px;
    }

    .banner {
        grid-column: 1 / 3;
        grid-row: 1 / 3;
    }

    .slide-text h2 {
        font-size: 1.5em;
    }

    .slide-subtitle {
        font-size: 1em;
    }

    .slide-list li {
        font-size: 0.85em;
    }

    .small-1 { grid-column: 3; grid-row: 1; }
    .small-2 { grid-column: 3; grid-row: 2; }
    .small-3 { grid-column: 1; grid-row: 3; }
    .small-4 { grid-column: 2; grid-row: 3; }
    .small-5 { grid-column: 3; grid-row: 3; }
    .small-6 { grid-column: 1; grid-row: 4; }

    
}

@media (hover: none) {
    .banner:hover {
        transform: none;
        box-shadow:
            0 25px 50px -12px rgba(0,0,0,0.5),
            inset 0 1px 1px var(--glass-highlight);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


