/**
 * Banner System Styles
 * Responsive banner display for all positions
 */

/* Hero Banner Carousel - Full Width */
.banner-carousel {
    position: relative;
    width: 100vw !important;
    height: 400px;
    overflow: hidden;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    left: 0;
    right: 0;
    border-radius: 0 !important;
    max-width: none !important;
}

/* Full width container for hero banners */
.promotional-banners-fullwidth {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative;
    left: 0;
    right: 0;
    padding: 0 !important;
    box-sizing: border-box;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    max-width: none !important;
}

/* Ensure no parent container affects the full-width banner */
.promotional-banners-fullwidth * {
    box-sizing: border-box;
}

/* Override Bootstrap container constraints - More specific selectors */
.container .promotional-banners-fullwidth,
.container-fluid .promotional-banners-fullwidth,
.container-sm .promotional-banners-fullwidth,
.container-md .promotional-banners-fullwidth,
.container-lg .promotional-banners-fullwidth,
.container-xl .promotional-banners-fullwidth,
.container-xxl .promotional-banners-fullwidth {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 0 !important;
}

/* Force full width on carousel inside containers */
.container .promotional-banners-fullwidth .banner-carousel,
.container-fluid .promotional-banners-fullwidth .banner-carousel,
.container-sm .promotional-banners-fullwidth .banner-carousel,
.container-md .promotional-banners-fullwidth .banner-carousel,
.container-lg .promotional-banners-fullwidth .banner-carousel,
.container-xl .promotional-banners-fullwidth .banner-carousel,
.container-xxl .promotional-banners-fullwidth .banner-carousel {
    width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    border-radius: 0 !important;
}

.banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: none !important;
    max-height: none !important;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.banner-text {
    text-align: center;
    color: white;
    max-width: 600px;
}

.banner-title {
    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;
}

.banner-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

/* Banner Controls */
.banner-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.banner-control {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
}

.banner-control:hover {
    background: white !important;
    transform: scale(1.1);
}

.banner-control i {
    font-size: 1.2rem;
    color: #333;
}

/* Banner Indicators */
.banner-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-indicator.active {
    background: white;
}

.banner-indicator:hover {
    transform: scale(1.2);
}

/* Sidebar Banners */
.sidebar-banner {
    margin-bottom: 1.5rem;
}

.sidebar-banner .banner-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.sidebar-banner .banner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.sidebar-banner .card-img-top {
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-banner .banner-card:hover .card-img-top {
    transform: scale(1.05);
}

.sidebar-banner .card-body {
    padding: 1rem;
}

.sidebar-banner .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.sidebar-banner .card-text {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Footer Banners */
.footer-banner .banner-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.footer-banner .banner-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.footer-banner .card-img-top {
    height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.footer-banner .banner-card:hover .card-img-top {
    transform: scale(1.05);
}

.footer-banner .card-body {
    padding: 1rem;
}

.footer-banner .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.footer-banner .card-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Popup Banners */
.banner-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.banner-popup {
    position: relative;
    background: white;
    border-radius: 15px;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    margin: 1rem;
}

.banner-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.banner-popup-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.banner-popup-content {
    cursor: pointer;
}

.banner-popup-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.banner-popup-text {
    padding: 2rem;
    text-align: center;
}

.banner-popup-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.banner-popup-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Button Styles */
.banner-card .btn,
.banner-text .btn,
.banner-popup-text .btn {
    background: linear-gradient(135deg, var(--primary-orange, #E67E22) 0%, var(--secondary-burgundy, #A93226) 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

.banner-card .btn:hover,
.banner-text .btn:hover,
.banner-popup-text .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

.banner-card .btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-carousel {
        height: 250px;
        margin-bottom: 1rem;
    }
    
    .banner-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .banner-description {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .banner-overlay {
        padding: 1rem;
    }
    
    .banner-control {
        width: 40px;
        height: 40px;
    }
    
    .banner-control i {
        font-size: 1rem;
    }
    
    .banner-popup {
        margin: 0.5rem;
        max-height: 90vh;
    }
    
    .banner-popup-image {
        height: 200px;
    }
    
    .banner-popup-text {
        padding: 1.5rem;
    }
    
    .banner-popup-text h3 {
        font-size: 1.5rem;
    }
    
    .banner-popup-text p {
        font-size: 1rem;
    }
    
    .sidebar-banner .card-img-top {
        height: 120px;
    }
    
    .footer-banner .card-img-top {
        height: 100px;
    }
}

@media (max-width: 576px) {
    .banner-carousel {
        height: 200px;
        border-radius: 5px;
    }
    
    .banner-title {
        font-size: 1.5rem;
    }
    
    .banner-description {
        font-size: 0.9rem;
    }
    
    .banner-text .btn,
    .banner-popup-text .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .banner-controls {
        padding: 0 0.5rem;
    }
    
    .banner-control {
        width: 35px;
        height: 35px;
    }
    
    .banner-indicators {
        bottom: 15px;
    }
    
    .banner-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Loading States */
.banner-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #6c757d;
}

.banner-loading i {
    font-size: 2rem;
    margin-right: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Error States */
.banner-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    color: #721c24;
    text-align: center;
    padding: 1rem;
}

.banner-error i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Accessibility */
.banner-slide:focus,
.banner-control:focus,
.banner-indicator:focus,
.banner-card:focus {
    outline: 2px solid var(--primary-orange, #E67E22);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .banner-carousel,
    .sidebar-banner,
    .footer-banner,
    .banner-popup-overlay {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .banner-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .banner-control {
        background: white;
        border: 2px solid #000;
    }
    
    .banner-indicator {
        border-color: white;
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .banner-slide,
    .banner-control,
    .banner-indicator,
    .banner-card,
    .banner-popup-overlay,
    .banner-popup {
        transition: none;
        animation: none;
    }
}
