/**
 * Carousel Styles
 * DepEd Cavite Landing Page Plugin
 */

.dclp-carousel-section {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.dclp-carousel {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.dclp-carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.dclp-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dclp-carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.dclp-carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.dclp-carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 63, 135, 0.85) 0%, rgba(220, 20, 60, 0.75) 100%);
    z-index: 1;
}

.dclp-carousel-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.dclp-carousel-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.8s ease-out;
}

.dclp-carousel-description {
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0 0 30px 0;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.8s ease-out 0.2s both;
}

/* Navigation Controls */
.dclp-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.dclp-carousel-control:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.dclp-carousel-control:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.dclp-carousel-prev {
    left: 20px;
}

.dclp-carousel-next {
    right: 20px;
}

.dclp-carousel-control-icon {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
}

/* Indicators */
.dclp-carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.dclp-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.dclp-carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dclp-carousel-indicator.active {
    background: #ffffff;
    width: 30px;
    border-radius: 6px;
}

/*
 * The landing page is often placed inside a narrow theme content wrapper.
 * Let the hero span the viewport and explicitly size its layers so generic
 * theme rules cannot leave an empty area beneath the visible slide.
 */
.dclp-landing-page .dclp-carousel-section {
    /* Break out of a theme's centred post/content column. */
    position: relative !important;
    left: 50% !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 0 0 -50vw !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Added to the shortcode's ancestor wrappers by the carousel script. */
.dclp-fullbleed-parent {
    overflow-x: visible !important;
}

.dclp-landing-page .dclp-carousel,
.dclp-landing-page .dclp-carousel-inner,
.dclp-landing-page .dclp-carousel-item,
.dclp-landing-page .dclp-carousel-image,
.dclp-landing-page .dclp-carousel-overlay {
    min-height: 420px;
}

.dclp-landing-page .dclp-carousel {
    height: clamp(420px, 35vw, 600px);
}

.dclp-landing-page .dclp-carousel-inner,
.dclp-landing-page .dclp-carousel-item,
.dclp-landing-page .dclp-carousel-image,
.dclp-landing-page .dclp-carousel-overlay {
    height: 100%;
}

.dclp-landing-page .dclp-carousel-content {
    display: block !important;
    width: min(900px, 100%);
    box-sizing: border-box;
    position: relative !important;
    z-index: 2;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Uploaded-image carousel: show the complete image without a colour overlay
   or cropped edges, and let JavaScript set the exact natural image height. */
.dclp-landing-page .dclp-carousel.dclp-carousel--auto-fit {
    height: 600px;
    background: var(--dclp-primary, #003f87);
}

.dclp-landing-page .dclp-carousel.dclp-carousel--auto-fit .dclp-carousel-inner,
.dclp-landing-page .dclp-carousel.dclp-carousel--auto-fit .dclp-carousel-item,
.dclp-landing-page .dclp-carousel.dclp-carousel--auto-fit .dclp-carousel-image,
.dclp-landing-page .dclp-carousel.dclp-carousel--auto-fit .dclp-carousel-overlay {
    min-height: 0;
}

.dclp-carousel--auto-fit .dclp-carousel-image {
    /* Fill the banner area so wide images never leave black bars. */
    object-fit: cover;
    object-position: center;
    background: var(--dclp-primary, #003f87);
}

.dclp-carousel--auto-fit .dclp-carousel-overlay,
.dclp-carousel--auto-fit .dclp-carousel-content {
    display: none !important;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dclp-carousel {
        height: 500px;
    }
    
    .dclp-carousel-title {
        font-size: 2.5rem;
    }
    
    .dclp-carousel-description {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .dclp-landing-page .dclp-carousel.dclp-carousel--auto-fit {
        height: 400px;
    }

    .dclp-landing-page .dclp-carousel,
    .dclp-landing-page .dclp-carousel-inner,
    .dclp-landing-page .dclp-carousel-item,
    .dclp-landing-page .dclp-carousel-image,
    .dclp-landing-page .dclp-carousel-overlay {
        min-height: 400px;
    }

    .dclp-carousel {
        height: 400px;
    }
    
    .dclp-carousel-title {
        font-size: 2rem;
    }
    
    .dclp-carousel-description {
        font-size: 1.1rem;
    }
    
    .dclp-carousel-control {
        width: 40px;
        height: 40px;
    }
    
    .dclp-carousel-control-icon {
        font-size: 1.5rem;
    }
    
    .dclp-carousel-prev {
        left: 10px;
    }
    
    .dclp-carousel-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .dclp-landing-page .dclp-carousel.dclp-carousel--auto-fit {
        height: 350px;
    }

    .dclp-landing-page .dclp-carousel,
    .dclp-landing-page .dclp-carousel-inner,
    .dclp-landing-page .dclp-carousel-item,
    .dclp-landing-page .dclp-carousel-image,
    .dclp-landing-page .dclp-carousel-overlay {
        min-height: 350px;
    }

    .dclp-carousel {
        height: 350px;
    }
    
    .dclp-carousel-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .dclp-carousel-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .dclp-carousel-indicators {
        bottom: 20px;
    }
    
    .dclp-carousel-indicator {
        width: 10px;
        height: 10px;
    }
    
    .dclp-carousel-indicator.active {
        width: 25px;
    }
}
