/* Buy Listings Page Styles - Using Design System Tokens */
/* Design system is loaded via responsive.css in templates */

/* Global Reset - Buy Listings Page Specific */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-primary);
    line-height: var(--line-height-normal);
    font-size: var(--font-body);
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.pexels.com/photos/280222/pexels-photo-280222.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    color: var(--color-text-inverse);
    margin-bottom: var(--spacing-3xl);
}

.hero-eyebrow {
    font-size: clamp(0.75rem, 1.2vw, 0.875rem);
    font-weight: var(--font-weight-semibold);
    color: rgba(255, 255, 255, 0.9);
    text-transform: none;
    letter-spacing: 0.15em;
    margin-bottom: var(--spacing-xs);
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    margin-top: 0;
    line-height: 1.4;
}

.hero-eyebrow-second {
    margin-bottom: var(--spacing-md);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.hero-title-line {
    display: inline;
}

.hero-title-highlight {
    display: inline;
    color: var(--color-white);
    font-weight: var(--font-weight-bold);
}

/* Hero Search Container */
.hero-search-container {
    background: var(--surface-glass-bg);
    backdrop-filter: blur(var(--surface-glass-blur));
    -webkit-backdrop-filter: blur(var(--surface-glass-blur));
    border-radius: var(--radius-xl);
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    margin-top: var(--spacing-lg);
    border: 1px solid var(--surface-glass-border);
}

/* Search Form */
.hero-search-form {
    width: 100%;
}

.search-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
    align-items: end;
}

.hero-search-container .search-fields {
    gap: var(--spacing-sm);
}

@media (min-width: 992px) {
    .search-fields {
        grid-template-columns: 2fr 2fr 1.5fr 1fr 1.2fr;
    }
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.search-field .form-control,
.search-field .form-select {
    padding: var(--spacing-md);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-md);
    font-size: var(--font-body);
    transition: var(--transition-all);
    width: 100%;
}

.search-field .form-control:focus,
.search-field .form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
}

.location-input-wrapper {
    position: relative;
}

.location-icon {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: var(--font-size-md);
}

.search-field-advanced {
    grid-column: span 1;
}

.search-field-submit {
    grid-column: span 1;
}

.btn-advanced {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-gray-100);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-all);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    width: 100%;
    justify-content: center;
}

.hero-search-container .btn-advanced {
    padding: var(--spacing-sm) var(--spacing-md);
    height: var(--btn-height-md);
}

.btn-advanced:hover {
    background: var(--color-gray-200);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.hero-search-container .btn-search {
    --btn-search-bg: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    --btn-search-bg-hover: linear-gradient(135deg, var(--color-secondary-dark), var(--color-secondary));
    --btn-search-shadow: var(--shadow-btn-secondary);
    --btn-search-shadow-hover: var(--shadow-btn-secondary-strong);
    --btn-search-color: var(--color-text-inverse);
    --btn-search-border-radius: var(--radius-full);
}

/* Advanced Search Panel */
.advanced-search-panel {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border-light);
}

.advanced-search-panel .form-group {
    margin-bottom: var(--spacing-md);
}

.advanced-search-panel label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
    display: block;
}

.price-range {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.price-range .form-control {
    flex: 1;
    padding: var(--spacing-md);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-md);
    font-size: var(--font-body);
}

.range-separator {
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
}

/* Responsive Design for Hero */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        padding: var(--spacing-xl) 0 var(--spacing-lg);
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .search-fields {
        grid-template-columns: 1fr;
    }
    
    .search-field-advanced,
    .search-field-submit {
        grid-column: span 1;
    }
    
    .search-tabs {
        flex-direction: column;
    }
    
    .search-tab.active::after {
        display: none;
    }
    
    .price-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .range-separator {
        text-align: center;
    }
}

.hero-subtitle {
    font-size: var(--font-subtitle);
    font-weight: var(--font-weight-light);
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    line-height: var(--line-height-normal);
}

/* Features Section */
.features-section {
    padding: var(--spacing-4xl) 0;
    background: var(--color-bg-secondary);
}

.features-section .section-title {
    font-size: var(--font-title-h2);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: var(--spacing-4xl);
    position: relative;
    line-height: var(--line-height-tight);
}

.features-section .section-title::after {
    content: '';
    position: absolute;
    bottom: calc(-1 * var(--spacing-md));
    left: 50%;
    transform: translateX(-50%);
    width: clamp(100px, 12vw, 120px);
    height: var(--spacing-xs);
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    border-radius: var(--radius-xs);
}

.feature-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
    border: var(--input-border-width) solid transparent;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(calc(-1 * var(--spacing-sm)));
    box-shadow: var(--shadow-lg);
    border-color: var(--color-secondary);
}

.feature-icon {
    width: clamp(3rem, 8vw, 5rem);
    height: clamp(3rem, 8vw, 5rem);
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    font-size: var(--icon-xl);
    color: var(--color-text-inverse);
    line-height: var(--line-height-tight);
    box-shadow: var(--shadow-sm);
}

h3.feature-title,
.feature-title {
    font-size: var(--font-feature-title) !important;
    font-weight: var(--font-weight-semibold) !important;
    line-height: var(--line-height-tight) !important;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

.feature-description {
    color: var(--color-text-secondary);
    font-size: var(--font-body);
    line-height: var(--line-height-normal);
}

/* Search Section */
.search-section {
    background: var(--color-white);
    padding: var(--spacing-2xl) 0;
    margin-top: calc(-1 * var(--spacing-xl));
    position: relative;
    z-index: 3;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-lg);
}

/* Search cards use standard .card class */
.search-card {
    /* Extends: .card */
    background-color: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    padding: var(--card-padding-lg);
    transition: var(--transition-all);
}

.search-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(calc(-1 * var(--spacing-xs)));
}

.search-title {
    font-size: var(--font-title-h3);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xl);
    text-align: center;
    line-height: var(--line-height-tight);
}

.search-title i {
    color: var(--color-primary);
    margin-right: var(--spacing-md);
    font-size: var(--icon-md);
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    display: block;
    font-size: var(--font-body);
}

.form-control,
.form-select {
    width: 100%;
    padding: var(--input-padding-y) var(--input-padding-x);
    font-size: var(--input-font-size);
    font-family: var(--font-family-primary);
    height: var(--input-height);
    border: var(--input-border-width) solid var(--input-border-color);
    border-radius: var(--input-border-radius);
    background-color: var(--input-bg);
    color: var(--input-color);
    transition: var(--transition-all);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--input-focus-border-color);
    box-shadow: var(--input-focus-shadow);
    background-color: var(--input-bg);
}

.hero-search-container .form-control,
.hero-search-container .form-select {
    background-color: var(--surface-glass-input-bg);
    border-color: var(--surface-glass-input-border);
    border-radius: var(--surface-glass-input-radius);
    box-shadow: var(--shadow-hero-input);
}

.hero-search-container .form-control:focus,
.hero-search-container .form-select:focus {
    border-color: var(--input-focus-border-color);
    box-shadow: var(--shadow-hero-input-focus);
}

.btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-family: var(--font-family-primary);
    font-weight: var(--btn-font-weight);
    border: none;
    cursor: pointer;
    transition: var(--btn-transition);
    text-decoration: none;
    white-space: nowrap;
    padding: var(--btn-padding-y-lg) var(--btn-padding-x-xl);
    font-size: var(--btn-font-size-lg);
    height: var(--btn-height-lg);
    border-radius: var(--btn-search-border-radius, var(--radius-full));
    background: var(--btn-search-bg, linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)));
    color: var(--btn-search-color, var(--color-text-inverse));
    box-shadow: var(--btn-search-shadow, var(--shadow-btn-primary));
    position: relative;
    overflow: hidden;
}

.hero-search-container .btn-search {
    padding: var(--spacing-sm) var(--spacing-lg);
    height: var(--btn-height-md);
}

.btn-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s;
}

.btn-search:hover::before {
    left: 100%;
}

.btn-search:hover {
    transform: translateY(calc(-1 * var(--spacing-xs)));
    box-shadow: var(--btn-search-shadow-hover, var(--shadow-btn-primary-strong));
    background: var(--btn-search-bg-hover, var(--btn-search-bg));
    color: var(--btn-search-color, var(--color-text-inverse));
}

.btn-home {
    background: linear-gradient(135deg, var(--color-success), var(--color-success-dark));
    border: none;
    color: var(--color-text-inverse);
    padding: var(--btn-padding-y-md) var(--btn-padding-x-lg);
    border-radius: var(--btn-border-radius);
    font-weight: var(--btn-font-weight);
    font-size: var(--btn-font-size-md);
    line-height: var(--line-height-normal);
    transition: var(--btn-transition);
    text-decoration: none;
    display: inline-block;
    margin-top: var(--spacing-md);
}

.btn-home:hover {
    transform: translateY(calc(-1 * var(--spacing-xs)));
    box-shadow: var(--shadow-lg);
    color: var(--color-text-inverse);
    text-decoration: none;
}

/* Property Cards Section */
.properties-section {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-secondary);
}

.section-title {
    font-size: var(--font-title-h2);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    line-height: var(--line-height-tight);
}

.property-card {
    transition: all 0.3s ease;
}

.property-card:hover {
    transform: translateY(calc(-1 * var(--spacing-sm)));
    box-shadow: var(--shadow-lg);
}

.property-image {
    width: 100%;
    height: clamp(200px, 25vh, 250px);
    object-fit: cover;
}

.property-content {
    padding: var(--card-padding);
}

.property-title {
    font-size: var(--font-property-title) !important;
    font-weight: var(--font-weight-semibold) !important;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-tight) !important;
}

.property-price {
    font-size: var(--font-property-price) !important;
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: var(--line-height-tight) !important;
    margin-bottom: var(--spacing-md);
}

.property-features {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-primary);
    font-size: var(--font-body-small);
    line-height: var(--line-height-normal);
}

.feature i {
    color: var(--color-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--font-title-h1);
    }
    
    .hero-subtitle {
        font-size: var(--font-subtitle);
        line-height: var(--line-height-normal);
    }
    
    .search-card {
        padding: var(--spacing-xl) var(--spacing-lg);
        margin: 0 var(--spacing-md);
    }
    
    .search-title {
        font-size: var(--font-title-h2);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

