/* ============================================
   BANNER CAROUSEL FIX - FULL WIDTH RESPONSIVE
   Fix banner to be full width at all screen sizes
   ============================================ */

/* Remove any container constraints */
#home {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* Force container inside home to be full width */
#home .container,
#home .container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

#ppidCarousel {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.carousel-inner {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.carousel-item {
    width: 100% !important;
    height: auto;
    min-height: 400px;
    margin: 0 !important;
    padding: 0 !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Carousel Image - Full Width & Responsive */
.carousel-image {
    width: 100% !important;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    object-position: center;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix spacing after banner on mobile */
#home + section,
#home + .container,
#home + div {
    margin-top: 2rem !important;
}

@media (max-width: 768px) {
    #home + section,
    #home + .container,
    #home + div {
        margin-top: 1rem !important;
    }
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 10px;
}

/* Carousel Indicators */
.carousel-indicators {
    margin-bottom: 20px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: #ff6b00;
    border-color: #ff6b00;
}

/* Remove overflow-x from body/container */
.overflow-hidden-x {
    overflow-x: hidden !important;
    width: 100%;
}

body {
    overflow-x: hidden;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .carousel-item {
        min-height: 180px;
    }
    
    .carousel-image {
        max-height: 220px;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 30px;
        height: 30px;
        padding: 8px;
    }
    
    .carousel-indicators button {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
}

/* Mobile (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .carousel-item {
        min-height: 250px;
    }
    
    .carousel-image {
        max-height: 350px;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 35px;
        height: 35px;
    }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .carousel-item {
        min-height: 350px;
    }
    
    .carousel-image {
        max-height: 500px;
    }
}

/* Desktop (1025px - 1919px) */
@media (min-width: 1025px) and (max-width: 1919px) {
    .carousel-item {
        min-height: 400px;
    }
    
    .carousel-image {
        max-height: 600px;
    }
}

/* Large Desktop (1920x1080 and above) */
@media (min-width: 1920px) {
    #home {
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    .carousel-item {
        min-height: 600px;
        max-height: 1080px;
        width: 100vw !important;
    }
    
    .carousel-image {
        max-height: 1080px;
        min-height: 600px;
        width: 100vw !important;
        object-fit: cover;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 50px;
        height: 50px;
        padding: 12px;
    }
    
    .carousel-indicators button {
        width: 14px;
        height: 14px;
        margin: 0 6px;
    }
}

/* Ultra Wide (2560px and above) */
@media (min-width: 2560px) {
    .carousel-item {
        min-height: 600px;
        max-height: 800px;
    }
    
    .carousel-image {
        max-height: 800px;
        min-height: 600px;
    }
}

/* ============================================
   SMOOTH FADE TRANSITION (NO ENLARGING)
   Use fade instead of slide for smoother transition
   ============================================ */

/* Force fade transition to prevent any size changes */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.6s ease-in-out !important;
    transform: none !important;
    -webkit-transform: none !important;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
    transform: none !important;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 0;
    transform: none !important;
}

/* Prevent any transform/scale on all carousel items */
.carousel-item,
.carousel-item-next,
.carousel-item-prev,
.carousel-item.active,
.carousel-image {
    transform: none !important;
    -webkit-transform: none !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.carousel-control-prev:focus,
.carousel-control-next:focus {
    outline: 2px solid #ff6b00;
    outline-offset: 2px;
}

.carousel-indicators button:focus {
    outline: 2px solid #ff6b00;
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators {
        display: none !important;
    }
    
    .carousel-item {
        page-break-inside: avoid;
    }
}
