/* Floating Elements - Back to Top, Swiper Customization, Z-Index Management */

/* ============================================
   FLOATING ACTION BUTTONS (WhatsApp, Phone)
   ============================================ */
.floating-buttons-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column-reverse; /* Stack from bottom to top */
    gap: 15px;
    z-index: 999;
}

.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    animation: float 3s ease-in-out infinite;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

.fab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fab:hover::before {
    opacity: 1;
}

.fab:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.fab i {
    position: relative;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

.fab-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.fab-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
}

.fab-phone {
    background: linear-gradient(135deg, var(--primary-gold), #8B5A1C);
}

.fab-phone:hover {
    background: linear-gradient(135deg, #8B5A1C, var(--primary-gold));
}

/* Tooltip on hover */
.fab::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 75px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-weight: 500;
    z-index: 10;
}

.fab:hover::after {
    opacity: 1;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-gold, #B87333), var(--light-gold, #D4AF37));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(184, 115, 51, 0.35);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 35px rgba(184, 115, 51, 0.45);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

/* Swiper Slider Customization */
.swiper {
    padding: 20px 0 60px;
    max-width: 100%;
    overflow: hidden;
}

.swiper-slide {
    height: auto;
    display: flex;
}

.swiper-button-next,
.swiper-button-prev {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: var(--primary-gold, #B87333) !important;
    transition: all 0.3s ease;
}

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

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary-gold, #B87333);
    color: white !important;
    transform: scale(1.1);
}

.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(184, 115, 51, 0.3);
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--primary-gold, #B87333);
    width: 30px;
    border-radius: 6px;
}

/* Slider Section Styling */
.slider-section {
    position: relative;
}

.slider-section .swiper {
    overflow: visible;
}

/* Z-Index Management - Critical for proper layering */
/* Highest to Lowest Priority */
.tawk-min-container {
    z-index: 1000 !important; /* Tawk.to chat widget - highest */
}

.floating-buttons-container {
    z-index: 999 !important; /* WhatsApp/Phone buttons - bottom left */
}

.back-to-top {
    z-index: 998 !important; /* Back to top - right side */
}

.swiper-button-next,
.swiper-button-prev,
.swiper-pagination {
    z-index: 100 !important; /* Slider controls */
}

.navbar {
    z-index: 900 !important; /* Navigation bar */
}

.modal {
    z-index: 1050 !important; /* Modals above everything */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 90px; /* Move up to avoid overlap with floating buttons on mobile */
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 16px;
    }
}

/* Mobile Responsive - Floating Buttons */
@media (max-width: 768px) {
    .floating-buttons-container {
        bottom: 20px;
        left: 20px;
        gap: 12px;
    }
    
    .fab {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .fab::after {
        left: 65px;
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .fab:hover {
        transform: scale(1.1) translateY(-3px);
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .floating-buttons-container {
        bottom: 15px;
        left: 15px;
        gap: 10px;
    }
    
    .fab {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .fab::after {
        display: none; /* Hide tooltips on very small screens */
    }
}

/* Ensure Tawk.to widget doesn't overlap with other elements */
@media (max-width: 768px) {
    .tawk-min-container {
        bottom: 90px !important; /* Move up on mobile */
    }
}

/* Smooth transitions for all floating elements */
.back-to-top,
.floating-buttons-container .fab {
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
