/* West Bengal Real Estates — main stylesheet */
:root {
    --primary:  #1a5276;
    --accent:   #e67e22;
    --bg:       #f4f6f8;
    --surface:  #ffffff;
    --text:     #2c3e50;
    --muted:    #6c757d;
    --border:   #dee2e6;
    --radius:   8px;
    --shadow:   0 2px 8px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent); }

/* ── Layout ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header {
    background: var(--primary);
    color: #fff;
    padding: 14px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.logo:hover { text-decoration: none; opacity: .9; }
.site-header nav { display: flex; gap: 8px; flex-wrap: wrap; }
.site-header nav a {
    color: rgba(255,255,255,.88);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .9rem;
    transition: background .2s;
}
.site-header nav a:hover {
    background: rgba(255,255,255,.15);
    text-decoration: none;
    color: #fff;
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #154360 100%);
    color: #fff;
    padding: 64px 20px 56px;
    text-align: center;
}
.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: -.5px;
}
.search-form {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.search-form input {
    flex: 1;
    border: none;
    padding: 14px 22px;
    font-size: 1rem;
    outline: none;
    color: var(--text);
}
.search-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.search-form button:hover { background: #ca6f1e; }

/* ── Main content area ── */
main.container { padding-top: 48px; padding-bottom: 64px; }

section { margin-bottom: 48px; }
section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

/* ── Project cards grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.card-body { padding: 18px; flex: 1; }
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--primary); }
.card-meta { font-size: .82rem; color: var(--muted); }
.card-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 8px;
    background: #e8f4fd;
    color: var(--primary);
}
.card-badge.completed { background: #e9f7ef; color: #1e8449; }
.card-badge.lapsed    { background: #fdedec; color: #c0392b; }

/* ── Footer ── */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,.8);
    padding: 28px 0;
    font-size: .88rem;
}
.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 16px; }
.site-footer nav a { color: rgba(255,255,255,.75); }
.site-footer nav a:hover { color: #fff; text-decoration: none; }

/* ── Page title ── */
.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin: 32px 0 24px;
}

/* ── Project detail ── */
.project-detail { padding: 32px 0 64px; }
.project-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.project-header h1 { font-size: clamp(1.3rem, 3vw, 2rem); color: var(--primary); flex: 1; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.detail-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
}
.detail-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.detail-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.detail-table th, .detail-table td { padding: 7px 0; vertical-align: top; }
.detail-table th { color: var(--muted); font-weight: 500; width: 40%; }
.detail-table td { color: var(--text); }

/* ── Form styles ── */
.submit-form {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    max-width: 640px;
    margin: 32px 0 64px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.submit-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
}
.submit-form input,
.submit-form textarea,
.submit-form select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .95rem;
    font-family: inherit;
    color: var(--text);
    background: #fafafa;
    transition: border-color .2s;
}
.submit-form input:focus,
.submit-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}
.submit-form textarea { resize: vertical; }
.submit-form h1 { font-size: 1.5rem; color: var(--primary); margin-bottom: 8px; }

/* ── Buttons ── */
.btn-primary,
.submit-form button[type="submit"] {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
    align-self: flex-start;
}
.btn-primary:hover,
.submit-form button[type="submit"]:hover {
    background: #ca6f1e;
    text-decoration: none;
    color: #fff;
}

/* ── Section header with sort tabs ── */
.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.section-header h2 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    white-space: nowrap;
}
.sort-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sort-tab {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
}
.sort-tab:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.sort-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 40px 0 16px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--primary);
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.page-btn:hover { background: #e8f4fd; border-color: var(--primary); text-decoration: none; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); cursor: default; }
.page-btn.disabled { color: var(--muted); cursor: default; pointer-events: none; }
.page-gap { color: var(--muted); padding: 0 4px; line-height: 38px; }

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}
.filter-bar select,
.filter-bar button {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .9rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}
.filter-bar button {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}
.filter-bar button:hover { background: #154360; }
.btn-clear {
    color: var(--muted);
    font-size: .88rem;
    text-decoration: underline;
}

/* ── Result count ── */
.result-count {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 20px;
}

/* ── Utility ── */
.text-muted { color: var(--muted); font-size: .875rem; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .site-header .container { flex-direction: column; align-items: flex-start; gap: 10px; }
    .hero { padding: 40px 20px 36px; }
    .site-footer .container { flex-direction: column; gap: 8px; }
}
