/* Banner Responsive CSS for Vasavi Public School */

/* Base Banner Styles */
.swiper {
    width: 100%;
    height: 70vh;
    min-height: 300px;
    max-height: 600px;
    position: relative;
    overflow: hidden;
}

.swiper-slide {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.6);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
}

/* Large Desktop (1200px and up) */
@media only screen and (min-width: 1200px) {
    .swiper {
        height: 85vh;
        max-height: 750px;
    }
    
    .swiper-slide {
        background-size: 100% 100%;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 60px;
        height: 60px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 24px;
    }
}

/* Desktop (992px to 1199px) */
@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .swiper {
        height: 75vh;
        max-height: 650px;
    }
    
    .swiper-slide {
        background-size: 100% 100%;
    }
}

/* Tablet Landscape (768px to 991px) */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    .swiper {
        height: 65vh;
        min-height: 250px;
        max-height: 550px;
    }
    
    .swiper-slide {
        background-size: 100% 100%;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 45px;
        height: 45px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 18px;
    }
}

/* Tablet Portrait (600px to 767px) */
@media only screen and (min-width: 600px) and (max-width: 767px) {
    .swiper {
        height: 55vh;
        min-height: 200px;
        max-height: 450px;
    }
    
    .swiper-slide {
        background-size: 100% 100%;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 16px;
    }
}

/* Mobile Landscape (480px to 599px) */
@media only screen and (min-width: 480px) and (max-width: 599px) {
    .swiper {
        height: 50vh;
        min-height: 180px;
        max-height: 400px;
    }
    
    .swiper-slide {
        background-size: 100% 100%;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px;
    }
}

/* Mobile Portrait (320px to 479px) */
@media only screen and (min-width: 320px) and (max-width: 479px) {
    .swiper {
        height: 45vh;
        min-height: 150px;
        max-height: 350px;
    }
    
    .swiper-slide {
        background-size: 100% 100%;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 12px;
    }
}

/* Small Mobile (up to 319px) */
@media only screen and (max-width: 319px) {
    .swiper {
        height: 40vh;
        min-height: 120px;
        max-height: 300px;
    }
    
    .swiper-slide {
        background-size: 100% 100%;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 25px;
        height: 25px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 10px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .swiper-button-next,
    .swiper-button-prev {
        background: rgba(0, 0, 0, 0.5);
        padding: 10px;
    }
    
    .swiper-button-next:hover,
    .swiper-button-prev:hover {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .swiper-slide {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Banner loading animation */
.swiper-slide {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Ensure banner is always above other content */
.swiper {
    position: relative;
    z-index: 1;
}

/* Prevent banner from being cut off on small devices */
@media only screen and (max-height: 500px) {
    .swiper {
        height: 250px;
        min-height: 150px;
    }
    
    .swiper-slide {
        background-size: 100% 100%;
    }
}

/* Text overlay and content positioning */
.swiper-slide-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    z-index: 10;
    box-sizing: border-box;
}

.swiper-slide-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.swiper-slide-content p {
    margin: 0;
    font-size: 1em;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive text sizing */
@media only screen and (max-width: 767px) {
    .swiper-slide-content {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 10px;
    }
    
    .swiper-slide-content h3 {
        font-size: 1.2em;
    }
    
    .swiper-slide-content p {
        font-size: 0.9em;
    }
}

@media only screen and (max-width: 479px) {
    .swiper-slide-content {
        bottom: 5px;
        left: 5px;
        right: 5px;
        padding: 8px;
    }
    
    .swiper-slide-content h3 {
        font-size: 1em;
    }
    
    .swiper-slide-content p {
        font-size: 0.8em;
    }
}
