/**
 * Modern Archive Styles for Property Listings
 * Matching the mockup design with tabs, filters, and modern cards
 */

:root {
    --primary-color: #BCD62C;
    --primary-hover: #a8c226;
    --secondary-color: #13adb7;
    --secondary-hover: #0f9aa3;
}

/* Container */
.property-archive {
    background: #f8f9fa;
    padding: 20px 0 40px;
}

.container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Property Type Tabs */
.property-type-tabs {
    margin-bottom: 30px;
    justify-content: center;
    align-items: center;
    display: flex
}

.tab-buttons {
    display: flex;
    gap: 0;
    background: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: fit-content;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.tab-button.active {
    background: #bcd62c;
    color: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tab-button:hover:not(.active) {
    background: #f8f9fa;
    color: #495057;
}

/* Search Filters */
.properties-search-filters {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.search-filters-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr auto;
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

/* Standardized input and select styling */
.filter-input,
.filter-select,
.filter-group input,
.filter-group select {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
    height: 48px;
    box-sizing: border-box;
    font-family: inherit;
    width: 100%;
}

.filter-input:focus,
.filter-select:focus,
.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(188, 214, 44, 0.1);
}

/* Hide filter groups based on listing type */
.filter-group[data-filter].hidden {
    display: none;
}

/* Properties container */
.properties-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}



.more-filters-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.more-filters-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* Advanced Filters */
.advanced-filters {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.advanced-filters-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    gap: 20px;
}

.filter-buttons {
    display: flex;
    gap: 12px;
}

/* Search and Clear Buttons */
.search-btn,
.clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.search-btn {
    background: var(--secondary-color);
    color: white;
}

.search-btn:hover:not(.disabled) {
    background: var(--secondary-hover);
    transform: translateY(-1px);
}

.clear-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.clear-btn:hover:not(.disabled) {
    background: #e9ecef;
    color: #495057;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

/* Disabled state for buttons */
.search-btn.disabled,
.search-btn:disabled,
.clear-btn.disabled,
.clear-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    background: #e9ecef !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
}

/* Loading state for search button */
.search-btn.loading {
    pointer-events: none;
}

.search-btn.loading svg {
    animation: spin 1s linear infinite;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled, .btn-primary.disabled, .btn-primary {
    color: #fff;
    background-color: #bcd62c !important;
    border-color: #bcd62c !important;
}
.btn-primary:hover{

    background-color: #ac4928 !important;
    border-color: #ac4928 !important;
}

.btn-primary.disabled,
.btn-primary:disabled {
    background: #bcd62c;
    color: rgba(255, 255, 255, 0.8);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.btn-primary.disabled:hover,
.btn-primary:disabled:hover {
    background: #a74c2e;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-secondary.disabled,
.btn-secondary:disabled {
    background: #ced4da;
    color: rgba(255, 255, 255, 0.8);
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

.btn-secondary.disabled:hover,
.btn-secondary:disabled:hover {
    background: #ced4da;
    transform: none;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 4px;
}

.results-count {
    font-size: 1.1rem;
    color: #495057;
}

.count-number {
    font-weight: 700;
    color: #212529;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.view-options {
    display: flex;
    gap: 4px;
    background: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.view-btn svg {
    width: 16px;
    height: 16px;
    transition: all 0.2s ease;
}

.view-btn:hover:not(.active) {
    background: #f0f0f0;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-options label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.sort-options select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.properties-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.properties-grid.list-view {
    grid-template-columns: 1fr;
}

/* Modern Property Cards - Matching Design */
.property-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Property Image */
.property-card .property-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.property-card .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.property-card .no-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-weight: 500;
}



/* Property Details */
.property-card .property-details {
    padding: 20px;
}



/* Property Title */
.property-card .property-title {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.property-card .property-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.property-card .property-title a:hover {
    color: var(--primary-color);
}

/* Basic Property Details */
.property-card .property-basic-details {
    margin-bottom: 12px;
}

.property-card .basic-details-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.property-card .basic-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.property-card .basic-detail-item .detail-icon {
    font-size: 0.9rem;
}

.property-card .basic-detail-item .detail-text {
    font-weight: 500;
    color: #495057;
}

/* Location */
.property-card .property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: #6c757d;
    font-size: 0.9rem;
}

.property-card .property-location svg {
    color: #adb5bd;
    flex-shrink: 0;
}

/* Property Excerpt */
.property-card .property-excerpt {
    margin-bottom: 16px;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Property Meta Row */
.property-card .property-meta-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.property-card .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
}

.property-card .meta-item svg {
    color: var(--secondary-color);
    flex-shrink: 0;
}

.property-card .meta-item span {
    font-weight: 500;
}

/* Property Footer - Matching Design */
.property-card .property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.property-card .property-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ff6b35;
    margin: 0;
}

/* Details Button - Matching Design */
.property-card .details-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.2);
}

.property-card .details-button:hover {
    background: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.property-card .details-button svg {
    transition: transform 0.3s ease;
}

.property-card .details-button:hover svg {
    transform: translateX(2px);
}

/* No Results */
.no-properties-found {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.no-properties-found h3 {
    margin-bottom: 12px;
    color: #495057;
}

.no-results-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Pagination */
.properties-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.properties-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.properties-pagination li {
    margin: 0;
}

.properties-pagination a,
.properties-pagination span {
    display: block;
    padding: 10px 16px;
    background: white;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.properties-pagination a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.properties-pagination .current {
    background: var(--primary-color);
    color: white;
}

/* Custom Fields & Taxonomies Styling for Single Property */
.property-details-full {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    width: 100%;
}

.property-details-full h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.property-details-full h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.custom-fields-section,
.taxonomies-section {
    margin-bottom: 40px;
}

.custom-fields-section:last-child,
.taxonomies-section:last-child {
    margin-bottom: 0;
}

.custom-fields-section h3,
.taxonomies-section h3 {
    color: #34495e;
    font-size: 1.4rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 5px solid var(--primary-color);
}

.custom-fields-section h3::before {
    content: "📋";
    font-size: 1.3rem;
}

.taxonomies-section h3::before {
    content: "🏷️";
    font-size: 1.3rem;
}

/* Property Tags Container */
.property-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.property-tag {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 25px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.property-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.property-tag:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.property-tag:hover::before {
    width: 6px;
}

.property-tag .tag-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.property-tag .tag-value {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
}

/* URL Tag Special Styling */
.property-tag.url-tag {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0f9aa3 100%);
    border-color: var(--secondary-color);
    color: white;
}

.property-tag.url-tag .tag-label {
    color: white;
}

.property-tag.url-tag .tag-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.property-tag.url-tag .tag-link:hover {
    color: #f0f0f0;
    transform: translateX(2px);
}

.property-tag.url-tag .tag-link svg {
    transition: transform 0.3s ease;
}

.property-tag.url-tag:hover .tag-link svg {
    transform: scale(1.1);
}

.taxonomies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.taxonomy-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.taxonomy-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px 15px 0 0;
}

.taxonomy-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.taxonomy-item h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.terms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.term-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(188, 214, 44, 0.3);
}

.term-tag:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(188, 214, 44, 0.4);
}

/* Google Map Section - Full Width */
.property-map-section.full-width {
    background: white;
    width: 100%
    margin: 30px 0;
    padding: 0;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

.property-map-section.full-width .container {
 max-width: 1380px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}

.property-map-section.full-width h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.property-map-section.full-width h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.property-map.full-width-map {
    width: 100vw;
    height: 500px;
    margin-left: calc(-50vw + 50%);
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: none;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.property-map-section.full-width .map-address-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.property-map-section.full-width .map-address {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.property-map-section.full-width .map-address svg {
    color: var(--secondary-color);
    flex-shrink: 0;
}

.property-map-section.full-width .map-area-info {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 1rem;
    color: #6c757d;
    justify-content: center;
}

.property-map-section.full-width .map-area-info .area,
.property-map-section.full-width .map-area-info .county {
    background: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    border: 2px solid;
    transition: all 0.3s ease;
}

.property-map-section.full-width .map-area-info .area {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.property-map-section.full-width .map-area-info .area:hover {
    background: var(--primary-color);
    color: white;
}

.property-map-section.full-width .map-area-info .county {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.property-map-section.full-width .map-area-info .county:hover {
    background: var(--secondary-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-buttons {
        width: 100%;
        justify-content: center;
    }

    .search-filters-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .advanced-filters-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .filter-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .filter-buttons {
        justify-content: center;
        width: 100%;
    }

    .search-btn,
    .clear-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .results-controls {
        width: 100%;
        justify-content: space-between;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .property-card .property-meta-row {
        gap: 12px;
    }

    .property-card .meta-item {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .no-results-actions {
        flex-direction: column;
        align-items: center;
    }

    /* Map responsive */
    .property-map-section.full-width .container {
        padding: 25px 15px 15px;
    }

    .property-map.full-width-map {
        height: 350px;
    }

    .property-map-section.full-width .map-address-info {
        padding: 20px;
        margin: 0 15px 15px;
    }

    .property-map-section.full-width .map-area-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* Property tags responsive */
    .property-tags-container {
        gap: 8px;
    }

    .property-tag {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .property-tag .tag-label,
    .property-tag .tag-value {
        font-size: 0.85rem;
    }

    /* Custom fields responsive */
    .fields-grid {
        grid-template-columns: 1fr;
    }

    .taxonomies-grid {
        grid-template-columns: 1fr;
    }

    .property-details-full {
        padding: 25px;
    }
}