/* ==========================================================================
   RealtyPromoo — Card System v2
   Loaded AFTER style.css — extends & overrides existing card styles.
   ========================================================================== */

/* ---------- Card shell: position:relative so badges anchor ---------- */
.card { position: relative; overflow: hidden; }
.card .card-image-link { position: relative; display: block; }

/* ---------- Status badge (project cards) — top-left of image ---------- */
.card-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #fff;
    background: #334155;           /* neutral default */
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 2;
    pointer-events: none;
}
.card-status-badge.status-ready      { background: #16a34a; }   /* green */
.card-status-badge.status-uc         { background: #0891b2; }   /* cyan */
.card-status-badge.status-new        { background: #c9a84c; }   /* gold — matches brand */
.card-status-badge.status-prelaunch  { background: #d97706; }   /* amber */
.card-status-badge.status-upcoming   { background: #6366f1; }   /* indigo */

/* ---------- Category badge (news/guide cards) — top-right of image ---------- */
.card-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #fff;
    background: #0a1a3a;           /* navy brand */
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 2;
}
.card-category-badge.cat-launch          { background: #16a34a; }
.card-category-badge.cat-market_update   { background: #0891b2; }
.card-category-badge.cat-policy          { background: #dc2626; }
.card-category-badge.cat-investment_tips { background: #c9a84c; color: #1a1a1a; }
.card-category-badge.cat-guide           { background: #7c3aed; }

/* ---------- Card body additions ---------- */
.card-body .card-developer {
    margin: 4px 0 2px 0;
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 500;
}
.card-body .card-location {
    margin: 4px 0;
    font-size: 0.85rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 2px;
}
.card-body .card-config {
    margin: 4px 0;
    font-size: 0.82rem;
    color: #6b7280;
}
.card-body .card-excerpt {
    margin: 8px 0 4px 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-byline {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ---------- Meta row at bottom of card (chips) ---------- */
.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.card-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.card-chip.chip-rera {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.card-chip.chip-possession {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* ---------- Stats row (city/locality/developer cards) ---------- */
.card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #555;
}
.card-stat strong {
    color: #0a1a3a;
    font-weight: 700;
}

/* ---------- "View all X →" section CTA ---------- */
.view-all-cta {
    text-align: center;
    margin-top: 18px;
}
.view-all-cta a {
    display: inline-block;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0a1a3a;
    border: 1px solid #0a1a3a;
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.view-all-cta a:hover {
    background: #0a1a3a;
    color: #fff;
}

/* ---------- "More from this developer/city" text link widget ---------- */
.more-links {
    margin-top: 24px;
    padding: 18px 22px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #c9a84c;
}
.more-links h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #0a1a3a;
}
.more-links ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.more-links li {
    font-size: 0.9rem;
}
.more-links li a {
    color: #0a1a3a;
    text-decoration: none;
    border-bottom: 1px dashed #c9a84c;
}
.more-links li a:hover {
    color: #c9a84c;
}

/* ---------- Listing page pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0 20px 0;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-block;
    min-width: 40px;
    padding: 8px 14px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.pagination a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.pagination .current {
    background: #0a1a3a;
    color: #fff;
    border-color: #0a1a3a;
    font-weight: 600;
}
.pagination .disabled {
    color: #9ca3af;
    cursor: default;
}

/* ---------- Search dropdown enhancements ---------- */
.search-result-subtitle {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}
.search-no-results {
    padding: 16px 20px;
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
}
.search-view-all {
    display: block;
    padding: 12px 20px;
    text-align: center;
    background: #f8f9fa;
    color: #0a1a3a;
    font-size: 0.85rem;
    font-weight: 600;
    border-top: 1px solid #e5e7eb;
    text-decoration: none;
}
.search-view-all:hover {
    background: #eef2f7;
}

/* ---------- Dedicated /search results page ---------- */
.search-results-page { padding: 40px 0 60px; min-height: 60vh; }
.search-page-hero {
    text-align: center;
    padding: 28px 0 32px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 32px;
}
.search-page-hero h1 {
    font-size: 1.6rem;
    margin: 0 0 18px;
    color: #0a1a3a;
}
.search-page-form {
    max-width: 520px;
    margin: 0 auto 10px;
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
}
.search-page-form input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    outline: none;
}
.search-page-form button {
    background: #0a1a3a;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.search-result-count {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}
.search-section {
    margin-bottom: 42px;
}
.search-section h2 {
    font-size: 1.2rem;
    color: #0a1a3a;
    padding-bottom: 8px;
    border-bottom: 2px solid #c9a84c;
    margin-bottom: 18px;
}
.search-no-results-page {
    text-align: center;
    padding: 40px 20px;
}
.search-no-results-page h2 {
    color: #0a1a3a;
    margin-bottom: 12px;
}
.search-suggestions {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
}
.search-suggestions li a {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #0a1a3a;
    text-decoration: none;
}
.search-suggestions li a:hover {
    background: #0a1a3a;
    color: #fff;
    border-color: #0a1a3a;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 640px) {
    .card-status-badge,
    .card-category-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
        top: 8px;
    }
    .card-status-badge { left: 8px; }
    .card-category-badge { right: 8px; }
    .search-page-hero h1 { font-size: 1.3rem; }
    .more-links ul { flex-direction: column; gap: 6px; }
}
