/* ===================================
   GRANDSMETA SLIDER - Bitrix Component
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

/* Variables */
.grandsmeta-slider-container {
    --gs-slider-height: calc(100vw * 570 / 2560);
    --gs-transition-speed: 0.8s;
    --gs-nav-size: 60px;
    --gs-autoplay-delay: 5s;
}

/* Base Styles */
.grandsmeta-slider-container {
    position: relative;
    width: 100%;
    height: var(--gs-slider-height);
    min-height: 400px;
    max-height: 70vh;
    overflow: hidden;
    background: #0a0e27;
}

.grandsmeta-slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Slide Styles */
.grandsmeta-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1),
                opacity 0.8s ease;
}

.grandsmeta-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.grandsmeta-slide.prev {
    opacity: 0;
    transform: translateX(-100%);
    z-index: 1;
}

.grandsmeta-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay gradient for better text readability */
.grandsmeta-slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    pointer-events: none;
    z-index: 1;
}

/* Navigation Arrows */
.grandsmeta-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: var(--gs-nav-size);
    height: var(--gs-nav-size);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.grandsmeta-slider-container:hover .grandsmeta-slider-nav {
    opacity: 1;
}

.grandsmeta-slider-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.grandsmeta-slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.grandsmeta-slider-nav.prev {
    left: 30px;
}

.grandsmeta-slider-nav.next {
    right: 30px;
}

.grandsmeta-slider-nav svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

/* Indicators */
.grandsmeta-slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.grandsmeta-indicator {
    width: 50px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.grandsmeta-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

.grandsmeta-indicator.active {
    background: rgba(255, 255, 255, 0.3);
}

.grandsmeta-indicator.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #FF6B00;
    border-radius: 2px;
    animation-name: gs-progress;
    animation-duration: 5s;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes gs-progress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.grandsmeta-indicator.paused.active::after {
    animation-play-state: paused;
}

.grandsmeta-indicator.filled.active::after {
    animation: none !important;
    width: 100% !important;
}

/* Slide Button */
.grandsmeta-slide-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 32px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 6;
}

.grandsmeta-slide-btn:hover {
    background: #ffffff;
    color: #1a2744;
    border-color: #ffffff;
    text-decoration: none;
}

.grandsmeta-slide-btn:active {
    transform: scale(0.97);
}

/* Slide Content Overlay */
.grandsmeta-slide-content {
    position: absolute;
    bottom: 80px;
    left: 60px;
    z-index: 5;
    color: #ffffff !important;
    max-width: 600px;
}

.grandsmeta-slide-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #f7f7f7 !important;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.75);
}

.grandsmeta-slide-description {
    font-size: 1.2rem;
    font-weight: 400;
    color: #cfcfcf;
    opacity: 0.95;
    text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

/* ===================================
   RESPONSIVE STYLES
   =================================== */

/* Tablets */
@media (max-width: 1024px) {
    .grandsmeta-slider-nav.prev {
        left: 20px;
    }

    .grandsmeta-slider-nav.next {
        right: 20px;
    }

    .grandsmeta-slide-content {
        left: 40px;
        max-width: 500px;
    }

    .grandsmeta-slide-content h2 {
        font-size: 2.8rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .grandsmeta-slider-container {
        --gs-nav-size: 45px;
    }

    .grandsmeta-slider-nav.prev {
        left: 15px;
    }

    .grandsmeta-slider-nav.next {
        right: 15px;
    }

    .grandsmeta-slider-nav svg {
        width: 20px;
        height: 20px;
    }

    .grandsmeta-slider-indicators {
        bottom: 20px;
        gap: 8px;
    }

    .grandsmeta-indicator {
        width: 35px;
        height: 3px;
    }

    .grandsmeta-slide-content {
        left: 30px;
        bottom: 60px;
        max-width: calc(100% - 60px);
    }

    .grandsmeta-slide-content h2 {
        font-size: 2rem;
    }

    .grandsmeta-slide-description {
        font-size: 1rem;
    }

    .grandsmeta-slide-btn {
        padding: 10px 24px;
        font-size: 0.8rem;
        letter-spacing: 1.5px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .grandsmeta-slider-container {
        --gs-nav-size: 40px;
    }

    .grandsmeta-slider-nav.prev {
        left: 10px;
    }

    .grandsmeta-slider-nav.next {
        right: 10px;
    }

    .grandsmeta-slider-indicators {
        bottom: 15px;
        gap: 6px;
    }

    .grandsmeta-indicator {
        width: 30px;
    }

    .grandsmeta-slide-content {
        left: 20px;
        bottom: 50px;
        max-width: calc(100% - 40px);
    }

    .grandsmeta-slide-content h2 {
        font-size: 1.5rem;
    }

    .grandsmeta-slide-description {
        font-size: 0.9rem;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Focus styles for keyboard navigation */
.grandsmeta-slider-nav:focus,
.grandsmeta-indicator:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
}

/* Reduced motion: keep slide transitions but simplify to crossfade only */
@media (prefers-reduced-motion: reduce) {
    .grandsmeta-indicator.active::after {
        animation: none;
        width: 100%;
    }
}
