/* ===================================
    Skeleton Loaders for Programs and Mentors
====================================== */

/* Skeleton pulse/fade animation */
@keyframes skeleton-pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.6;
    }
}

/* Alternative blur effect */
@keyframes skeleton-blur {
    0% {
        filter: blur(0px);
        opacity: 0.7;
    }
    50% {
        filter: blur(1px);
        opacity: 0.9;
    }
    100% {
        filter: blur(0px);
        opacity: 0.7;
    }
}

/* Base skeleton styles - using pulse effect */
.skeleton {
    background-color: #374151;
    animation: skeleton-pulse 2s ease-in-out infinite;
    border-radius: 4px;
    position: relative;
}

/* Optional: Add subtle gradient overlay for depth */
.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(75, 85, 99, 0.1) 0%,
        rgba(75, 85, 99, 0.3) 50%,
        rgba(75, 85, 99, 0.1) 100%
    );
    border-radius: inherit;
}

/* Program skeleton card */
.skeleton-program-card {
    height: 450px;
    background-color: #111827;
    border-radius: 6px;
    border: 1px solid rgb(148 163 184 / 30%);
    overflow: hidden;
}

.skeleton-program-card .skeleton-image {
    height: 250px;
    background-color: #1F2937;
}

.skeleton-program-card .skeleton-content {
    padding: 30px;
}

.skeleton-program-card .skeleton-title {
    height: 24px;
    width: 80%;
    margin-bottom: 15px;
}

.skeleton-program-card .skeleton-mentor {
    height: 20px;
    width: 60%;
    margin-bottom: 20px;
}

.skeleton-program-card .skeleton-price {
    height: 32px;
    width: 40%;
    margin-bottom: 20px;
}

.skeleton-program-card .skeleton-button {
    height: 44px;
    width: 100%;
}

/* Mentor skeleton card */
.skeleton-mentor-card {
    height: 385px;
    background-color: #111827;
    border-radius: 6px;
    border: 1px solid rgb(148 163 184 / 30%);
    overflow: hidden;
}

.skeleton-mentor-card .skeleton-image {
    height: 215px;
    background-color: #1F2937;
}

.skeleton-mentor-card .skeleton-content {
    padding: 20px;
    background-color: #0F172A;
}

.skeleton-mentor-card .skeleton-name {
    height: 22px;
    width: 70%;
    margin-bottom: 10px;
}

.skeleton-mentor-card .skeleton-title {
    height: 18px;
    width: 85%;
    margin-bottom: 10px;
}

.skeleton-mentor-card .skeleton-description {
    height: 14px;
    width: 100%;
    margin-bottom: 5px;
}

.skeleton-mentor-card .skeleton-description:last-child {
    width: 75%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .skeleton-program-card {
        height: 420px;
    }
    
    .skeleton-program-card .skeleton-content {
        padding: 20px;
    }
}

/* ===================================
    Fade-in animation for real cards
====================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply fade-in to program and mentor cards when they load */
#featured-programs-container .col-lg-4:not(.skeleton-loader),
#index-mentors-container .col-lg-4:not(.skeleton-loader) {
    animation: fadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

/* Stagger the animations */
#featured-programs-container .col-lg-4:not(.skeleton-loader):nth-child(1),
#index-mentors-container .col-lg-4:not(.skeleton-loader):nth-child(1) {
    animation-delay: 0.1s;
}

#featured-programs-container .col-lg-4:not(.skeleton-loader):nth-child(2),
#index-mentors-container .col-lg-4:not(.skeleton-loader):nth-child(2) {
    animation-delay: 0.2s;
}

#featured-programs-container .col-lg-4:not(.skeleton-loader):nth-child(3),
#index-mentors-container .col-lg-4:not(.skeleton-loader):nth-child(3) {
    animation-delay: 0.3s;
}

#featured-programs-container .col-lg-4:not(.skeleton-loader):nth-child(4),
#index-mentors-container .col-lg-4:not(.skeleton-loader):nth-child(4) {
    animation-delay: 0.4s;
}

#featured-programs-container .col-lg-4:not(.skeleton-loader):nth-child(5),
#index-mentors-container .col-lg-4:not(.skeleton-loader):nth-child(5) {
    animation-delay: 0.5s;
}

#featured-programs-container .col-lg-4:not(.skeleton-loader):nth-child(6),
#index-mentors-container .col-lg-4:not(.skeleton-loader):nth-child(6) {
    animation-delay: 0.6s;
}

/* Alternative: Use blur effect instead - uncomment to use */
/*
.skeleton {
    animation: skeleton-blur 2.5s ease-in-out infinite;
}
*/

/* ===================================
    Professionals Page Skeleton
====================================== */
.skeleton-professional-card {
    height: 850px; /* Taller for professionals page format */
    background-color: #111827;
    border-radius: 4px;
    border: 1px solid rgb(148 163 184 / 30%);
    overflow: hidden;
}

.skeleton-professional-card .skeleton-image {
    height: 756px; /* Match professionals photo height */
    background-color: #1F2937;
}

.skeleton-professional-card .skeleton-content {
    padding: 20px;
    text-align: center;
}

.skeleton-professional-card .skeleton-name {
    height: 24px;
    width: 70%;
    margin: 15px auto 10px;
}

.skeleton-professional-card .skeleton-title {
    height: 18px;
    width: 50%;
    margin: 0 auto 10px;
}

.skeleton-professional-card .skeleton-description {
    height: 14px;
    width: 80%;
    margin: 0 auto 5px;
}

.skeleton-professional-card .skeleton-description:last-child {
    width: 60%;
}

/* Apply fade-in to professionals page cards */
#professionals-mentors-container .col:not(.skeleton-loader) {
    animation: fadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

/* Stagger animations for professionals page */
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(1) { animation-delay: 0.1s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(2) { animation-delay: 0.15s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(3) { animation-delay: 0.2s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(4) { animation-delay: 0.25s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(5) { animation-delay: 0.3s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(6) { animation-delay: 0.35s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(7) { animation-delay: 0.4s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(8) { animation-delay: 0.45s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(9) { animation-delay: 0.5s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(10) { animation-delay: 0.55s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(11) { animation-delay: 0.6s; }
#professionals-mentors-container .col:not(.skeleton-loader):nth-child(12) { animation-delay: 0.65s; }