/* ==========================================================================
   SUNRISE COACHING CENTRE - HIGH PERFORMANCE SKELETON LOADING SYSTEM
   ========================================================================== */

:root {
    --sk-bg-base: #f8f9fa;
    --sk-card-bg: rgba(0,0,0,0.04);
    --sk-shimmer-base: #e8eaed;
    --sk-shimmer-highlight: #f1f3f4;
    --sk-accent-glow: rgba(26,115,232,0.08);
}

/* --- BASE SHIMMER EFFECT --- */
.sk-shimmer {
    background: linear-gradient(
        90deg,
        var(--sk-shimmer-base) 0%,
        var(--sk-shimmer-highlight) 35%,
        var(--sk-accent-glow) 50%,
        var(--sk-shimmer-highlight) 65%,
        var(--sk-shimmer-base) 100%
    );
    background-size: 250% 100%;
    animation: skShimmerAnim 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    position: relative;
    overflow: hidden;
    will-change: background-position;
}

@keyframes skShimmerAnim {
    0%   { background-position: 250% 0; }
    100% { background-position: -250% 0; }
}

/* --- SKELETON WRAPPER --- */
#home-skeleton-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9998;
    background: #ffffff;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.35s ease-out, visibility 0.35s ease-out;
    opacity: 1;
    visibility: visible;
}

#home-skeleton-loader.skeleton-fadeout {
    opacity: 0;
    visibility: hidden;
}

#home-skeleton-loader.skeleton-hidden {
    display: none !important;
}

/* --- ATOMIC SKELETON ELEMENTS --- */
.sk-box {
    border-radius: 12px;
}
.sk-circle {
    border-radius: 50%;
}
.sk-pill {
    border-radius: 9999px;
}
.sk-card {
    background: var(--sk-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* --- 1. NAVBAR SKELETON --- */
.sk-nav {
    height: 70px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.sk-nav-logo {
    width: 170px;
    height: 48px;
    border-radius: 8px;
}
.sk-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}
.sk-nav-item {
    width: 75px;
    height: 18px;
    border-radius: 6px;
}
.sk-nav-cta {
    width: 140px;
    height: 40px;
    border-radius: 9999px;
}

/* --- 2. HERO BANNER SKELETON --- */
.sk-hero {
    width: 100%;
    height: 440px;
    background: #f8f9fa;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sk-hero-inner {
    width: 90%;
    max-width: 900px;
    height: 80%;
    border-radius: 20px;
}
.sk-hero-dots {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 8px;
}
.sk-hero-dot {
    width: 28px;
    height: 6px;
    border-radius: 4px;
}

/* --- 3. NOTICE TICKER SKELETON --- */
.sk-ticker {
    height: 46px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 5%;
    gap: 16px;
}
.sk-ticker-badge {
    width: 70px;
    height: 24px;
    border-radius: 6px;
}
.sk-ticker-line {
    flex: 1;
    height: 16px;
    border-radius: 6px;
}

/* --- 4. TRUST / HERO HEADLINE SKELETON --- */
.sk-trust-section {
    padding: 60px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.sk-title-line-1 {
    width: 65%;
    max-width: 600px;
    height: 38px;
    margin-bottom: 12px;
}
.sk-title-line-2 {
    width: 45%;
    max-width: 420px;
    height: 32px;
    margin-bottom: 18px;
}
.sk-sub-p {
    width: 80%;
    max-width: 700px;
    height: 18px;
    margin-bottom: 28px;
}
.sk-trust-btn {
    width: 220px;
    height: 48px;
    border-radius: 9999px;
}

/* --- 5. FEATURES CARDS SKELETON --- */
.sk-features {
    max-width: 1240px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.sk-feature-card {
    background: var(--sk-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.sk-feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}
.sk-feature-title {
    width: 140px;
    height: 20px;
    border-radius: 6px;
}
.sk-feature-badge {
    width: 60px;
    height: 18px;
    border-radius: 9999px;
}

/* --- 6. COURSES SECTION SKELETON --- */
.sk-courses {
    max-width: 1240px;
    margin: 60px auto;
    padding: 0 20px;
}
.sk-section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 36px;
    gap: 10px;
}
.sk-section-title {
    width: 220px;
    height: 32px;
    border-radius: 8px;
}
.sk-section-sub {
    width: 380px;
    height: 16px;
    border-radius: 6px;
}
.sk-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.sk-course-card {
    height: 160px;
    background: var(--sk-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- 7. TOP PERFORMERS (BOARD RESULTS) SKELETON --- */
.sk-toppers-section {
    max-width: 1240px;
    margin: 60px auto;
    padding: 0 20px;
}
.sk-toppers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}
.sk-topper-card {
    background: var(--sk-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.sk-topper-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
}
.sk-topper-name {
    width: 160px;
    height: 20px;
}
.sk-topper-score {
    width: 90px;
    height: 26px;
    border-radius: 9999px;
}

/* --- 8. FACULTY CARDS SKELETON (Used in Main Skeleton & Dynamic Container) --- */
.sk-faculty-card {
    background: var(--sk-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-height: 260px;
}
.sk-faculty-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
}
.sk-faculty-name {
    width: 140px;
    height: 18px;
}
.sk-faculty-sub {
    width: 100px;
    height: 14px;
}
.sk-faculty-pill {
    width: 120px;
    height: 22px;
    border-radius: 9999px;
    margin-top: auto;
}

/* --- 9. FOOTER SKELETON --- */
.sk-footer {
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 50px 5% 30px;
    margin-top: 80px;
}
.sk-footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1240px;
    margin: 0 auto 40px;
}
.sk-footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sk-footer-line {
    height: 14px;
    border-radius: 4px;
}
.sk-footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 20px;
    display: flex;
    justify-content: center;
}
.sk-footer-copy {
    width: 320px;
    height: 14px;
    border-radius: 4px;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 900px) {
    .sk-nav-links { display: none; }
    .sk-hero { height: 320px; }
    .sk-features { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .sk-title-line-1 { width: 90%; height: 28px; }
    .sk-title-line-2 { width: 70%; height: 24px; }
}

@media (max-width: 540px) {
    .sk-nav { height: 60px; }
    .sk-nav-logo { width: 130px; height: 38px; }
    .sk-hero { height: 240px; }
    .sk-features { grid-template-columns: 1fr; gap: 14px; }
    .sk-toppers-grid { grid-template-columns: 1fr; }
    .sk-courses-grid { grid-template-columns: 1fr 1fr; }
    .sk-footer-cols { grid-template-columns: 1fr; }
}

/* --- ACCESSIBILITY / REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
    .sk-shimmer {
        animation: none !important;
        background: #e8eaed !important;
    }
}
