/* Skeleton Loading Styles */
.skeleton,
.skeleton-text,
.skeleton-title,
.skeleton-heading,
.skeleton-image,
.skeleton-avatar,
.skeleton-button,
.skeleton-circle {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-text:last-child {
    margin-bottom: 0;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 0.75em;
    border-radius: 4px;
}

.skeleton-heading {
    height: 2em;
    width: 40%;
    margin-bottom: 1em;
    border-radius: 4px;
}

.skeleton-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    aspect-ratio: 16/9;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-button {
    height: 44px;
    width: 120px;
    border-radius: 8px;
}

.skeleton-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.skeleton-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* Skeleton wrapper should be visible by default */
.skeleton-wrapper {
    display: block !important;
    position: relative;
}

/* Hide skeleton when content is loaded */
.content-loaded .skeleton,
.content-loaded .skeleton-text,
.content-loaded .skeleton-title,
.content-loaded .skeleton-heading,
.content-loaded .skeleton-image,
.content-loaded .skeleton-avatar,
.content-loaded .skeleton-button,
.content-loaded .skeleton-circle {
    display: none !important;
}

.content-loaded .skeleton-wrapper {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Show content when loaded */
.content-loaded .content-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.content-item {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: relative;
    height: 0;
    overflow: hidden;
}

/* Ensure content items are hidden until explicitly shown */
.content-item:not(.content-loaded .content-item) {
    display: none !important;
    visibility: hidden !important;
}

/* Ensure skeleton and content don't overlap - they should occupy the same space */
.skeleton-wrapper + .content-item {
    margin-top: 0;
}

/* For sections where skeleton and content are siblings, ensure proper positioning */
.home1-tour-carousel-section .skeleton-wrapper,
.home1-tour-carousel-section .content-item {
    position: relative;
}

/* Additional fix: Ensure skeleton wrapper is completely removed from flow when hidden */
.skeleton-wrapper[style*="display: none"],
.skeleton-wrapper[style*="display:none"] {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

