/* ============================================
   Jammu PG Finder - ilovepdf Inspired Premium Design
   Clean, Spacious, Professional
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #E5322D;
    --primary-hover: #C41E1A;
    --primary-light: #FFEBEE;
    --text-dark: #1A1A1A;
    --text-medium: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --white: #FFFFFF;
    --bg-light: #F5F5F5;
    --bg-page: #f7f7f7;
    --border: #E8E8E8;
    --border-light: #F0F0F0;
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ============================================
   Header - Clean & Bold like ilovepdf
   ============================================ */
.app-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.app-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.app-subtitle {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 400;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.5;
}

.jammupg-h2 {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ============================================
   Filter Section - Simple & Clean
   ============================================ */
.filter-section {
    background: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    position: relative;
    border: 1px solid var(--border-light);
}

.filter-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-medium);
    font-size: 14px;
}

.filter-select {
    padding: 10px 14px;
    border: 1.5px solid #B0B0B0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 400;
    background: var(--white);
    transition: var(--transition);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    color: var(--text-dark);
    outline: none;
}

.filter-select:hover {
    border-color: #888;
}

.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.1);
}

.active-filters-count {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: none;
    z-index: 5;
}

.active-filters-count.show {
    display: inline-block;
}

.results-count {
    position: absolute;
    top: -32px;
    right: 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   Cards Grid - 4 Cards Per Row
   ============================================ */
.cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* Card - ilovepdf Style */
.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    width: 100%;
    border: 1px solid var(--border-light);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #DDD;
}

/* Card Image */
.card-image {
    height: 170px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #F0F0F0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image img {
    transform: scale(1.04);
}

/* Badges */
.card-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.card-badge.featured {
    background: var(--primary);
    color: white;
}

.card-badge.premium {
    background: #333;
    color: white;
}

.card-badge.popular {
    background: #E5322D;
    color: white;
}

/* Card Content */
.card-content {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-header {
    margin-bottom: 12px;
}

/* Area Tags */
.area-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.area-nanak-nagar { background: #FFF3E0; color: #E65100; }
.area-trikuta-nagar { background: #E8F5E9; color: #1B5E20; }
.area-gandhi-nagar { background: #FFF8E1; color: #F57F17; }
.area-channi-himmat { background: #EDE7F6; color: #4527A0; }
.area-jammu-cantt { background: #FCE4EC; color: #880E4F; }
.area-shastri-nagar { background: #E0F7FA; color: #006064; }

/* Card Title */
.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

/* Location */
.card-location {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 4px;
    gap: 6px;
}

.card-location i {
    color: #CCC;
    font-size: 11px;
    flex-shrink: 0;
}

/* Address */
.card-address {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-address i {
    color: #CCC;
    font-size: 11px;
    flex-shrink: 0;
}

.sector-highlight {
    color: var(--text-medium);
    font-weight: 500;
}

/* Footer */
.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.card-price span {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 2px;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-medium);
}

.btn-outline:hover {
    background: #F5F5F5;
    border-color: #CCC;
}

/* ============================================
   No Results
   ============================================ */
.no-results {
    text-align: center;
    padding: 48px 24px;
    grid-column: 1 / -1;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.no-results i {
    font-size: 40px;
    color: #DDD;
    margin-bottom: 16px;
}

.no-results h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

.no-results p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 15px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeInUp 0.4s ease backwards;
}

.card:nth-child(1) { animation-delay: 0.02s; }
.card:nth-child(2) { animation-delay: 0.04s; }
.card:nth-child(3) { animation-delay: 0.06s; }
.card:nth-child(4) { animation-delay: 0.08s; }
.card:nth-child(5) { animation-delay: 0.10s; }
.card:nth-child(6) { animation-delay: 0.12s; }
.card:nth-child(7) { animation-delay: 0.14s; }
.card:nth-child(8) { animation-delay: 0.16s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1100px) {
    .cards-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .app-title {
        font-size: 28px;
    }
    
    .app-subtitle {
        font-size: 16px;
    }
    
    .filter-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .app-container {
        padding: 20px 14px;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .app-subtitle {
        font-size: 15px;
    }
    
    .filter-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .filter-section {
        padding: 16px;
    }
    
    .card-image {
        height: 190px;
    }
    
    .card-content {
        padding: 14px;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .card-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .active-filters-count {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
    }
    
    .results-count {
        position: static;
        display: block;
        margin-top: 10px;
    }
}