/* Performance Optimized CSS */

/* Fix top news slider gaps - restore navigation */
.owl-carousel-2.carousel-item-3 .owl-item {
    margin: 0 4px !important;
    padding: 0 !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.owl-carousel-2.carousel-item-3 .owl-stage {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 16px !important;
}

/* Add spacing between top news items */
.owl-carousel-2.carousel-item-3 .d-flex {
    margin: 0 2px !important;
    padding: 6px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    min-width: 300px !important;
    flex-shrink: 0 !important;
}

/* Advertisers Carousel Fix - Changed to 3 items */
.carousel-item-4 .owl-stage {
    display: flex !important;
    align-items: center !important;
}

.carousel-item-4 .owl-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 33.333% !important; /* 3 items instead of 4 */
}

.carousel-item-4 .position-relative {
    height: 600px !important;
    margin: 0 3px !important; /* Add small horizontal padding */
}

.carousel-item-4 img {
    height: 600px !important; /* Match container height */
    object-fit: contain !important;
    width: 100% !important;
    margin: 0 !important; /* Remove any image margins */
}

/* Override inline styles to prevent cropping */
.carousel-item-4 .img-fluid {
    object-fit: contain !important;
    height: 600px !important;
    max-height: 600px !important;
}

.carousel-item-4 .h-100 {
    height: 100% !important;
}

/* More specific overrides for inline styles */
.owl-carousel.carousel-item-4 .position-relative img {
    object-fit: contain !important;
    height: 600px !important;
    max-height: 600px !important;
    width: 100% !important;
}

.owl-carousel.carousel-item-4 .overflow-hidden img {
    object-fit: contain !important;
    height: 600px !important;
    max-height: 600px !important;
    width: 100% !important;
}

/* Force override inline style attribute */
.owl-carousel.carousel-item-4 img[style] {
    object-fit: contain !important;
    height: 600px !important;
    max-height: 600px !important;
    width: 100% !important;
}

/* Advertiser container height increase */
.owl-carousel.carousel-item-4 {
    padding: 0 20px !important; /* Add left and right padding */
}

/* Floating Directory Button Styles */
.float-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: white;
    color: #333;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
    overflow: hidden;
    border: 3px solid rgba(0, 0, 0, 0.1);
    animation: floatPulse 3s ease-in-out infinite;
}

.float-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

.float-button:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background: white;
    border-color: rgba(0, 0, 0, 0.2);
}

.float-button img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: all 0.4s ease;
    z-index: 2;
    position: relative;
}

.float-button:hover img {
    transform: rotate(360deg) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.float-tooltip {
    position: absolute;
    left: 75px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    min-width: 200px;
    text-align: center;
    line-height: 1.3;
    pointer-events: none;
    display: block;
}

.float-button:hover .float-tooltip {
    opacity: 1 !important;
    transform: translateX(0) scale(1) !important;
    visibility: visible;
}

.float-tooltip strong {
    display: block;
    font-size: 13px;
    margin-bottom: 3px;
    font-weight: 700;
}

.float-tooltip small {
    display: block;
    font-size: 11px;
    opacity: 0.9;
    font-weight: 400;
}

@keyframes floatPulse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.5; }
    50% { transform: rotate(180deg) scale(1.1); opacity: 0.8; }
}

.float-button:active {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .float-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
    }
    
    .float-button i {
        font-size: 20px;
    }
    
    .float-button span {
        display: none;
    }
}

.float-button {
    z-index: 998 !important;
}

.make-me-sticky {
    margin-bottom: 80px;
}

.float-button:not(:hover) + .float-button {
    right: 100px;
}

/* Lazy loading placeholder */
.lazy-load {
    background: #f0f0f0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.lazy-load::before {
    content: "Loading...";
    font-size: 14px;
}
