/**
 * Qiblatain Tours — Floating Elements
 * WhatsApp · Phone · Back to Top · Swiper
 */

/* ==========================================
   FLOATING ACTION BUTTONS
   ========================================== */
.floating-btns {
    position: fixed;
    bottom: 28px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 999;
}

.fab-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.35rem;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
    transition: var(--transition-smooth);
    will-change: transform;
}

.fab-btn:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.28);
    color: var(--white);
}

.fab-btn:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* WhatsApp variant */
.fab-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.fab-whatsapp:hover {
    background: linear-gradient(135deg, #20BD5A 0%, #0d7a6e 100%);
}

/* Phone variant */
.fab-phone {
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-mid) 100%);
}

.fab-phone:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--emerald);
}

/* ——— Pulse ring animations ——— */
.fab-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: -1;
    animation: fabRing 2.4s ease-out infinite;
}

.fab-pulse-wa  { background: rgba(37, 211, 102, 0.35); }
.fab-pulse-phone { background: rgba(26, 60, 52, 0.3); }

@keyframes fabRing {
    0%   { transform: scale(1); opacity: 0.8; }
    70%  { transform: scale(1.75); opacity: 0; }
    100% { transform: scale(1.75); opacity: 0; }
}

/* Second delayed ring */
.fab-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: -1;
    animation: fabRing 2.4s ease-out 1.2s infinite;
}

.fab-whatsapp::after { background: rgba(37, 211, 102, 0.2); }
.fab-phone::after    { background: rgba(26, 60, 52, 0.2); }

/* ——— Tooltip ——— */
.fab-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15,20,28,0.88);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: translateY(-50%) translateX(4px);
    font-family: var(--font-primary);
}

.fab-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(15,20,28,0.88);
    border-right: none;
}

.fab-btn:hover .fab-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    left: 24px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-mid) 100%);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(26,60,52,0.3);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

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

.back-to-top:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--emerald);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(196,150,58,0.4);
}

.back-to-top:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* ==========================================
   SWIPER CUSTOMIZATION
   ========================================== */
.swiper { max-width: 100%; overflow: hidden; }
.swiper-slide { height: auto; display: flex; }

.swiper-button-next,
.swiper-button-prev {
    width: 46px;
    height: 46px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(26,60,52,0.14);
    color: var(--emerald) !important;
    transition: var(--transition-fast);
}

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

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--emerald);
    color: var(--white) !important;
    transform: scale(1.08);
}

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

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(26,60,52,0.25);
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--emerald);
    width: 28px;
    border-radius: 5px;
}

/* Slider section overrides */
.slider-section { position: relative; }
.slider-section .swiper { overflow: visible; }
.slider-section .swiper-slide .package-card { height: 100%; margin: 0; }

/* ==========================================
   Z-INDEX STACK
   ========================================== */
.tawk-min-container { z-index: 1000 !important; }
.floating-btns      { z-index: 999 !important; }
.back-to-top        { z-index: 998 !important; }
.nav-drawer         { z-index: 1060 !important; }
.nav-drawer-overlay { z-index: 1055 !important; }
.navbar             { z-index: 950 !important; }
.topbar             { z-index: 1000 !important; }
.modal              { z-index: 1080 !important; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .floating-btns {
        bottom: 20px;
        right: 16px;
        gap: 12px;
    }

    .fab-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* Hide tooltips on mobile — they can overlap content */
    .fab-tooltip { display: none; }

    .back-to-top {
        bottom: 82px; /* above floating btns if they overlap */
        left: 16px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 38px;
        height: 38px;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after { font-size: 14px; }
}

@media (max-width: 480px) {
    .fab-btn {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .back-to-top {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* Prevent pulse animation overlapping other fixed elements */
.fab-btn { overflow: visible; }

/* Ensure Tawk.to doesn't clash on mobile */
@media (max-width: 768px) {
    .tawk-min-container { bottom: 85px !important; }
}
