/**
 * ==============================================================================
 * AL-ESRAA UNIVERSITY - ULTRA-PREMIUM SKELETON LOADING ENGINE
 * نظام الشاشة الهيكلية ذات الوميض التفاعلي المتطور (Skeleton Shimmer Screen)
 * ==============================================================================
 */

/* 1. Global Skeleton Screen Container (Fixed Overlay) */
#alrPageSkeleton {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    z-index: 99999999;
    overflow-y: hidden;
    overflow-x: hidden;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
}

#alrPageSkeleton.skeleton-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 2. Shimmer Keyframe & Wave Effect */
@keyframes alrSkeletonWave {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.sk-shimmer {
    background: linear-gradient(
        90deg, 
        rgba(226, 232, 240, 0.65) 0%, 
        rgba(241, 245, 249, 0.95) 45%, 
        rgba(226, 232, 240, 0.65) 100%
    );
    background-size: 250% 100%;
    animation: alrSkeletonWave 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    position: relative;
    overflow: hidden;
}

/* Darker Shimmer for Hero & Royal Navy Sections */
.sk-shimmer-dark {
    background: linear-gradient(
        90deg, 
        rgba(15, 23, 42, 0.92) 0%, 
        rgba(30, 41, 59, 0.96) 50%, 
        rgba(15, 23, 42, 0.92) 100%
    );
    background-size: 250% 100%;
    animation: alrSkeletonWave 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.sk-shimmer-subtle-white {
    background: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0.08) 0%, 
        rgba(255, 255, 255, 0.18) 50%, 
        rgba(255, 255, 255, 0.08) 100%
    );
    background-size: 250% 100%;
    animation: alrSkeletonWave 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* 3. Skeleton Atomic Primitives */
.sk-box {
    border-radius: 8px;
    display: inline-block;
}

.sk-pill {
    border-radius: 50px;
}

.sk-circle {
    border-radius: 50%;
}

.sk-line {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* 4. Skeleton Navbar Wireframe */
.sk-navbar {
    background: #081a32;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    height: 72px;
    display: flex;
    align-items: center;
}

.sk-brand-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.sk-brand-text {
    width: 140px;
    height: 20px;
}

.sk-brand-sub {
    width: 90px;
    height: 10px;
    margin-top: 5px;
}

.sk-nav-link-pill {
    width: 65px;
    height: 16px;
    margin: 0 8px;
}

.sk-search-pill {
    width: 110px;
    height: 36px;
}

.sk-login-pill {
    width: 90px;
    height: 36px;
}

/* 5. Skeleton Hero Slider Banner (Home) */
.sk-hero-banner {
    height: 380px;
    display: flex;
    align-items: center;
    position: relative;
    border-bottom: 2px solid rgba(12, 52, 104, 0.06);
}

.sk-hero-badge {
    width: 130px;
    height: 24px;
    margin-bottom: 18px;
}

.sk-hero-title-lg {
    width: 75%;
    max-width: 520px;
    height: 38px;
    margin-bottom: 16px;
}

.sk-hero-title-sub {
    width: 60%;
    max-width: 420px;
    height: 22px;
    margin-bottom: 20px;
}

.sk-hero-desc {
    width: 85%;
    max-width: 560px;
    height: 14px;
    margin-bottom: 8px;
}

.sk-hero-btn {
    width: 140px;
    height: 44px;
}

/* 6. Skeleton Subpage Banner (Inner Pages) */
.sk-inner-banner {
    background: linear-gradient(135deg, #091a33 0%, #0d284f 100%);
    padding: 40px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.sk-breadcrumb-pill {
    width: 180px;
    height: 16px;
    margin-bottom: 14px;
}

.sk-page-title {
    width: 320px;
    height: 32px;
    margin-bottom: 10px;
}

.sk-page-desc {
    width: 460px;
    height: 14px;
}

/* 7. Skeleton Cards & Grid Layouts */
.sk-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 22px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    height: calc(100% - 24px);
}

.sk-card-thumb {
    width: 100%;
    height: 170px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.sk-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.sk-card-title {
    width: 70%;
    height: 18px;
    margin-bottom: 12px;
}

.sk-card-action {
    width: 100px;
    height: 32px;
    margin-top: 15px;
}

/* 8. Skeleton Stats Strip */
.sk-stat-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.sk-stat-num {
    width: 90px;
    height: 30px;
    margin: 0 auto 8px;
}

.sk-stat-label {
    width: 110px;
    height: 12px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .sk-nav-links-wrap {
        display: none !important;
    }
    .sk-hero-banner {
        height: 310px;
    }
    .sk-hero-title-lg {
        width: 90%;
        height: 28px;
    }
}

@media (max-width: 575.98px) {
    .sk-hero-banner {
        height: 270px;
    }
    .sk-hero-btn {
        width: 115px;
        height: 38px;
    }
    .sk-navbar {
        height: 64px;
    }
    .sk-brand-text {
        width: 110px;
    }
}
