/**
 * Spotlight Carousel Styles
 * 
 * @package Salisbury_Academy_Tools
 */

.sa-spotlight-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}

/* Slides Container */
.sa-spotlight-slides {
    position: relative;
    width: 100%;
    min-height: 400px;
}

.sa-spotlight-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    pointer-events: none;
}

.sa-spotlight-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 1;
    pointer-events: auto;
}

/* Slide Link */
.sa-spotlight-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    transform: none !important;
}

.sa-spotlight-link:hover {
    text-decoration: none !important;
    transform: none !important;
}

/* Image */
.sa-spotlight-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f5f5f5;
}

.sa-spotlight-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content */
.sa-spotlight-content {
    padding: 2rem;
    background: #F2F6FC;
}

.sa-spotlight-title {
    margin: 0 0 1rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: #002678;
    line-height: 1.3;
    text-decoration: none !important;
}

.sa-spotlight-text {
    color: #212529;
    line-height: 1.6;
    font-size: 1rem;
    text-decoration: none !important;
}

.sa-spotlight-text a {
    text-decoration: underline !important;
    color: #002678;
}

.sa-spotlight-text a:hover {
    color: #001a5c;
}

.sa-spotlight-text p {
    margin: 0 0 1rem;
}

.sa-spotlight-text p:last-child {
    margin-bottom: 0;
}

/* Navigation Arrows */
.sa-spotlight-nav {
    position: absolute !important;
    top: calc(50% - 24px);
    background: rgba(0, 38, 120, 0.8);
    color: #fff !important;
    border: none !important;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 48px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    will-change: background;
    text-decoration: none !important;
    box-shadow: none !important;
}

.sa-spotlight-nav:hover {
    background: #002678 !important;
}

.sa-spotlight-nav:active {
    background: #001a5c !important;
}

.sa-spotlight-nav:focus {
    outline: none !important;
}

.sa-spotlight-prev {
    left: 1rem;
}

.sa-spotlight-next {
    right: 1rem;
}

/* Indicators */
.sa-spotlight-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.sa-spotlight-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(0, 38, 120, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.sa-spotlight-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: #002678;
}

.sa-spotlight-indicator.active {
    background: #002678;
    border-color: #002678;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .sa-spotlight-content {
        padding: 1.5rem;
    }

    .sa-spotlight-title {
        font-size: 1.5rem;
    }

    .sa-spotlight-text {
        font-size: 0.9375rem;
    }

    .sa-spotlight-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .sa-spotlight-prev {
        left: 0.5rem;
    }

    .sa-spotlight-next {
        right: 0.5rem;
    }
}

@media (max-width: 576px) {
    .sa-spotlight-content {
        padding: 1rem;
    }

    .sa-spotlight-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .sa-spotlight-text {
        font-size: 0.875rem;
    }

    .sa-spotlight-nav {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }

    .sa-spotlight-indicators {
        bottom: 0.5rem;
    }

    .sa-spotlight-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Loading State */
.sa-spotlight-carousel.loading .sa-spotlight-slide {
    opacity: 0.5;
}

/* No Image State */
.sa-spotlight-slide:not(:has(.sa-spotlight-image)) .sa-spotlight-content {
    background: #fff;
}
