/* ==============================
   General Page Styles
   ============================== */
body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 40px;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

h1, h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* ==============================
   Form Styles
   ============================== */
form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* space between form elements */
    margin-bottom: 30px;
}

/* Inputs, Selects, Button */
form input, form select, form button {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing: border-box;
    flex: 1 1 150px;   /* grow/shrink, min-width 150px */
    min-width: 150px;
    max-width: 250px;
}

/* Focus effect */
form input:focus, form select:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 5px rgba(40,167,69,0.4);
}

/* Button styling */
form button {
    flex: 0 0 auto; /* do not stretch */
    padding: 10px 25px;
    background: #28a745;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    margin-left: 5px;
}

form button:hover {
    background: #218838;
}

/* ==============================
   Select2 dropdown fix
   ============================== */
.select2-container--default .select2-selection--single {
    height: 40px;
    line-height: 38px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.select2-container--default .select2-selection--multiple {
    min-height: 40px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    line-height: 38px;
    padding-left: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
    right: 10px;
}

/* ==============================
   Results & Saved Searches
   ============================== */
#results, #savedSearches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.site-block, .saved-search {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    width: 280px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.site-block:hover, .saved-search:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.site-block h3, .saved-search strong {
    color: #007bff;
    margin-bottom: 10px;
}

.site-block p, .saved-search p {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

/* Links and buttons inside cards */
.site-block a, .saved-search button {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
}

.site-block a {
    background: #17a2b8;
    color: white;
    transition: background 0.3s;
}

.site-block a:hover { background: #138496; }

.saved-search button {
    background: #ffc107;
    color: #333;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.saved-search button:hover { background: #e0a800; }

/* ==============================
   Responsive
   ============================== */
@media(max-width:700px){
    .site-block, .saved-search { width: 90%; }
    form { flex-direction: column; align-items: center; gap: 10px; }
    form input, form select, form button { max-width: 100%; }
}

/* ===== Property Type Checkbox Buttons ===== */
.property-type-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 5px 0;
}

.property-type-group label {
    background: #17a2b8;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.property-type-group input[type="checkbox"] {
    display: none; /* hide default checkbox */
}

.property-type-group input[type="checkbox"]:checked + label {
    background: #138496; /* darker when selected */
}