/* Skeleton Loading Styles for Resala Landing Page */

/* Base skeleton animation */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-dark {
    background: linear-gradient(90deg, #3a3a3a 25%, #4a4a4a 50%, #3a3a3a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    width: 100%;
}

.skeleton-text--short {
    width: 60%;
}

.skeleton-text--medium {
    width: 80%;
}

.skeleton-title {
    height: 2em;
    margin-bottom: 1em;
}

.skeleton-image {
    width: 100%;
    background-color: #e0e0e0;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-card {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Section container states */
.section-container {
    position: relative;
    min-height: 200px;
}

.section-container--loading {
    pointer-events: none;
}

.section-container--hidden {
    display: none !important;
}

/* Skeleton wrapper */
.skeleton-wrapper {
    transition: opacity 0.3s ease-out;
}

.section-container--loaded .skeleton-wrapper {
    display: none;
}

.section-content {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.section-container--loaded .section-content {
    opacity: 1;
}

/* ========================================
   Main Slider Skeleton
   ======================================== */
.skeleton-slider {
    height: 700px;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s infinite;
    display: flex;
    align-items: center;
}

.skeleton-slider__content {
    padding: 0 50px;
}

.skeleton-slider__subtitle {
    height: 24px;
    width: 200px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #4a4a4a 25%, #5a5a5a 50%, #4a4a4a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-slider__title {
    height: 50px;
    width: 80%;
    max-width: 500px;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #4a4a4a 25%, #5a5a5a 50%, #4a4a4a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-slider__btn {
    height: 50px;
    width: 150px;
    margin-top: 30px;
    background: linear-gradient(90deg, #4a4a4a 25%, #5a5a5a 50%, #4a4a4a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 25px;
}

/* ========================================
   Counter Skeleton
   ======================================== */
.skeleton-counter__inner {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s infinite;
    border-radius: 10px;
    padding: 60px 40px;
}

.skeleton-counter__list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.skeleton-counter__item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.skeleton-counter__value {
    height: 60px;
    width: 120px;
    margin: 0 auto 15px;
    background: linear-gradient(90deg, #3a3a3a 25%, #4a4a4a 50%, #3a3a3a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-counter__label {
    height: 20px;
    width: 100px;
    margin: 0 auto;
    background: linear-gradient(90deg, #3a3a3a 25%, #4a4a4a 50%, #3a3a3a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

/* ========================================
   Donations/Causes Skeleton
   ======================================== */
.skeleton-donation-card {
    margin-bottom: 30px;
}

.skeleton-donation-image {
    height: 280px;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
}

.skeleton-donation-category {
    position: absolute;
    bottom: 10px;
    right: 10px;
    height: 30px;
    width: 80px;
    border-radius: 4px;
}

.skeleton-donation-title {
    height: 24px;
    width: 85%;
    margin-bottom: 12px;
}

.skeleton-donation-text {
    height: 16px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-progress-bar {
    height: 8px;
    margin: 20px 0;
    border-radius: 4px;
}

.skeleton-donation-goals {
    display: flex;
    justify-content: space-between;
}

.skeleton-donation-goals .skeleton {
    height: 16px;
    width: 80px;
}

/* ========================================
   Events Skeleton
   ======================================== */
.skeleton-events__left {
    padding-left: 30px;
}

.skeleton-events__tagline {
    height: 20px;
    width: 100px;
    margin-bottom: 15px;
}

.skeleton-events__title {
    height: 80px;
    width: 100%;
    margin-bottom: 30px;
}

.skeleton-events__btn {
    height: 50px;
    width: 130px;
    border-radius: 25px;
}

.skeleton-event-card {
    height: 360px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.skeleton-event-date {
    position: absolute;
    top: 15px;
    right: 15px;
    height: 60px;
    width: 60px;
    border-radius: 4px;
    background: linear-gradient(90deg, #d0d0d0 25%, #e0e0e0 50%, #d0d0d0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-event-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.skeleton-event-meta {
    height: 16px;
    width: 60%;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4a4a4a 25%, #5a5a5a 50%, #4a4a4a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-event-title {
    height: 24px;
    width: 80%;
    background: linear-gradient(90deg, #5a5a5a 25%, #6a6a6a 50%, #5a5a5a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

/* ========================================
   Testimonials Skeleton
   ======================================== */
.skeleton-testimonial__left {
    padding-left: 30px;
}

.skeleton-testimonial__tagline {
    height: 20px;
    width: 180px;
    margin-bottom: 20px;
}

.skeleton-testimonial__text {
    height: 80px;
    width: 100%;
}

.skeleton-testimonial-card {
    padding: 30px;
    text-align: center;
}

.skeleton-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.skeleton-testimonial-name {
    height: 24px;
    width: 150px;
    margin: 0 auto 10px;
}

.skeleton-testimonial-position {
    height: 16px;
    width: 100px;
    margin: 0 auto 20px;
}

.skeleton-testimonial-quote {
    height: 40px;
    width: 40px;
    margin: 0 auto 20px;
    border-radius: 50%;
}

.skeleton-testimonial-content {
    height: 60px;
    width: 100%;
}

/* ========================================
   Gallery Skeleton
   ======================================== */
.skeleton-gallery__top {
    text-align: center;
    padding: 40px 0;
}

.skeleton-gallery__tagline {
    height: 24px;
    width: 150px;
    margin: 0 auto;
}

.skeleton-gallery__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 10px;
}

.skeleton-gallery-item {
    flex: 1;
    min-width: 200px;
    max-width: 25%;
    height: 320px;
    border-radius: 4px;
}

@media (max-width: 991px) {
    .skeleton-gallery-item {
        max-width: 33.333%;
    }
}

@media (max-width: 767px) {
    .skeleton-gallery-item {
        max-width: 50%;
    }
}

/* ========================================
   Partners Skeleton
   ======================================== */
.skeleton-partners__list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px 0;
}

.skeleton-partner-logo {
    height: 60px;
    width: 120px;
    border-radius: 4px;
}

/* ========================================
   Memorial Skeleton
   ======================================== */
.skeleton-memorial-card {
    text-align: center;
    margin-bottom: 30px;
}

.skeleton-memorial-image {
    height: 280px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.skeleton-memorial-content {
    padding: 20px;
    background: #f8f8f8;
    border-radius: 0 0 8px 8px;
}

.skeleton-memorial-name {
    height: 20px;
    width: 120px;
    margin: 0 auto 10px;
}

.skeleton-memorial-position {
    height: 16px;
    width: 80px;
    margin: 0 auto;
}

/* ========================================
   FAQ Skeleton
   ======================================== */
.skeleton-faq__left {
    padding-left: 30px;
}

.skeleton-faq__tagline {
    height: 20px;
    width: 140px;
    margin-bottom: 20px;
}

.skeleton-faq__text {
    height: 60px;
    width: 100%;
    margin-bottom: 30px;
}

.skeleton-faq__btn {
    height: 50px;
    width: 140px;
    border-radius: 25px;
}

.skeleton-faq-item {
    padding: 20px;
    margin-bottom: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.skeleton-faq-question {
    height: 20px;
    width: 80%;
}

/* ========================================
   RTL Support
   ======================================== */
[dir="rtl"] .skeleton-slider__content {
    padding: 0 50px;
}

[dir="rtl"] .skeleton-events__left {
    padding-left: 0;
    padding-right: 30px;
}

[dir="rtl"] .skeleton-testimonial__left {
    padding-left: 0;
    padding-right: 30px;
}

[dir="rtl"] .skeleton-faq__left {
    padding-left: 0;
    padding-right: 30px;
}

[dir="rtl"] .skeleton-event-date {
    right: auto;
    left: 15px;
}

[dir="rtl"] .skeleton-donation-category {
    right: auto;
    left: 10px;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 991px) {
    .skeleton-slider {
        height: 500px;
    }

    .skeleton-slider__title {
        height: 40px;
    }

    .skeleton-counter__list {
        gap: 30px;
    }

    .skeleton-counter__item {
        min-width: 120px;
    }
}

@media (max-width: 767px) {
    .skeleton-slider {
        height: 400px;
    }

    .skeleton-slider__content {
        padding: 0 20px;
    }

    .skeleton-slider__title {
        height: 32px;
        width: 100%;
    }

    .skeleton-counter__inner {
        padding: 40px 20px;
    }

    .skeleton-counter__item {
        min-width: 100px;
    }

    .skeleton-counter__value {
        height: 40px;
        width: 80px;
    }
}
