/* Top Fixed Banner Bar Styles */
.top-banner-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Full width */
    height: 80px; /* Fixed height for consistency */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: #ffffff; /* White text for better contrast */
    display: flex;
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
    z-index: 9999;  /* Highest z-index to always be on top */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 5px 15px; 
    box-sizing: border-box;
    transition: all 0.3s ease;
}


body.has-top-banner {
    padding-top: 80px !important; /* Only for top banner */
}

/* Remove navbar positioning since it's not fixed anymore */
/* #navbar-main {
    margin-top: 80px !important;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 1000;
} */

/* Ensure dropdown menus work properly */
.dropdown-menu {
    z-index: 1050 !important;
}

/* Animation on scroll */
.top-banner-bar.scrolled {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Banner Link Styling */
.top-banner-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.top-banner-link:hover {
    text-decoration: none;
    color: inherit;
    transform: scale(1.02);
}

.top-banner-link:hover .top-banner-bar {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.top-banner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center align text */
    text-align: center; /* Center align text */
    animation: fadeInUp 0.8s ease-out;
    padding: 8px 15px; /* Reduced padding for less spacing */
    height: 100%; /* Full height to match container */
    max-width: 1000px; /* Wider container for better text layout */
    margin: 0 auto; /* Center the container */
    overflow: visible; /* Ensure text is visible */
    position: relative; /* Proper positioning */
}

.top-banner-title {
    font-size: 1.2rem; /* Reduced title size */
    font-weight: 700;
    margin: 0 0 4px 0; /* Reduced spacing */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Better shadow for gradient background */
    line-height: 1.2;
    animation: slideInDown 0.6s ease-out;
    color: #ffffff; /* White color for gradient background */
    display: block; /* Ensure proper display */
}

.top-banner-subtitle {
    font-size: 0.9rem; /* Reduced subtitle size */
    font-weight: 500;
    margin: 0 0 4px 0; /* Reduced spacing */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Better shadow for gradient background */
    line-height: 1.3;
    animation: slideInDown 0.6s ease-out 0.2s both;
    color: #ffffff; /* White color for gradient background */
    display: block; /* Ensure proper display */
}

.top-banner-description {
    font-size: 0.6rem; /* Reduced description size */
    font-weight: 50;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Better shadow for gradient background */
    line-height: 1.4;
    animation: slideInDown 0.6s ease-out 0.4s both;
    color: #ffffff; /* White color for gradient background */
    max-width: 100%; /* Responsive text width */
    display: block; /* Ensure proper display */
}

.top-banner-image {
    flex: 0 0 50%; /* Half width of the banner div */
    width: 50%; /* Explicit half width */
    height: 75px; /* Full height of the banner div */
    margin: 0; /* Remove all margins for full left positioning */
    animation: fadeInRight 0.8s ease-out 0.3s both;
    order: 1; /* Move image to left side */
    background-color: #f8f9fa; /* Light background for image container */
    border-radius: 0; /* Remove border radius for full edge-to-edge */
    overflow: hidden; /* Ensure border-radius is applied */
    position: relative; /* For absolute positioning if needed */
    left: 0; /* Stick to extreme left */
}

.top-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Show complete image without cropping */
    object-position: center; /* Center the image */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.top-banner-image img:hover {
    transform: scale(1.05);
}

/* Close button */
.top-banner-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1); /* Dark background for white banner */
    border: none;
    color: #333333; /* Dark color for close button */
    font-size: 1.5rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.top-banner-close:hover {
    background: rgba(0, 0, 0, 0.2); /* Darker on hover */
    transform: scale(1.1);
}

/* Ensure navbar stays below top banner */
.navbar,
nav,
.nav,
.navbar-nav,
header nav,
.main-nav {
    z-index: 100 !important; /* Lower than top banner */
}

/* Ensure dropdown menus don't interfere */
.dropdown-menu {
    z-index: 2000 !important;
}

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

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .top-banner-bar {
        width: 100%; /* Full width on tablet */
        height: 70px; /* Consistent height for tablet */
        padding: 5px 10px; /* Adjusted padding for tablet */
        align-items: center;
        justify-content: center;
    }
    
    body.has-top-banner {
        padding-top: 70px !important; /* Only for top banner */
    }
    
    .top-banner-image {
        flex: 0 0 50%; /* Half width for tablet */
        width: 50%;
        height: 50px; /* Reduced height for tablet banner */
        margin: 0; /* Remove all margins for full left positioning */
        order: 1; /* Image on left for tablet */
        border-radius: 0; /* Remove border radius for full edge */
    }
    
    .top-banner-content {
        order: 2; /* Text on right for tablet */
        align-items: center; /* Center align for tablet */
        text-align: center; /* Center align text for tablet */
        padding: 0 10px; /* Reduced padding for tablet text */
        height: auto; /* Auto height for tablet */
    }
}

@media (max-width: 768px) {
    .top-banner-bar {
        width: 100%; /* Full width on mobile */
        height: 60px; /* Consistent height for mobile */
        padding: 5px 10px; /* Consistent padding for mobile */
        flex-direction: row; /* Keep horizontal layout for image left positioning */
        text-align: center;
        align-items: center;
        justify-content: center;
    }
    
    body.has-top-banner {
        padding-top: 60px !important; /* Only for top banner */
    }
    
    .top-banner-content {
        text-align: center; /* Keep center alignment for mobile */
        align-items: center; /* Center align for mobile */
        margin-bottom: 0;
        padding: 0 10px; /* Equal padding for mobile */
        order: 2; /* Keep text below image on mobile */
        height: auto; /* Auto height for mobile */
    }
    
    .top-banner-title {
        font-size: 0.9rem; /* Slightly larger title for mobile */
        margin-bottom: 0.1rem;
    }
    
    .top-banner-subtitle {
        font-size: 0.75rem; /* Slightly larger subtitle for mobile */
        margin-bottom: 0.1rem;
    }
    
    .top-banner-description {
        font-size: 0.65rem; /* Smaller description */
        display: none; /* Hide on mobile to save space */
    }
    
    .top-banner-image {
        flex: 0 0 50%; /* Half width for mobile */
        width: 50%;
        height: 40px; /* Reduced height for mobile banner */
        margin: 0; /* Remove all margins for full left positioning */
        order: 1; /* Keep image on left on mobile too */
        border-radius: 0; /* Remove border radius for full edge */
    }
    
    .top-banner-content {
        order: 2; /* Keep text on right on mobile too */
    }
}

@media (max-width: 480px) {
    .top-banner-bar {
        height: 50px; /* Smaller for very small screens */
        padding: 5px 10px;
    }
    
    body.has-top-banner {
        padding-top: 50px !important; /* Only for top banner */
    }
    
    .top-banner-title {
        font-size: 0.8rem;
    }
    
    .top-banner-subtitle {
        font-size: 0.7rem;
    }
    
    .top-banner-image {
        max-width: 60px;
        height: 30px;
    }
}

/* Alternative background styles */
.top-banner-bar.blue-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.top-banner-bar.green-gradient {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.top-banner-bar.purple-gradient {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.top-banner-bar.red-gradient {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
