/* Patana News Carousel Styles */
.mam-articles-wrapper {
    position: relative;
}

.mam-articles-loop {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mam-articles-wrapper.loaded .mam-articles-loop {
    opacity: 1;
    visibility: visible;
}

/* Loader Overlay */
.mam-articles-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.mam-articles-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Spinner */
.mam-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #002755;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hide carousel content while loading */
.mam-articles-loop.loading .slick-slide {
    visibility: hidden;
}

.mam-articles-loop.loading .slick-prev,
.mam-articles-loop.loading .slick-next {
    display: none !important;
}

.mam-articles-loop .slick-arrow:before {
    display: none !important;
}

/* Navigation Arrows */
.mam-articles-loop .slick-prev,
.mam-articles-loop .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mam-articles-loop .slick-prev:hover,
.mam-articles-loop .slick-next:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.mam-articles-loop .slick-prev {
    left: 20px;
}

.mam-articles-loop .slick-next {
    right: 20px;
}

/* Sticky positioning for arrows */
@media (min-width: 768px) {
    .mam-articles-loop .slick-prev,
    .mam-articles-loop .slick-next {
        position: fixed;
        top: 50%;
        z-index: 1001;
    }
    
    .mam-articles-loop .slick-prev {
        left: 30px;
    }
    
    .mam-articles-loop .slick-next {
        right: 30px;
    }
}

/* Mobile swipe indicator */
.mam-articles-loop::after {
    content: "← Swipe →";
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0.8;
    animation: swipeHint 2s ease-in-out infinite;
    z-index: 999;
}

@keyframes swipeHint {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

/* Hide swipe indicator on larger screens */
@media (min-width: 768px) {
    .mam-articles-loop::after {
        display: none;
    }
}

/* Hide swipe indicator after timeout */
.mam-articles-loop.hide-swipe-indicator::after {
    display: none;
}

/* Hide arrows on mobile */
@media (max-width: 767px) {
    .mam-articles-loop .slick-prev,
    .mam-articles-loop .slick-next {
        display: none !important;
    }
}

/* Arrow pulse animation to draw attention */
@keyframes arrowPulse {
    0%, 100% { 
        background: rgba(0, 0, 0, 0.7);
        transform: translateY(-50%) scale(1);
    }
    50% { 
        background: rgba(0, 0, 0, 0.8);
        transform: translateY(-50%) scale(1.05);
    }
}

.mam-articles-loop .slick-prev,
.mam-articles-loop .slick-next {
    animation: arrowPulse 3s ease-in-out infinite;
}

.mam-articles-loop .slick-prev:hover,
.mam-articles-loop .slick-next:hover {
    animation: none;
}

/* Ensure arrows are visible on touch devices */
@media (hover: none) and (pointer: coarse) {
    .mam-articles-loop .slick-prev,
    .mam-articles-loop .slick-next {
        background: rgba(0, 0, 0, 0.8);
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    }
}