/* ============ RESET & BASE ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e3a5f;       /* deep navy */
    --primary-dark: #16283f;
    --accent: #2563eb;        /* blue */
    --accent-dark: #1d4ed8;
    --success: #10b981;       /* emerald for payment/success states */
    --bg-light: #eef2f9;      /* light blue-gray hero bg */
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #dce4ec;
    --shadow: 0 4px 20px rgba(10, 42, 68, 0.08);
    --radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', serif;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
}

ul, li {
    list-style: none;
}

/* ============ NAVBAR ============ */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

/* ============ HERO ============ */
.hero {
    background: var(--bg-light);
    padding: 5rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero p em {
    font-style: italic;
    color: var(--text);
}

/* Search bar */
.search-bar {
    background: var(--white);
    border-radius: 50px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    max-width: 550px;
    margin: 0 auto;
    padding: 0.5rem;
    gap: 0.5rem;
}

.search-bar select {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 0.7rem 1rem;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.btn-search {
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 0.9rem 1.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--accent-dark);
}

/* ============ FEATURED LISTINGS ============ */
.featured {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.featured h2, .how-it-works h2, .testimonials h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

.featured h2 span, .how-it-works h2 span, .testimonials h2 span {
    color: var(--accent);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.listing-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.listing-card:hover {
    transform: translateY(-4px);
}

.listing-img-wrap {
    position: relative;
    height: 220px;
}

.listing-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
}

.listing-info {
    padding: 1.2rem 1.4rem;
}

.listing-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.listing-info .price {
    color: var(--success);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.listing-info .location {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.listing-info .location i {
    color: var(--accent);
    margin-right: 0.3rem;
}

/* ============ HOW IT WORKS ============ */
.how-it-works {
    background: var(--bg-light);
    padding: 5rem 2rem;
}

.steps-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
    text-align: center;
}

.step-icon {
    width: 64px;
    height: 64px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    box-shadow: var(--shadow);
    font-size: 1.4rem;
    color: var(--accent);
}

.step h3 {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============ TESTIMONIALS ============ */
.testimonials {
    max-width: 1000px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.testimonial-card p {
    font-style: italic;
    color: var(--text);
    margin-bottom: 1.2rem;
    font-size: 1.02rem;
}

.testimonial-card h4 {
    font-size: 0.95rem;
    color: var(--accent);
}

/* ============ FOOTER ============ */
.footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* ============ AUTH PAGES (Signup / Login) ============ */
.auth-page {
    min-height: calc(100vh - 73px);
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 440px;
    width: 100%;
    padding: 2.5rem 2.2rem;
}

.auth-card h1 {
    font-size: 1.7rem;
    text-align: center;
    margin-bottom: 0.4rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 2rem;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-light);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    margin: 0 auto 1.2rem;
    width: fit-content;
}

.form-group {
    margin-bottom: 1.3rem;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.45rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

.btn-submit {
    width: 100%;
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: var(--accent-dark);
}

.btn-submit:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
}

.form-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    display: none;
}

.form-error.show {
    display: block;
}

.form-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    display: none;
}

.form-success.show {
    display: block;
}

/* OTP specific */
.otp-inputs {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.otp-inputs input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.otp-inputs input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
}

.resend-otp {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.resend-otp a {
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.back-home:hover {
    color: var(--accent);
}

/* Role toggle tabs (signup page) */
.role-toggle {
    display: flex;
    background: var(--bg-light);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.8rem;
}

.role-toggle button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.role-toggle button.active {
    background: var(--white);
    color: var(--accent);
    box-shadow: var(--shadow);
}

.role-fields {
    display: none;
}

.role-fields.active {
    display: block;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero h1 {
        font-size: 2.1rem;
    }
    .search-bar {
        flex-direction: column;
        border-radius: var(--radius);
    }
    .btn-search {
        width: 100%;
        justify-content: center;
    }
}