/**
 * APM Template - Carousel/Slider Styles
 * Baseado no design do Figma
 */

/* Container principal do carrossel */
.apm-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 40px 27px;
    box-sizing: border-box;
}

.apm-carousel__container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* Slider wrapper */
.apm-carousel__slider {
    position: relative;
    width: 100%;
}

/* Esconde slides antes do Slick inicializar (evita flash) */
.apm-carousel__slider:not(.slick-initialized) .apm-carousel__slide {
    display: none;
}

.apm-carousel__slider:not(.slick-initialized) .apm-carousel__slide:first-child {
    display: block;
}

/* Cada slide */
.apm-carousel__slide {
    position: relative;
    width: 100%;
    outline: none;
}

.apm-carousel__link {
    display: block;
    width: 100%;
}

/* Imagem do slide */
.apm-carousel__image {
    width: 100%;
    height: 494px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 20px;
    opacity: 1;
}

/* Legenda/Caption do slide */
.apm-carousel__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #fff;
    border-radius: 0 0 20px 20px;
}

.apm-carousel__caption p {
    margin: 0;
    font-size: var(--apm-text-lg);
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Setas de navegação - Design circular branco */
.apm-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: var(--apm-radius-full);
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--apm-transition-slow);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.apm-carousel__arrow:hover {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.apm-carousel__arrow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(83, 56, 158, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.apm-carousel__arrow svg {
    width: 24px;
    height: 24px;
    color: var(--apm-gray-900);
}

.apm-carousel__arrow--prev {
    left: 24px;
}

.apm-carousel__arrow--next {
    right: 24px;
}

/* Dots/Indicadores de paginação */
.apm-carousel .slick-dots {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 10;
}

.apm-carousel .slick-dots li {
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
}

.apm-carousel .slick-dots li button {
    width: 32px;
    height: 4px;
    padding: 0;
    border: none;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    transition: all var(--apm-transition-slow);
}

.apm-carousel .slick-dots li button:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.apm-carousel .slick-dots li button:focus {
    outline: none;
}

.apm-carousel .slick-dots li button:before {
    display: none;
    content: none;
}

.apm-carousel .slick-dots li.slick-active button {
    background-color: #fff;
    width: 48px;
}

.apm-carousel .slick-dots li.slick-active button:before {
    display: none;
    content: none;
}

/* Estados do Slick */
.apm-carousel .slick-list {
    overflow: hidden;
    height: 494px;
}

.apm-carousel .slick-track {
    display: flex;
    align-items: center;
    height: 494px;
}

.apm-carousel .slick-slide {
    float: left;
    height: 494px;
}

.apm-carousel .slick-slide > div {
    width: 100%;
    height: 100%;
}

/* Responsividade */
@media (max-width: 1024px) {
    .apm-carousel {
        padding: 50px 20px;
    }
    
    .apm-carousel__arrow {
        width: 44px;
        height: 44px;
    }
    
    .apm-carousel__arrow--prev {
        left: 16px;
    }
    
    .apm-carousel__arrow--next {
        right: 16px;
    }
    
    .apm-carousel__image {
        height: 400px;
    }
    
    .apm-carousel .slick-list,
    .apm-carousel .slick-track,
    .apm-carousel .slick-slide {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .apm-carousel {
        padding: 40px 16px;
    }
    
    .apm-carousel__arrow {
        width: 40px;
        height: 40px;
    }
    
    .apm-carousel__arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .apm-carousel__arrow--prev {
        left: 12px;
    }
    
    .apm-carousel__arrow--next {
        right: 12px;
    }
    
    .apm-carousel__image {
        height: 320px;
        border-radius: var(--apm-radius-xl);
    }
    
    .apm-carousel .slick-list,
    .apm-carousel .slick-track,
    .apm-carousel .slick-slide {
        height: 320px;
    }
    
    .apm-carousel__caption {
        padding: 16px 20px;
        border-radius: 0 0 16px 16px;
    }
    
    .apm-carousel__caption p {
        font-size: var(--apm-text-base);
    }
    
    .apm-carousel .slick-dots {
        bottom: 16px;
        gap: 6px;
    }
    
    .apm-carousel .slick-dots li button {
        width: 24px;
        height: 3px;
    }
    
    .apm-carousel .slick-dots li.slick-active button {
        width: 36px;
    }
}

@media (max-width: 480px) {
    .apm-carousel {
        padding: 30px 12px;
    }
    
    .apm-carousel__image {
        height: 220px;
        border-radius: var(--apm-radius-lg);
    }
    
    .apm-carousel .slick-list,
    .apm-carousel .slick-track,
    .apm-carousel .slick-slide {
        height: 220px;
    }
    
    .apm-carousel__caption {
        border-radius: 0 0 12px 12px;
    }
    
    .apm-carousel .slick-dots {
        bottom: 12px;
    }
    
    .apm-carousel .slick-dots li button {
        width: 20px;
    }
    
    .apm-carousel .slick-dots li.slick-active button {
        width: 28px;
    }
}

/* Fallback quando não há JavaScript */
.no-js .apm-carousel__slider {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.no-js .apm-carousel__slide {
    display: inline-block;
    white-space: normal;
}

.no-js .apm-carousel__arrow {
    display: none;
}
