/**
 * budget.css
 * Spezifische Styles für den Budget-Explorer
 * Keine Änderungen an bestehenden Funktionen
 */

/* ==================== BUDGET HERO SECTION ==================== */
.budget-hero {
    background: linear-gradient(135deg, #1a2a3a 0%, #0e1a28 100%);
    padding: 32px 20px 48px;
    position: relative;
    margin-top: 0;
}

.budget-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 40px;
    background: #f8f9fa;
    clip-path: ellipse(60% 100% at 50% 100%);
}

.budget-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.budget-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.budget-hero h1 .budget-highlight {
    font-style: italic;
    color: #c9a84c;
}

.budget-hero p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 16px;
}

.back-link:hover {
    color: #c9a84c;
}

.budget-display {
    margin-top: 20px;
    color: #c9a84c;
    font-weight: 600;
    font-size: 1.1rem;
}

.budget-display .amount {
    font-size: 2rem;
    font-weight: 700;
    display: inline-block;
    margin: 0 4px;
}

/* ==================== FILTER PANEL ==================== */
.filter-wrap {
    max-width: 1200px;
    margin: -20px auto 0;
    padding: 0 16px;
    position: relative;
    z-index: 10;
}

.filter-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    padding: 20px 24px;
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 4px;
    display: block;
}

.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.budget-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.budget-pill {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.budget-pill:hover {
    border-color: #c9a84c;
}

.budget-pill.active {
    background: #1a2a3a;
    color: white;
    border-color: #1a2a3a;
}

.btn-search, .btn-map {
    background: #b54b2a;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-search:hover, .btn-map:hover {
    background: #8a3a1f;
    transform: translateY(-1px);
}

.btn-map {
    background: #2c5282;
}

.btn-map:hover {
    background: #1a365d;
}

.button-group {
    display: flex;
    gap: 8px;
}

/* ==================== BUDGET TABS ==================== */
.budget-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 24px 0 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 40px;
    background: transparent;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
}

.tab-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #2d3748;
}

.tab-btn.active {
    background: #b54b2a;
    color: white;
    border-color: #b54b2a;
}

.tab-icon {
    font-size: 1.1rem;
}

.count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.tab-btn.active .count {
    background: rgba(255,255,255,0.2);
}

/* ==================== TAB CONTENT ==================== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==================== RESULTS LIST ==================== */
.results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.result-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.card-img {
    position: relative;
    height: 160px;
    overflow: hidden;
}

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

.result-card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 16px;
}

.card-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.rating-badge {
    background: #fbbf24;
    color: #1a2a3a;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.card-meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Top Items Anzeige */
.top-items-bar {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 10px;
    margin: 10px 0;
}

.top-items-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    display: block;
    margin-bottom: 8px;
}

.top-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.top-item {
    background: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.top-item-price {
    color: #b54b2a;
    font-weight: 700;
}

.card-action {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.detail-link {
    color: #b54b2a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.detail-link:hover {
    text-decoration: underline;
}

/* ==================== NO RESULTS ==================== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ==================== MAP MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    height: 80%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.modal-close:hover {
    color: #2d3748;
}

.modal-body {
    flex: 1;
    overflow: hidden;
}

#modalMap {
    width: 100%;
    height: 100%;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.map-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
    .filter-grid {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .budget-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }
    
    .tab-btn {
        white-space: nowrap;
    }
    
    .results-list {
        grid-template-columns: 1fr;
    }
    
    .budget-hero {
        padding: 24px 16px 40px;
    }
    
    .budget-display .amount {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .filter-card {
        padding: 16px;
    }
    
    .budget-pill {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .btn-search, .btn-map {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .card-name {
        font-size: 1rem;
    }
    
    .top-item {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* FORCE Suchleiste wie auf index.php */
.search-container .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-form {
    display: flex;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    background: white !important;
    border-radius: 60px !important;
    padding: 6px 6px 6px 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.search-input-group {
    flex: 1 !important;
    position: relative;
}

.search-input-group input {
    width: 100% !important;
    padding: 14px 40px 14px 40px !important;
    font-size: 16px !important;
    border: none !important;
    background: transparent !important;
}

.location-selector {
    width: 180px !important;
    position: relative;
}

.location-selector select {
    width: 100% !important;
    padding: 14px 30px 14px 16px !important;
    background: #f5f5f5 !important;
    border-radius: 40px !important;
    border: none !important;
    font-size: 14px !important;
}

/* Search-Button mit originalem Gradient (wie index.php) */
.search-button {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #ffcc00 100%) !important;
    color: var(--color-primary) !important;
    padding: 12px 28px !important;
    border-radius: 40px !important;
    border: none !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 12px rgba(231,168,0,0.3) !important;
}

.search-button:hover {
    background: linear-gradient(135deg, #ffcc00 0%, #ffd633 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 20px rgba(231,168,0,0.4) !important;
}

/* ==================== FOOTER DUNKLE SCHRIFT (wie Startseite) ==================== */

.main-footer,
.main-footer .footer-section p,
.main-footer .footer-section a,
.main-footer .footer-section h4,
.main-footer .footer-bottom p,
.main-footer .footer-bottom a {
    color: #3A3026 !important; /* Dunkles Braun/Grau */
}

.main-footer .footer-section a:hover,
.main-footer .footer-bottom a:hover {
    color: #C5603A !important; /* Terrakotta-Farbe beim Hover */
}

.main-footer .footer-social a {
    color: #3A3026 !important;
}

.main-footer .footer-social a:hover {
    color: #C5603A !important;
}

/* ==================== MOBILE SEARCH FIX (wie index.php) ==================== */

@media (max-width: 768px) {
    .search-form {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 16px !important;
        border-radius: 20px !important;
    }

    .search-input-group {
        width: 100% !important;
    }

    .location-selector {
        width: 100% !important;
    }

    .search-button {
        width: 100% !important;
        justify-content: center !important;
    }

    .search-input-group input {
        width: 100% !important;
        padding: 14px 40px 14px 45px !important;
    }

    .location-selector select {
        width: 100% !important;
        padding: 14px 35px 14px 16px !important;
    }
}

@media (max-width: 480px) {
    .search-form {
        padding: 12px !important;
        gap: 8px !important;
    }

    .search-button {
        padding: 12px !important;
        font-size: 14px !important;
    }
}