:root {
    --primary-color: #38BDF8;
    /* Sky Blue for highlights */
    --bg-color: #0F172A;
    /* Dark Slate (Fallback) */
    --accent-color: #D69E2E;
    /* Amber (kept for gold icons) */
    --success-color: #4ADE80;
    /* Bright Green for Money */

    --text-main: #FFFFFF;
    --text-secondary: #94A3B8;
    /* Slate 400 */

    --card-bg: rgba(15, 23, 42, 0.9);
    /* Dark Glass */
    --input-bg: rgba(30, 41, 59, 0.8);
    /* Slate 800 */
    --border-light: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(rgba(10, 20, 50, 0.9), rgba(10, 20, 50, 0.9)), url('background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 50px;
    overflow-y: auto;
    position: relative;
    padding-bottom: 50px;
}

/* Clean Background (No Mesh) */
.background-mesh {
    display: none;
}

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

/* Glass Card with Blur */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 32px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    text-align: center;
}

header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    text-align: center;
}

.social-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-links a {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.social-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Form Styles */
.input-group {
    margin-bottom: 24px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.price-row {
    display: flex;
    gap: 16px;
}

.price-row .input-group {
    flex: 1;
}

input,
select {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--input-bg);
    color: var(--text-main);
    /* White text */
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
    /* Sky Blue shadow */
}

/* Custom Select styling */
.select-wrapper {
    position: relative;
}

select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    width: 18px;
    height: 18px;
}

/* Primary Button (Search) */
.search-btn {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #1A365D 0%, #2563EB 100%);
    /* Authority Blue Gradient */
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    font-family: 'Outfit', sans-serif;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
    filter: brightness(1.1);
}

.search-btn:active {
    transform: translateY(1px);
}

/* Closing Costs Promo */
.closing-costs-promo {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.closing-costs-promo p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Secondary Button (Promo) */
.secondary-btn {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    animation: pulse-border 2s infinite;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
    animation: none;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(56, 189, 248, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

/* Placeholder color */
::placeholder {
    color: #A0AEC0;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .glass-card {
        padding: 20px;
        border-radius: 16px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .price-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Results & Loading */
.hidden {
    display: none !important;
}

.loading {
    margin-top: 30px;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: relative;
    border: 3px solid rgba(26, 54, 93, 0.1);
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;

}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.results-grid {
    display: grid;
    gap: 24px;
    margin-top: 40px;
}

/* Property Card Light Theme */
.property-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.property-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
}

.whatsapp-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 12px;
    background: #25D366;
    /* WhatsApp Green stays */
    color: white;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 211, 102, 0.4);
}

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

.card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #CBD5E0;
}

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

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

.card-content {
    padding: 12px;
}

.card-id {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    /* Deep Blue */
    margin-bottom: 2px;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.card-location {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-location svg {
    width: 14px;
    height: 14px;
    color: var(--accent-color);
    /* Amber/Gold Pin */
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.feature-item svg {
    width: 14px;
    height: 14px;
    color: var(--accent-color);
    /* Amber Icons */
}

.error-message {
    color: #e53e3e;
    text-align: center;
    margin-top: 20px;
    background: #fff5f5;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #feb2b2;
}

/* Image Slider Styles */
.card-image-wrapper {
    position: relative;
    height: 140px;
    width: 100%;
    overflow: hidden;
    background: #0F172A;
}

.slider-container {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* .property-card:hover .card-image { transform: scale(1.05); } Remove zoom */

.card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: default;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    transition: all 0.2s ease;
    opacity: 0;
    /* Hidden by default */
}

/* Show buttons on hover */
.card-image-wrapper:hover .slider-btn {
    opacity: 1;
}

.slider-btn:hover {
    background: rgba(56, 189, 248, 0.8);
    /* Sky Blue */
    border-color: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

.slider-btn svg {
    width: 16px;
    height: 16px;
}

.card-content-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
    cursor: default;
}