/* --- CSS Variables for Easy Theming --- */
:root {
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --secondary-color: #28a745;
    --secondary-hover-color: #218838;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --font-family: 'Poppins', sans-serif;
    --shadow: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 16px rgba(0,0,0,0.15);
}

/* --- Global Styles & Resets --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; text-align: center; margin-bottom: 2rem; }
h3 { font-size: 1.25rem; }

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

section {
    padding: 60px 0;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--primary-hover-color);
    color: #fff;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}
.btn-secondary:hover {
    background-color: var(--secondary-hover-color);
    color: #fff;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* --- Header --- */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
}
.main-nav a:hover {
    color: var(--primary-color);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://picsum.photos/seed/hero/1920/800.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 120px 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-form select,
.search-form input {
    border: none;
    padding: 15px;
    font-size: 1rem;
    outline: none;
}
.search-form select {
    flex-basis: 200px;
    border-right: 1px solid var(--border-color);
}
.search-form input {
    flex-grow: 1;
}
.search-form button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}
.search-form button:hover {
    background-color: var(--primary-hover-color);
}

/* --- Categories Section --- */
.categories {
    background-color: var(--light-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.category-item {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: none;
    color: var(--text-color);
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.category-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.category-item span {
    font-size: 0.9rem;
    color: #777;
}

/* --- How It Works Section --- */
.how-it-works {
    background-color: #fff;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.step-item {
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 auto 20px auto;
}

/* --- Recent Listings Section --- */
.recent-listings {
    background-color: var(--light-color);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.listing-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.listing-card img {
    height: 200px;
    object-fit: cover;
}

.listing-details {
    padding: 20px;
}

.listing-details h3 {
    margin-bottom: 10px;
}

.listing-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}
.listing-meta i {
    margin-right: 5px;
}

.listing-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* --- Call to Action (CTA) Section --- */
.cta {
    background-color: var(--dark-color);
    color: #fff;
    text-align: center;
}

.cta h2 {
    color: #fff;
}

.cta p {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    font-size: 1.1rem;
}

/* --- Footer --- */
.main-footer {
    background-color: #2c2c2c;
    color: #b0b0b0;
    padding: 50px 0 20px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-section ul li {
    margin-bottom: 10px;
}
.footer-section ul li a {
    color: #b0b0b0;
}
.footer-section ul li a:hover {
    color: #fff;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #444;
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}
.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .search-form { flex-direction: column; border-radius: 8px; }
    .search-form select, .search-form input, .search-form button { border-radius: 0; }
    .search-form select { border-right: none; border-bottom: 1px solid var(--border-color); }
}

@media (max-width: 768px) {
    .main-header .container { flex-direction: column; gap: 15px; }
    .main-nav ul { gap: 15px; font-size: 0.9rem; }
    .hero { padding: 80px 0; }
    .hero h1 { font-size: 2.5rem; }
    section { padding: 40px 0; }
}

@media (max-width: 576px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .category-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .listings-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
}