/**
 * Layout Shift (CLS) Prevention - Professional
 * Prevents Content Layout Shift for better UX and SEO
 */

/* Image Aspect Ratios */
.listing-card img,
.property-card img,
.featured-hotel-card img {
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
    height: auto;
}

.circular-card img {
    aspect-ratio: 1/1;
}

/* Hero Images */
.hero-image,
.banner-image {
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Skeleton Loaders */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Minimum Heights for Content Areas */
.listing-card {
    min-height: 420px;
}

.property-description {
    min-height: 100px;
}

.listing-title {
    min-height: 3rem;
    line-height: 1.5rem;
}

/* Font Loading - Prevent FOIT/FOUT */
body {
    font-display: swap;
}

/* Lazy Load Placeholder */
img[loading="lazy"] {
    background: #f0f0f0;
}

/* Grid Stabilization */
.grid-stable {
    grid-template-rows: repeat(auto-fill, minmax(420px, 1fr));
}

/* Flexbox Stabilization */
.flex-stable > * {
    flex-shrink: 0;
    min-width: 0;
}

