/* D&B Realty Stylesheet 
   Professional Midterm Project - Dirk & Benji
*/

:root {
    --primary-color: #2c3e50; /* Midnight Blue */
    --accent-color: #b8860b;  /* Dark Gold */
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --text-dark: #333333;
    --success: #27ae60;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

/* Layout Containers */
header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--accent-color);
}

main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 20px;
    min-height: 80vh;
}

footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/* Property Cards (Flexbox) */
.listings-grid, .recommendations-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.property-card {
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    flex: 1 1 calc(33.333% - 20px); /* 3 cards per row */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.property-card .details {
    padding: 1.5rem;
}

.property-card h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Forms */
form {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

fieldset {
    border: 1px solid #ddd;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
}

label {
    display: block;
    margin-bottom: 1rem;
    font-weight: bold;
}

input[type="text"], 
input[type="number"], 
input[type="email"], 
input[type="tel"], 
select, 
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Buttons */
.btn, .button, .btn-submit {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
}

.btn:hover {
    background: #966d09;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.admin-table th {
    background: var(--primary-color);
    color: white;
}

.admin-table tr:nth-child(even) {
    background: #f9f9f9;
}

/* Utility Classes */
.notice {
    background: #e1f5fe;
    padding: 10px;
    border-left: 5px solid #03a9f4;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .property-card {
        flex: 1 1 100%; /* Stack on mobile */
    }
    
    header {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
    }
}