/* ==========================================
   Preloader Fullscreen Overlay
   ========================================== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.6); /* Transparent White Mask */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    /* Smooth transition shifting rightward while fading out */
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform, visibility;
}

/* Right-Fade Dismissal State (Optimized for all viewports) */
.loader-overlay.loader-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(100vw); /* Slides cleanly off the viewport bounds */
}

/* ==========================================
   Minimalist Card Wrapper
   ========================================== */
.loader-card {
    background: rgba(255, 255, 255, 0.85); /* Transparent Card Layer */
    border: 1px solid rgba(241, 245, 249, 0.5);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    width: auto;
    max-width: 90%; /* Prevents breaking edge boundaries on tiny displays */
}

/* ==========================================
   Spinner Sub-System
   ========================================== */
.loader-spinner-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-spinner-ring {
    width: 100%;
    height: 100%;
    border: 3px solid #f59e0b;
    border-top: 3px solid #3b82f6; /* Accent Blue */
    border-right: 3px solid #3b82f6;
    border-radius: 50%;
    animation: loader-spin 0.7s infinite linear;
    will-change: transform;
}

@keyframes loader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   Typography Framework
   ========================================== */
.loader-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #3d67ac; /* Deep slate contrast */
}

.brand-sub {
    font-size: 0.725rem;
    color: #64748b; /* Muted subtext gray */
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ==========================================
   Responsive Adaptations (Mobile viewports)
   ========================================== */
@media (max-width: 576px) {
    .loader-card {
        padding: 1.5rem 2rem; /* Shrunk padding to save screen estate */
        gap: 1rem;
        border-radius: 12px;
    }

    .loader-spinner-wrapper {
        width: 40px; /* Scaled down the container slightly */
        height: 40px;
    }
    
    .loader-spinner-ring {
        border-width: 2.5px; /* Thinner border for cleaner presentation */
    }

    .brand-name {
        font-size: 1rem; /* Micro sizing adjustment */
        letter-spacing: 0.15em;
    }

    .brand-sub {
        font-size: 0.65rem;
    }
}
/* -----------------Header start  */
 .header-royal {
        position: fixed;
        top: 0; left: 0; width: 100%; z-index: 1000;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
        padding: 8px 0;
        transition: all 0.3s ease-in-out;
    }

    .header-container {
        display: flex; align-items: center; justify-content: space-between;
        max-width: 1240px; margin: 0 auto; padding: 0 16px;
        gap: 15px;
    }

    /* Logo Wrapper Base Styles */
    .logo-wrapper { 
        display: flex; 
        align-items: center; 
        transition: opacity 0.3s ease, transform 0.3s ease, max-width 0.3s ease;
        max-width: 200px;
        opacity: 1;
        overflow: hidden;
    }
    .header-logo { height: 50px; width: auto; object-fit: contain; }
    .header-logo-mobile { display: none; }
    .header-logo-desktop { width: 100% !important; height: 60px !important; }

    /* Search & Filter Bar Styling */
    .header-search-filter {
        display: none;
        align-items: center;
        gap: 12px;
        flex-grow: 1;
        transition: all 0.3s ease-in-out;
    }

    .search-input-group {
        position: relative;
        flex: 1;
        display: flex;
        align-items: center;
    }

    .search-input-group i.fa-magnifying-glass {
        position: absolute;
        left: 14px;
        z-index: 2;
        pointer-events: none;
    }

    .search-input-group .result {
        display: none;
        top: calc(100% + 6px);
        left: 0;
        background: #ffffff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        max-height: 280px;
        overflow-y: auto;
        border-radius: 10px;
        position: absolute;
        width: 100%;
        z-index: 10000 !important;
    }

    .search-input-group .result p {
        padding: 10px 14px;
        margin: 0;
        cursor: pointer;
        border-bottom: 1px solid #f0f0f0;
        transition: background 0.2s ease;
    }

    .search-input-group .result p:hover {
        background-color: #faf8f5;
    }

    .btn-filter {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #faf8f5;
        border: 1px solid rgba(16, 29, 22, 0.15);
        color: #101d34;
        padding: 7px 12px;
        border-radius: 8px;
        font-size: 12.5px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
    }

    .header-actions { display: flex; align-items: center; gap: 12px; }

    .contact-badge {
        display: inline-flex; align-items: center; padding: 6px 12px;
        background: #faf8f5; border: 1px solid rgba(16, 29, 22, 0.1);
        border-radius: 8px; text-decoration: none;
    }

    .contact-link {
        display: inline-flex; align-items: center; gap: 6px;
        font-family: 'Inter', sans-serif; font-size: 12.5px;
        font-weight: 600; color: #101d34; text-decoration: none;
    }

    .contact-link i { color: #b3823e; font-size: 13px; }
    .divider-line { height: 18px; width: 1px; background-color: rgba(16, 29, 52, 0.12); }

    .btn-gold {
        background-color: #b3823e; color: #fff; font-weight: 600;
        font-size: 12px; padding: 7px 14px; border-radius: 8px;
        text-decoration: none; letter-spacing: 0.03em;
    }

    .login-icon-btn {
        display: inline-flex; align-items: center; justify-content: center;
        width: 34px; height: 34px; background: #b3823e; color: #fff;
        border-radius: 8px; text-decoration: none;
    }

    /* ONLY MOBILE ADAPTATIONS & SCROLL EFFECT (<= 640px) */
    @media (max-width: 640px) {
        .header-logo-desktop, .divider-line { display: none !important; }
        .header-logo-mobile { display: block !important; height: 44px !important; width: 100% !important; }
        .contact-badge { padding: 5px 8px; }
        .contact-link span { font-size: 11px; }
        
        /* If not index page, keep header actions visible on mobile */
        <?php if ($is_index_page): ?>
        .header-actions { display: none !important; }
        <?php endif; ?>

        .btn-filter span { display: none; }
        .search-card-vf, .trust-chips, .text-center_homepage { display: none !important; }
.header-actions
{
    display: none!important;
}
        .header-search-filter {
            display: flex;
            max-width: 0;
            opacity: 0;
            visibility: hidden;
        }

        .header-royal.scrolled .logo-wrapper {
            opacity: 0;
            max-width: 0;
            transform: translateX(-20px);
            pointer-events: none;
        }

        .header-royal.scrolled .header-search-filter {
            max-width: 100%;
            opacity: 1;
            visibility: visible;
        }
    }