* {
    scroll-behavior: smooth;
}
:root {
    --gold: #C5A059;
    --dark: #0A0A0A;
    --zinc: #1A1A1A;
}


body {
    background-color: var(--dark);
    color: white;
    font-family: 'Inter', sans-serif;
    margin: 0;
}


/* THE GALLERY GRID - Fully Responsive Fix */
.property-grid {
    display: grid;
    /* Allow cards to shrink to 280px on small phones so they don't break the screen width */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; /* Smaller gap for mobile */
    padding: 20px; /* Smaller padding for mobile */
    max-width: 1400px; 
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box; /* Prevents padding from pushing items off-center */
}

/* On larger screens (tablets and desktops), upgrade to the premium larger size */
@media (min-width: 768px) {
    .property-grid {
        gap: 30px;
        padding: 40px;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}


/* THE CARD */
.property-card {
    background: var(--zinc);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.property-card:hover { transform: translateY(-10px); }

/* Make it shorter on mobile phones (300px), but keep it tall and luxurious on Desktop (450px) */
.media-container {
    position: relative;
    height: 300px; /* Better for mobile screens */
    overflow: hidden;
}

@media (min-width: 768px) {
    .media-container {
        height: 450px; /* Better for desktop screens */
    }
}

/* Fix the stretching typo so images crop perfectly! */
.media-container img, .card-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* <--- THIS FIXES THE STRETCHING */
    object-position: center; /* <--- Keeps the most important part of the house centered */
    position: absolute;
    transition: 0.8s ease;
}

.card-video { opacity: 0; }
.property-card:hover .card-video { opacity: 1; }

.info { padding: 25px; }
.tag { color: var(--gold); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.price { font-size: 1.5rem; color: white; font-weight: 700; }
.view-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #C5A059; /* The Gold Border */
    color: #C5A059;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    transition: all 0.4s ease;
    text-decoration: none;
    margin-left: 15px;
}

/* Hover Effect: Fill the button with gold and change text to black */
.view-btn:hover {
    background-color: #C5A059;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
}

/* Interior Gallery Styling */
.gallery-grid img {
    transition: filter 0.8s ease, transform 0.8s ease;
    filter: grayscale(100%);
}

.gallery-grid img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Mobile Click-to-Play Logic */
.card-video.is-active {
    opacity: 1;
    z-index: 10;
}