/* ============================================
   PROJECT SEARCH PAGE - PROFESSIONAL STYLES
   ============================================ */

* {
    box-sizing: border-box;
}

/* Banner */
.project-banner {
    height: 300px;
    background: linear-gradient(rgba(26, 49, 77, 0.7), rgba(26, 49, 77, 0.7)), 
                url('https://images.unsplash.com/photo-1449844908441-8829872d2607?ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
}

.project-banner-content {
    max-width: 800px;
}

.project-banner h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.project-banner p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Search Form */
.search-form-container {
    background: white;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.search-form {
    max-width: 1400px;
    margin: 0 auto;
}

.search-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-field {
    flex: 1;
    min-width: 200px;
}

.search-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4rem;
}

.search-field input,
.search-field select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.search-submit {
    flex: 0 0 auto;
}

/* Main Layout */
.project-search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.projects-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Sidebar Filters */
.projects-sidebar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.filter-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a314d;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
}

.filter-item:hover {
    background: #f5f5f5;
    color: #1a314d;
}

.filter-item.active {
    background: #FFF8E7;
    color: #D4AF37;
    font-weight: 600;
    border-left: 3px solid #D4AF37;
    padding-left: calc(0.8rem - 3px);
}

.filter-badge {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #999;
}

.filter-item.active .filter-badge {
    background: #D4AF37;
    color: white;
}

/* Price Range */
.price-range {
    padding: 1rem 0;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.price-slider {
    width: 100%;
    margin: 1rem 0;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.price-inputs input {
    font-size: 0.85rem;
    padding: 0.5rem;
}

/* Builder Filter */
.builder-filter {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.builder-filter input {
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.builder-list {
    max-height: 250px;
    overflow-y: auto;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.filter-checkbox input {
    cursor: pointer;
}

/* Buttons */
.btn-reset-filters {
    width: 100%;
    margin-top: 1rem;
    border-color: #ddd;
    color: #666;
}

.btn-reset-filters:hover {
    background: #f5f5f5;
    border-color: #999;
}

.btn-gold {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941C 100%);
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #B8941C 0%, #A07D1A 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Main Content */
.projects-main {
    grid-column: 2;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.grid-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1a314d;
    font-weight: 700;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-label {
    font-weight: 600;
    color: #555;
}

.sort-controls select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card-wrapper {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Project Card */
.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.project-image-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f5f5f5;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
    color: #ccc;
    font-size: 3rem;
}

.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.project-badge .badge {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941C 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.project-details {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-builder {
    margin-bottom: 0.5rem;
}

.builder-link {
    color: #D4AF37;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.builder-link:hover {
    color: #B8941C;
}

.project-title {
    margin: 0.5rem 0 0.8rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a314d;
    line-height: 1.3;
}

.project-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.project-title a:hover {
    color: #D4AF37;
}

.project-location {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.project-location i {
    color: #D4AF37;
}

/* Project Features */
.project-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.feature {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.feature-label {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.feature-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a314d;
}

/* Project Actions */
.project-actions {
    display: flex;
    gap: 0.8rem;
    margin: 1rem 0;
    margin-top: auto;
}

.compare-btn {
    background: white;
    border: 2px solid #D4AF37;
    color: #D4AF37;
    font-weight: 600;
    flex: 1;
    transition: all 0.2s;
}

.compare-btn:hover {
    background: #D4AF37;
    color: white;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.compare-btn.selected {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941C 100%);
    color: white;
    border-color: #B8941C;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.like-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    font-weight: 600;
    flex: 0 0 auto;
    width: 50px;
    padding: 0.5rem;
    transition: all 0.2s;
}

.like-btn:hover {
    background: #fff;
    color: #dc3545;
    border-color: #dc3545;
}

.like-btn.active {
    background: #ffe0e6;
    color: #dc3545;
    border-color: #dc3545;
}

.project-view-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #D4AF37;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.project-view-more:hover {
    color: #B8941C;
    gap: 0.8rem;
}

/* No Results */
.no-results {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    color: #666;
}

.no-results h3 {
    color: #1a314d;
    margin-bottom: 1rem;
}

.no-results a {
    color: #D4AF37;
    text-decoration: none;
    font-weight: 600;
}

.no-results a:hover {
    color: #B8941C;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    flex-wrap: wrap;
}

.page-info {
    color: #666;
    font-weight: 600;
}

/* Sticky Compare Bar */
.sticky-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941C 100%);
    padding: 1rem 1.5rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    z-index: 1030;
    animation: slideUp 0.4s ease-out;
    display: none;
}

.sticky-compare-bar.show {
    display: flex;
}

body.has-compare-bar {
    padding-bottom: 100px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.compare-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.compare-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.compare-label {
    font-weight: 600;
    font-size: 1rem;
}

.compare-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.2rem;
}

.btn-clear {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.has-compare-bar {
    padding-bottom: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-layout {
        grid-template-columns: 1fr;
    }

    .projects-sidebar {
        position: static;
        order: 2;
    }

    .projects-main {
        grid-column: 1;
        order: 1;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-banner h1 {
        font-size: 2rem;
    }

    .search-row {
        flex-direction: column;
    }

    .search-field {
        min-width: auto;
    }

    .compare-bar-content {
        flex-direction: column;
        gap: 1rem;
    }

    .compare-info {
        width: 100%;
        justify-content: center;
    }

    #compareButton {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .project-banner {
        height: 200px;
    }

    .project-banner h1 {
        font-size: 1.5rem;
    }

    .project-banner p {
        font-size: 0.9rem;
    }

    .projects-grid {
        gap: 1rem;
    }

    .project-card {
        border-radius: 4px;
    }

    .grid-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-controls {
        width: 100%;
    }

    .sort-controls select {
        width: 100%;
    }
}
