/* Banner Styles for videos and GIFs */

/* Video Banner */
.video-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Enhanced video styling for uploaded videos */
.video-container video,
.video-banner video,
.uploaded-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Makes video fill container while maintaining aspect ratio */
    background-color: #000; /* Black background for letterboxing */
    max-width: none !important; /* Override any max-width constraints */
    min-width: 100% !important; /* Ensure it's at least as wide as container */
    min-height: 100% !important; /* Ensure it's at least as tall as container */
}

/* GIF Banner */
.gif-banner {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gif-banner img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* Makes GIF fill the container */
}

/* Enhanced styles for GIFs */
.gif-container,
.slider-container .gif-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.gif-banner-image,
.slider-container .gif-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover !important; /* Makes GIF fill container properly */
    display: block;
    max-width: none !important; /* Override any max-width constraints */
}

/* Fix for uploaded videos in header banners */
.video-banner-container {
    position: relative;
    width: 100%;
    height: 500px !important; /* Fixed height */
    overflow: hidden;
    z-index: 0;
}

.uploaded-video {
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    min-width: 100% !important;
    min-height: 100% !important;
    width: auto !important;
    height: auto !important;
    z-index: 0;
    object-fit: cover !important;
}

/* Category Banner Media (for both video and GIF) */
.category-banner-media {
    max-width: 100%;
    margin: 0 auto;
}

.category-banner-media .video-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Banner Content */
.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    z-index: 1; /* Ensure content is above the video */
}

.banner-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.banner-description {
    font-size: 16px;
    margin-bottom: 15px;
}

.banner-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #ff7e00;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.banner-btn:hover {
    background: #e67200;
    color: #fff;
}

/* Video Error */
.video-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    text-align: center;
    border-radius: 4px;
}

/* Home Slider Specific Styles */
.slider-container .video-slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.slider-container .video-slider-container iframe,
.slider-container .video-slider-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Service Header & Contact Header Video/GIF Styles */
.page-title-section .video-banner-container {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    z-index: 0;
    overflow: hidden;
}

.page-title-section .slider-content {
    position: relative;
    z-index: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .banner-title {
        font-size: 20px;
    }
    
    .banner-description {
        font-size: 14px;
    }
    
    .banner-content {
        padding: 15px;
    }
    
    .slider-container .gif-container,
    .slider-container .video-slider-container,
    .gif-container,
    .video-banner-container {
        height: 350px !important;
    }
    
    .uploaded-video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

@media (max-width: 576px) {
    .banner-title {
        font-size: 18px;
    }
    
    .banner-content {
        padding: 10px;
    }
    
    .slider-container .gif-container,
    .slider-container .video-slider-container,
    .gif-container,
    .video-banner-container {
        height: 250px !important;
    }
} 