/* -----------------------------
   iPhone Safari Safe-Area Fix
------------------------------ */
.header-middle {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

@supports (padding: env(safe-area-inset-top)) {
    .header-middle {
        padding-top: env(safe-area-inset-top, 0) !important;
    }
}

/* -----------------------------
   Header Wrapper Alignment Fix
------------------------------ */
.header-middle .header-wrapper {
    min-height: 60px !important;
    align-items: center !important;
    display: flex !important;
}

/* -----------------------------
   Logo Size Fix
------------------------------ */
.header-middle img {
    max-height: 60px !important;
    height: auto !important;
    width: auto !important;
}

/* -----------------------------
   Search Button Mobile Fix
------------------------------ */
.header-search-btn {
    padding: 0 10px !important;
    margin-left: auto !important;
}

/* -----------------------------
   Mobile (iPhone, Android)
------------------------------ */
@media (max-width: 768px) {

    .header-middle {
        padding-top: env(safe-area-inset-top, 8px) !important;
    }

    .header-middle .header-wrapper {
        min-height: 55px !important;
        padding: 5px 0 !important;
    }

    .header-middle img {
        max-height: 45px !important;
    }
}

/* -----------------------------
   Extra Fix for Safari Rendering Delay
------------------------------ */
@supports (-webkit-touch-callout: none) {
    .header-middle {
        transform: translateZ(0);
        will-change: transform;
    }
}

   /* Floating container */
.social-floating {
    position: fixed;
    bottom: 25px;
    right: 8px;
    z-index: 999999;
}

/* Main Button */
.social-main-btn {
    background: #f3532b;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0px 5px 20px rgba(0,0,0,0.3);
    transition: 0.3s ease;
}

.social-main-btn:hover {
    transform: scale(1.1);
}

/* Popup icons container */
.social-icons-popup {
    position: absolute;
    bottom: 70px;
    display: flex;
    flex-direction: column;
    gap: 12px;

    /* By default visible */
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: 0.4s ease;
}

/* Toggle hide */
.social-icons-popup.hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Icon bubble */
.social-icons-popup .icon {
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: #f3532b;
    box-shadow: 0px 5px 20px rgba(0,0,0,0.2);
    transition: 0.3s ease;
}

.social-icons-popup .icon:hover {
    transform: scale(1.15);
    background: #ffe0d8;
}
/* -------------------------------------------------
   🔥 SAFE AREA FIX (iPhone & all modern devices)
------------------------------------------------- */
@media (max-width: 991px) {

    .social-floating {
        bottom: calc(80px + env(safe-area-inset-bottom));
        /* Bottom menu height (60px) + gap (30px) */
    }

    .social-icons-popup {
        bottom: calc(130px + env(safe-area-inset-bottom));
    }
}

/* Ultra small phones */
@media (max-width: 480px) {

    .social-floating {
        bottom: calc(115px + env(safe-area-inset-bottom));
    }

    .social-icons-popup {
        bottom: calc(55px + env(safe-area-inset-bottom));
    }
}

/* -------------------------------------------------
     🔥 MOBILE RESPONSIVE
------------------------------------------------- */
@media (max-width: 480px) {

    .social-main-btn {
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    .social-icons-popup .icon {
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    .social-icons-popup {
        gap: 10px;
    }
}

/* Small phones */
@media (max-width: 360px) {

    .social-main-btn {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .social-icons-popup .icon {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
}
