/* Filename: home.css */

/* --- HERO SECTION --- */
.home .hero-section {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #0f172a 100%);
    color: white;
    padding: 6rem 0 8rem;
    text-align: center;
}
.home .hero-title { 
    color: white; margin-bottom: 1.5rem; font-size: 3.5rem; font-weight: 800; 
    line-height: 1.1; letter-spacing: -0.02em;
}
.home .hero-subtitle { 
    color: #cbd5e1; font-size: 1.25rem; max-width: 650px; 
    margin: 0 auto 3.5rem; line-height: 1.6; 
}

/* --- HERO SEARCH BOX --- */
.home .hero-search-box {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255,255,255,0.1);
}

.search-inputs-wrapper { 
    display: flex; gap: 15px; align-items: center; 
}

/* Search Text Input */
.search-input-group { position: relative; flex: 2; }
.search-icon { position: absolute; left: 16px; color: #94a3b8; font-size: 1.4rem; z-index: 10; top: 50%; transform: translateY(-50%); }
.search-field { 
    padding-left: 3.5rem !important; height: 56px !important; 
    border: 1px solid #e2e8f0 !important; border-radius: 8px !important; 
    width: 100%; font-size: 1.1rem !important; 
}

/* Dropdowns */
.search-select-group { flex: 1; min-width: 150px; }
.location-wrapper { display: flex; gap: 10px; flex: 2; }

/* Select2 Override fixes */
.select2-container .select2-selection--single { height: 56px !important; display: flex !important; align-items: center !important; border-color: #e2e8f0 !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 54px !important; }

/* Submit Button */
.search-submit { 
    height: 56px; padding: 0 2.5rem; font-size: 1.1rem; 
    font-weight: 700; min-width: 140px; box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

@media (max-width: 992px) {
    .hero-title { font-size: 2.5rem; }
    .hero-search-box { padding: 1rem; }
    .search-inputs-wrapper { flex-direction: column; gap: 10px; }
    .search-input-group, .search-select-group, .location-wrapper, .search-submit { width: 100%; }
    .location-wrapper { flex-direction: column; }
}

/* --- SECTIONS --- */
.pmn-home-ad-section { margin: 2rem auto; text-align: center; padding: 0 15px; }

.states-section { padding: 4rem 0; }
.state-search-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 2rem; }
.state-filter-input { flex: 1; max-width: 360px; padding: 10px 16px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 1rem; outline: none; transition: border-color 0.2s; }
.state-filter-input:focus { border-color: var(--color-primary); }
.state-filter-count { font-size: 0.9rem; color: #94a3b8; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; flex-wrap: wrap; gap: 15px; }
.section-header h2 { margin: 0; font-size: 2rem; color: var(--color-secondary); }

.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.state-card { 
    background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1.5rem; 
    text-align: center; text-decoration: none; color: var(--color-text-main); 
    transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column;
}
.state-card:hover { transform: translateY(-5px); border-color: var(--color-primary); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.state-name { margin: 0; font-size: 1.1rem; font-weight: 700; }
.state-count { font-size: 0.9rem; color: #64748b; margin-top: 5px; }

.how-it-works { padding: 5rem 0; background-color: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.how-it-works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin: 0 auto; max-width: 1100px; }
.how-card { background: white; padding: 2.5rem; border: 1px solid #e2e8f0; border-radius: 16px; text-align: center; transition: transform 0.2s; }
.how-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); }

/* --- RECENT LISTINGS (FIXED CARD STYLES) --- */
.recent-section { padding: 5rem 0; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* -- App-Style Card Logic (Copied from Search.css) -- */
.car-park-card, .pmn-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative; /* Essential for badges */
    text-align: left;
}

.car-park-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-color: var(--color-primary);
}

.pmn-card-image-wrapper {
    height: 200px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.pmn-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.car-park-card:hover .pmn-card-image-wrapper img { transform: scale(1.05); }

/* Fixed Status Badge (Floating) */
.pmn-card-status {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    pointer-events: none;
    width: auto; /* Prevent full width */
}

/* Fixed Heart Button (Floating) */
.pmn-save-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
    color: #94a3b8;
    padding: 0;
}

.pmn-save-btn:hover { transform: scale(1.1); color: #ef4444; }
.pmn-save-btn.active { color: #ef4444; background: #fff0f0; border-color: #fca5a5; }
.pmn-save-btn i { font-size: 18px; display: block; }

/* Placeholder */
.pmn-card-placeholder-image {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; background: #f1f5f9;
    color: #94a3b8; font-weight: 600; font-size: 0.9rem;
}

/* Card Content */
.card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-size: 1.1rem; margin-bottom: 5px; line-height: 1.3; font-weight: 700; margin-top: 0; }
.card-title a { color: var(--color-secondary); text-decoration: none; }
.card-address { font-size: 0.85rem; color: #64748b; margin-bottom: 15px; display: flex; align-items: center; gap: 6px; }

/* CTA SECTION & BUTTON FIX */
.cta-section { padding: 5rem 0; margin-top: 0; }
.pmn-cta-layout { display: flex; align-items: center; gap: 3rem; }

/* The Fix for the Support Button */
.cta-section .btn-outline {
    background: transparent !important;
    color: white !important;
    border: 2px solid white !important;
}
.cta-section .btn-outline:hover {
    background: white !important;
    color: #0f172a !important; /* Dark text on hover */
}

@media (max-width: 992px) {
    .recent-grid, .how-it-works-grid { grid-template-columns: 1fr; }
    .pmn-cta-layout { flex-direction: column; text-align: center; } 
    .pmn-cta-layout .hero-actions { justify-content: center; }
}