/* Root Variables */
:root {
    --primary-color: #2c3e50;
    --accent-color: #d4af37;
    --text-dark: #333;
    --text-light: #777;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --container-width: 1100px;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
}

.logo span {
    color: var(--accent-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Hero */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Sales Section */
.sales-section {
    padding: 40px 0;
}

.section-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

/* Sales Grid - Strictly Single Column */
.sales-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

/* Sale Card - Precise 40/60 Split Row */
.sale-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: row; /* Horizontal split */
    min-height: 500px;
    width: 100%;
}

/* Card Left Side: Content (40%) */
.sale-content {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid #eee;
    padding: 0; /* Padding moved to inner elements for banner look */
}

.sale-header-banner {
    background-color: var(--primary-color);
    padding: 30px 40px;
    color: var(--white);
}

.sale-title {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 8px;
}

.sale-address {
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sale-details-body {
    padding: 30px 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sale-dates {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    background: #fdfdfd;
    padding: 15px;
    border-left: 3px solid var(--accent-color);
    border-radius: 0 4px 4px 0;
}

.date-row {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.date-row:last-child {
    margin-bottom: 0;
}

.date-val {
    font-weight: 600;
    color: var(--primary-color);
}

.time-val {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Card Right Side: Photo Mosaic (60%) */
.sale-mosaic {
    flex: 0 0 60%;
    display: grid;
    gap: 4px;
    background-color: #f0f0f0;
}

/* Mosaic Layouts based on child count */
.mosaic-1 { grid-template-columns: 1fr; }
.mosaic-2 { grid-template-columns: 1fr 1fr; }
.mosaic-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic-3 .mosaic-img:first-child { grid-row: span 2; }

.mosaic-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.mosaic-5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic-5 .mosaic-img:first-child { grid-row: span 2; }

.mosaic-6 { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }

.mosaic-7 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(3, 1fr); }
.mosaic-7 .mosaic-img:first-child { grid-row: span 3; }

.mosaic-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #ddd;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.8rem;
}

/* Mobile Responsive Refinements */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .sale-card {
        flex-direction: column;
        min-height: auto;
    }

    .sale-content {
        flex: 1 1 auto;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .sale-header-banner {
        padding: 20px 25px;
    }

    .sale-details-body {
        padding: 20px 25px;
    }

    .sale-mosaic {
        flex: 1 1 auto;
        height: 300px; /* Reduced height for mobile */
        min-height: 300px;
    }

    .sale-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 10px 0;
    }

    .logo {
        font-size: 1.1rem;
    }

    nav ul li {
        margin-left: 15px;
    }

    nav ul li a {
        font-size: 0.8rem;
    }

    .hero {
        padding: 40px 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .sale-title {
        font-size: 1.3rem;
    }

    .sale-mosaic {
        height: 250px;
        min-height: 250px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
