/**
 * Flexi Carousel Gallery - Main Carousel Styles
 * Flexbox-based responsive carousel with hover overlays
 */

/* Carousel Wrapper */
.fcg-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Carousel Container */
.fcg-carousel-container {
    width: 100%;
    overflow: hidden;
}

/* Carousel Track - Flexbox Container */
.fcg-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Individual Slide */
.fcg-slide {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
}

.fcg-slide-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Slide Image */
.fcg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fcg-slide:hover .fcg-image {
    transform: scale(1.08);
}

/* Overlay */
.fcg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    transition: opacity 0.3s ease;
}

.fcg-slide:hover .fcg-overlay {
    opacity: 1;
}

/* Overlay Content */
.fcg-overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    width: 100%;
}

.fcg-slide:hover .fcg-overlay-content {
    transform: translateY(0);
}

/* Title */
.fcg-title {
    margin: 0 0 8px 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Caption */
.fcg-caption {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* View Large Button */
.fcg-view-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.fcg-view-large:hover {
    background-color: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.fcg-view-large i {
    font-size: 14px;
}

/* Navigation Arrows */
.fcg-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
    padding: 0;
}

.fcg-carousel-wrapper:hover .fcg-arrow {
    opacity: 1;
}

.fcg-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.fcg-arrow:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.fcg-arrow svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.fcg-arrow-prev {
    left: 15px;
}

.fcg-arrow-next {
    right: 15px;
}

.fcg-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Navigation Dots */
.fcg-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
}

.fcg-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.fcg-dot:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.fcg-dot.active {
    background-color: #000000;
    transform: scale(1.2);
}

.fcg-dot:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Touch/Drag State */
.fcg-carousel-wrapper.is-dragging .fcg-carousel-track {
    transition: none;
}

.fcg-carousel-wrapper.is-dragging .fcg-slide {
    cursor: grabbing;
}

.fcg-carousel-wrapper.is-dragging .fcg-image {
    pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .fcg-arrow {
        width: 44px;
        height: 44px;
    }

    .fcg-arrow svg {
        width: 20px;
        height: 20px;
    }

    .fcg-arrow-prev {
        left: 10px;
    }

    .fcg-arrow-next {
        right: 10px;
    }

    .fcg-title {
        font-size: 16px;
    }

    .fcg-caption {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .fcg-arrow {
        width: 40px;
        height: 40px;
        opacity: 1;
    }

    .fcg-arrow svg {
        width: 18px;
        height: 18px;
    }

    .fcg-arrow-prev {
        left: 8px;
    }

    .fcg-arrow-next {
        right: 8px;
    }

    .fcg-overlay {
        padding: 15px;
    }

    .fcg-title {
        font-size: 15px;
    }

    .fcg-caption {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .fcg-view-large {
        padding: 8px 16px;
        font-size: 12px;
    }

    .fcg-dots {
        padding: 15px 0;
    }

    .fcg-dot {
        width: 10px;
        height: 10px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .fcg-carousel-track,
    .fcg-image,
    .fcg-overlay,
    .fcg-overlay-content,
    .fcg-arrow,
    .fcg-dot,
    .fcg-view-large {
        transition: none;
    }

    .fcg-slide:hover .fcg-image {
        transform: none;
    }
}

/* RTL Support */
[dir="rtl"] .fcg-arrow-prev {
    left: auto;
    right: 15px;
}

[dir="rtl"] .fcg-arrow-next {
    right: auto;
    left: 15px;
}

[dir="rtl"] .fcg-arrow-prev svg {
    transform: rotate(180deg);
}

[dir="rtl"] .fcg-arrow-next svg {
    transform: rotate(180deg);
}
