/* ==========================================
   FLOATING ACTION BUTTONS - WhatsApp & Phone
   Professional Islamic Theme with Pulse Animation
   ========================================== */

/* Floating Buttons Container */
.floating-buttons-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column-reverse;
    gap: 30px; /* Increased from 20px for much better spacing */
    z-index: 999;
}

/* Base Button Styles */
.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    animation: floatBtn 3s ease-in-out infinite;
    cursor: pointer;
}

.fab-btn:hover {
    transform: scale(1.15) translateY(-8px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
    color: white;
}

.fab-btn i {
    position: relative;
    z-index: 2;
}

/* WhatsApp Button */
.btn-whatsapp-pulse {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.btn-whatsapp-pulse:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
}

/* Phone Button */
.btn-call-pulse {
    background: linear-gradient(135deg, #a88d5e, #e59756);
}

.btn-call-pulse:hover {
    background: linear-gradient(135deg, #664131, #a88d5e);
}

/* Pulse Border Animation */
.fab-pulse,
.btn-whatsapp-pulse-border::before,
.btn-call-pulse-border::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid;
    animation: pulseBorder 2s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* WhatsApp Pulse - Green Color Matching Button */
.btn-whatsapp-pulse-border::before {
    border-color: #25D366; /* Bright WhatsApp green */
}

/* Phone Call Pulse - Gold Color Matching Button */
.btn-call-pulse-border::before {
    border-color: #e59756; /* Light Islamic gold */
}

/* Pulse Border Animation Keyframes */
@keyframes pulseBorder {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.12);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

/* Float Animation */
@keyframes floatBtn {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Icon Pulse Animation */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.fab-btn i {
    animation: iconPulse 2s ease-in-out infinite;
}

/* Ripple Effect on Click */
.fab-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    opacity: 0;
    transition: all 0.5s ease;
}

.fab-btn:active::after {
    transform: scale(1.2);
    opacity: 1;
    transition: none;
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #664131, #a88d5e);
    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 8px 30px rgba(102, 65, 49, 0.35);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.15);
    box-shadow: 0 15px 45px rgba(168, 141, 94, 0.45);
    background: linear-gradient(135deg, #a88d5e, #e59756);
}

.back-to-top:active {
    transform: translateY(-4px) scale(1.1);
}

.back-to-top i {
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-3px);
}

/* ==========================================
   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: #a88d5e !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: linear-gradient(135deg, #a88d5e, #e59756);
    color: white !important;
    transform: scale(1.1);
}

.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(168, 141, 94, 0.3);
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: #a88d5e;
    width: 30px;
    border-radius: 6px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet */
@media (max-width: 991px) {
    .floating-buttons-container {
        bottom: 25px;
        left: 25px;
        gap: 26px; /* Increased spacing */
    }
    
    .fab-btn {
        width: 54px;
        height: 54px;
        font-size: 1.35rem;
    }
    
    .back-to-top {
        bottom: 25px;
        right: 25px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .floating-buttons-container {
        bottom: 20px;
        left: 20px;
        gap: 24px; /* Increased spacing */
    }
    
    .fab-btn {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
    }
    
    .fab-btn:hover {
        transform: scale(1.08) translateY(-4px);
    }
    
    .back-to-top {
        bottom: 120px; /* More space to avoid overlap */
        right: 20px;
        width: 46px;
        height: 46px;
        font-size: 1.05rem;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 16px;
    }
}

/* Small Mobile */
@media (max-width: 575px) {
    .floating-buttons-container {
        bottom: 15px;
        left: 15px;
        gap: 22px; /* Good spacing maintained */
    }
    
    .fab-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .back-to-top {
        bottom: 110px; /* Adjusted for button stack */
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .floating-buttons-container {
        bottom: 12px;
        left: 12px;
        gap: 20px; /* Maintained good spacing even on tiny screens */
    }
    
    .fab-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .back-to-top {
        bottom: 105px; /* Adjusted positioning */
        right: 12px;
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
    }
}

/* ==========================================
   Z-INDEX MANAGEMENT
   ========================================== */
/* Highest to Lowest Priority */
.tawk-min-container {
    z-index: 1000 !important; /* Tawk.to chat widget */
}

.modal,
.modal-backdrop {
    z-index: 1050 !important; /* Modals */
}

.floating-buttons-container {
    z-index: 999 !important; /* WhatsApp/Phone buttons */
}

.back-to-top {
    z-index: 998 !important; /* Back to top */
}

.navbar {
    z-index: 900 !important; /* Navigation bar */
}

.swiper-button-next,
.swiper-button-prev,
.swiper-pagination {
    z-index: 100 !important; /* Slider controls */
}

/* ==========================================
   ACCESSIBILITY & PERFORMANCE
   ========================================== */

/* Smooth transitions */
.back-to-top,
.fab-btn {
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Ensure buttons are always clickable */
.floating-buttons-container,
.back-to-top {
    pointer-events: auto;
}

/* Focus states for accessibility */
.fab-btn:focus,
.back-to-top:focus {
    outline: 3px solid rgba(168, 141, 94, 0.5);
    outline-offset: 3px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fab-btn,
    .back-to-top,
    .fab-btn i,
    .btn-whatsapp-pulse-border::before,
    .btn-call-pulse-border::before {
        animation: none !important;
    }
}
