/* =================================================================
   WHITE COAST REALTY - MASTER FIX (ALL PAGES)
   ================================================================= */

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #333333;
    background-color: #FFFFFF;
    margin: 0px;
    padding: 10px;
}

/* --- LINKS --- */
a:link, a:visited { color: #C5A059; text-decoration: none; }
a:hover { color: #333333; text-decoration: underline; }

/* --- HEADER STYLES --- */
h1, .category_headline {
    font-family: "Times New Roman", Times, serif;
    font-size: 18px;
    color: #333333;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 1px solid #CCCCCC;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.category-link-row { font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 15px; }
.category_name { font-weight: bold; color: #555555; margin-right: 5px; }
.separator { color: #999999; margin-right: 5px; }

/* --- LAYOUT TABLE --- */
.properties_table { width: 100%; border-collapse: collapse; }
.properties_table_cell {
    vertical-align: top;
    padding-bottom: 30px;
    padding-right: 15px;
    width: 50%;
}

/* --- IMAGES --- */
.properties_table_cell img {
    float: left;
    margin-right: 15px;
    margin-bottom: 5px;
    border: 1px solid #CCCCCC;
    padding: 2px;
    background-color: #FFFFFF;
}

/* =================================================================
   THE SPACING FIX (APPLIES TO ALL PAGES)
   ================================================================= */

/* 1. Hide the <br> tags. This stops the double-spacing everywhere. */
.properties_table_cell br {
    display: none !important;
}

/* 2. Reset the main paragraph container */
.properties_table_cell p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
}

/* 3. Force text lines to stack tightly */
.category_property_status,
.category_property_caption,
.category_property_fact,
.category_property_price,
.category_property_id,
.properties_table_cell span {
    display: block !important;      
    margin-bottom: 2px !important; 
    padding: 0 !important;
}

/* 4. Hide empty lines if data is missing */
.properties_table_cell span:empty {
    display: none !important;
}

/* =================================================================
   TEXT STYLES
   ================================================================= */

/* Region */
.category_property_status {
    color: #999999;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

/* Title */
.category_property_caption {
    color: #C5A059; /* Gold */
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 4px !important;
}

/* Price */
.category_property_price {
    color: #000000;
    font-weight: bold;
    font-size: 12px;
    margin-top: 8px !important;    
    margin-bottom: 8px !important; 
}

/* Ref Number */
.category_property_id {
    color: #999;
    font-size: 11px;
    margin-bottom: 5px !important;
}

/* "View Details" Link Fix */
.properties_table_cell a[href*="listings_property"] {
    display: inline-block !important; 
    font-weight: bold;
    color: #C5A059;
    font-size: 11px;
    margin-top: 0px !important;
}

/* --- FOOTER --- */
footer {
    padding: 20px;
    text-align: center;
    font-size: 11px;
    color: #999;
    border-top: 1px solid #eee;
    clear: both;
}

/* =================================================================
   MOBILE VIEW FIX (Prevents images falling off screen)
   ================================================================= */
@media screen and (max-width: 768px) {
    /* Force table cells to stack vertically */
    .properties_table td, 
    .properties_table tr, 
    .properties_table tbody, 
    .properties_table table {
        display: block;
        width: 100% !important;
        box-sizing: border-box; 
    }

    /* Center the images and text */
    .properties_table td {
        text-align: center;
        border-bottom: 1px solid #ddd; /* Separator line between houses */
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    /* Make images fit the screen */
    .properties_table img {
        float: none !important; /* Stop floating left */
        margin-right: 0 !important;
        max-width: 100%;
        height: auto;
        border: none !important;
        display: block;
        margin: 0 auto 10px auto; /* Center image */
    }
}

/* =================================================================
   SEARCH BAR FIX (Removes old Blue Box style)
   ================================================================= */
/* Targets the specific table structure Jade uses for search forms */
form table {
    background-color: #ffffff !important; 
    border: 1px solid #eee !important;
}

/* Make inputs look modern */
form input[type="text"], 
form select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 95%;
    margin-bottom: 10px;
    background-color: #fcfcfc;
}

/* Style the Search Button */
form input[type="submit"] {
    background-color: #C5A059; /* Your Gold Color */
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    width: 100%;
}
form input[type="submit"]:hover {
    background-color: #aa8c2c;
}

/* Hide the old blue background on table cells inside the form */
form table td {
    background-color: transparent !important;
    color: #333 !important;
}
