/*
  This CSS file defines styles for skeleton placeholders used during content loading.
  It includes a shimmer animation and specific styles for different content blocks.
*/

/* The main shimmer animation for all skeleton elements */
.skeleton {
    animation: skeleton-loading 1.5s infinite linear;
    background-color: #e0e0e0;
    background-image: linear-gradient(
            100deg,
            #e0e0e0 0%,
            #f0f0f0 50%,
            #e0e0e0 100%
    );
    background-size: 200% 100%;
    background-position-x: 180%;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    to {
        background-position-x: -20%;
    }
}

/* Visibility toggling: when the container is loading, show the placeholder. */
.skeleton-container.loading .content-actual {
    display: none !important; /* Use !important to override other display styles */
}

/* When not loading, hide the placeholder. */
.skeleton-container:not(.loading) .skeleton-placeholder {
    display: none;
}

/* --- Specific Skeleton Styles --- */

.skeleton-carousel {
    height: 600px;
    width: 100%;
}

.skeleton-title-bar {
    height: 48px;
    width: 70%;
    margin: 5px auto;
}

.skeleton-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skeleton-detail-item {
    height: 120px;
    width: 100%;
    border-radius: 8px;
}

.skeleton-description .skeleton-header {
    height: 28px;
    width: 40%;
    margin-bottom: 20px;
}

.skeleton-description .skeleton-line {
    height: 16px;
    margin-bottom: 12px;
}

.skeleton-map {
    height: 450px;
    width: 100%;
    border-radius: 8px;
}

.skeleton-files-header {
    height: 30px;
    width: 200px;
    margin-bottom: 20px;
}

.skeleton-files-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skeleton-file-item {
    height: 200px;
    border-radius: 8px;
}

/* Contact Card Skeleton */
.skeleton-contact-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.skeleton-contact-card {
    width: 350px;
    height: 290px;
    border-radius: 15px;
}

/* Property Card Skeleton */
.skeleton-card-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.skeleton-property-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.skeleton-property-card .image {
    height: 200px;
    width: 100%;
}

.skeleton-property-card .details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.skeleton-property-card .title {
    height: 20px;
    width: 90%;
    margin-bottom: 15px;
}

.skeleton-property-card .info {
    margin-top: auto;
    height: 50px;
    width: 100%;
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .skeleton-carousel {
        height: 350px;
    }
    .skeleton-details-grid {
        grid-template-columns: 1fr;
    }
    .skeleton-files-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .skeleton-contact-card,
    .skeleton-property-card {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 600px) {
    .skeleton-files-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 360px) {
    .skeleton-files-grid {
        grid-template-columns: 1fr;
    }
}