/* Advertisement Popup Styles - Following exemplo.png Design */

/* Modal Base */
#advertisementModal {
    z-index: 9999;
}

#advertisementModal .modal-dialog {
    max-width: 750px;
    width: 90%;
    margin: 20vh auto 0 auto;
}

/* Advertisement Popup Container */
.advertisement-popup {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}

/* Advertisement Slide */
.advertisement-slide {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Background Image */
.advertisement-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dark Overlay */
.advertisement-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

/* Reduced Overlay quando não há botão "SAIBA MAIS" */
.advertisement-overlay.no-button-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

/* Estilo para imagem clicável da publicidade */
.advertisement-image-link {
    display: block;
    text-decoration: none !important;
    cursor: pointer;
}

.advertisement-image-link:hover {
    text-decoration: none !important;
}

/* Adiciona cursor pointer para toda a área clicável sem efeitos que possam piscar */
.advertisement-image-link,
.advertisement-image-link * {
    cursor: pointer !important;
}

/* Remove qualquer transição que possa causar flickering */
.advertisement-image-link,
.advertisement-image-link .advertisement-background,
.advertisement-image-link .advertisement-overlay {
    transition: none;
}

/* Content Container */
.advertisement-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    width: 90%;
}

/* Title */
.advertisement-title {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

/* Description */
.advertisement-description {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* "SAIBA MAIS" Button */
.advertisement-button {
    display: inline-block;
    background: #00b368;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgb(0, 179, 104);
    letter-spacing: 1px;
}

.advertisement-button:hover {
    background: #00b368;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(0, 179, 104);
    color: #ffffff;
    text-decoration: none;
}

.advertisement-button:active {
    transform: translateY(0);
}

/* Close Button */
.advertisement-close {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 10;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 300;
    opacity: 0.8;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.advertisement-close:hover {
    opacity: 1;
    color: #ffffff;
}

/* Navigation Arrows */
.advertisement-nav-prev,
.advertisement-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    color: #ffffff;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.advertisement-nav-prev {
    left: 20px;
}

.advertisement-nav-next {
    right: 20px;
}

.advertisement-nav-prev:hover,
.advertisement-nav-next:hover {
    background: rgba(38, 208, 206, 0.8);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-50%) scale(1.1);
}

/* Bootstrap Carousel Indicators Override */
#advertisementCarousel .carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    margin-bottom: 0;
    z-index: 3;
    justify-content: center;
    padding-left: 0;
    list-style: none;
    display: flex;
    gap: 8px;
}

#advertisementCarousel .carousel-indicators li {
    box-sizing: content-box;
    flex: 0 1 auto;
    width: 12px;
    height: 12px;
    margin-right: 0;
    margin-left: 0;
    text-indent: -999px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    border: none;
    transition: all 0.3s ease;
    opacity: 1;
}

#advertisementCarousel .carousel-indicators .active,
#advertisementCarousel .carousel-indicators li:hover {
    background-color: #26d0ce;
    transform: scale(1.2);
}

/* Bootstrap Carousel Controls Override */
#advertisementCarousel .carousel-control-prev,
#advertisementCarousel .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    color: #ffffff;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    opacity: 1;
}

#advertisementCarousel .carousel-control-prev {
    left: 20px;
}

#advertisementCarousel .carousel-control-next {
    right: 20px;
}

#advertisementCarousel .carousel-control-prev:hover,
#advertisementCarousel .carousel-control-next:hover {
    background: rgba(38, 208, 206, 0.8);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-50%) scale(1.1);
}

#advertisementCarousel .carousel-control-prev-icon,
#advertisementCarousel .carousel-control-next-icon {
    background-size: 20px 20px;
    width: 20px;
    height: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #advertisementModal .modal-dialog {
        width: 98%;
        margin: 10vh auto 0 auto;
    }
    
    .advertisement-slide {
        height: 220px;
    }
    
    .advertisement-background {
        background-size: contain;
    }
    
    .advertisement-title {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .advertisement-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .advertisement-button {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
    
    .advertisement-nav-prev,
    .advertisement-nav-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .advertisement-nav-prev {
        left: 10px;
    }
    
    .advertisement-nav-next {
        right: 10px;
    }
    
    .advertisement-close {
        top: 10px;
        right: 15px;
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    #advertisementModal .modal-dialog {
        width: 98%;
        margin: 5vh auto 0 auto;
    }
    
    .advertisement-slide {
        height: 180px;
    }
    
    .advertisement-background {
        background-size: contain;
    }
    
    .advertisement-title {
        font-size: 1.8rem;
    }
    
    .advertisement-description {
        font-size: 0.9rem;
        display: none; /* Hide description on very small screens */
    }
    
    .advertisement-button {
        padding: 10px 25px;
        font-size: 0.85rem;
    }
    
    #advertisementCarousel .carousel-control-prev,
    #advertisementCarousel .carousel-control-next {
        width: 35px;
        height: 35px;
    }
    
    #advertisementCarousel .carousel-control-prev {
        left: 5px;
    }
    
    #advertisementCarousel .carousel-control-next {
        right: 5px;
    }
}

/* Animation */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

/* Backdrop customization */
#advertisementModal.modal {
    background: rgba(0, 0, 0, 0.8);
}
