/**
 * Akdeniz Slider CSS
 * Optimized for performance and specific aspect ratios.
 */

.akdeniz-slider-container {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    /* Desktop Aspect Ratio 16:5 */
    aspect-ratio: 16 / 5;
    background-color: #f0f0f0; /* Placeholder color before load */
    content-visibility: auto; /* Browser optimization */
    contain: layout paint;
}

.akdeniz-slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform; /* Hint to browser for smoother animation */
}

.akdeniz-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.akdeniz-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Ensure picture tag behaves as a block container */
/* Ensure picture tag behaves as a block container */
.akdeniz-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.akdeniz-slide-img {
    width: 100%;
    height: 100%;
    max-width: 100%; /* Force constraint */
    max-height: 100%; /* Force constraint */
    object-fit: cover; /* Ensures image fills the area without distortion */
    display: block;
}

/* Caption Overlay */
.akdeniz-slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: center;
    z-index: 5;
    pointer-events: none; /* Let clicks pass through to the link */
}

.akdeniz-caption {
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    display: inline-block;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    backdrop-filter: blur(2px);
}

/* Navigation Arrows */
.akdeniz-slider-prev,
.akdeniz-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.akdeniz-slider-prev:hover,
.akdeniz-slider-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.akdeniz-slider-prev {
    left: 10px;
}

.akdeniz-slider-next {
    right: 10px;
}

/* Dots Navigation */
.akdeniz-slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.akdeniz-slider-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.akdeniz-slider-dot.active {
    background-color: white;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .akdeniz-slider-container {
        /* Mobile Aspect Ratio 1:1 */
        aspect-ratio: 1 / 1;
    }

    .akdeniz-slider-prev,
    .akdeniz-slider-next {
        padding: 5px 10px;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .akdeniz-caption {
        font-size: 16px;
        padding: 10px;
        width: 90%;
    }
}
