/* ==========================================================================
   Harcourts Connector Main Stylesheet v2.0.0
   ========================================================================== */

/* --------------------------------------------------------------------------
 * 1. Global Styles & Variables
 * -------------------------------------------------------------------------- */
:root {
    --hc-primary-color: #00aeef; /* Harcourts Blue */
    --hc-dark-blue: #001f49;
    --hc-text-color: #333;
    --hc-border-color: #e0e0e0;
    --hc-background-color: #f9f9f9;
}

.hc-featured-grid,
.hc-archive-grid,
.hc-single-listing-container {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--hc-text-color);
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* --------------------------------------------------------------------------
 * 2. Featured Listings Grid (Homepage) - UPDATED FOR 3-COLUMN LAYOUT
 * -------------------------------------------------------------------------- */
.hc-featured-columns-wrapper {
    display: flex;
    gap: 24px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.hc-featured-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* The first column is wider */
.hc-featured-column--large {
    flex: 2; /* Takes up twice as much space as the small columns */
}

/* The other two columns are narrower */
.hc-featured-column--small {
    flex: 1;
}

.hc-featured-item {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 280px; /* Set a fixed height for all items */
}

.hc-featured-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hc-featured-item__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 20%, transparent);
    z-index: 1;
}

.hc-featured-item__content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: #fff;
    z-index: 2;
}

.hc-featured-item__content .address-line-1 {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hc-featured-item__content .address-line-2 {
    display: block;
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
}

/* Responsive for the new column layout */
@media (max-width: 991px) {
    .hc-featured-columns-wrapper {
        /* On tablets, switch to a 2-column flex layout */
        flex-wrap: wrap;
    }
    .hc-featured-column--large {
        flex-basis: 100%; /* The large column takes full width */
        order: 1; /* Appears first */
    }
    .hc-featured-column--small {
        flex-basis: calc(50% - 12px); /* Two small columns side-by-side */
        order: 2;
    }
}

@media (max-width: 767px) {
    .hc-featured-columns-wrapper {
        /* On mobile, stack everything in a single column */
        flex-direction: column;
    }
}

/* --------------------------------------------------------------------------
 * 3. Archive Listings Grid (Listings/Solds Page)
 * -------------------------------------------------------------------------- */
.hc-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.hc-archive-item {
    background-color: #fff;
    border: 1px solid var(--hc-border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.hc-archive-item:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.hc-archive-item__image-link {
    display: block;
    position: relative;
}

.hc-archive-item__image {
    height: 220px;
    background-size: cover;
    background-position: center;
}

.hc-archive-item__sold-banner {
    position: absolute;
    top: 15px;
    left: -30px;
    background-color: var(--hc-primary-color);
    color: #fff;
    padding: 5px 30px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    transform: rotate(-45deg);
}

.hc-archive-item__content {
    padding: 20px;
}

.hc-archive-item__title {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 18px;
    line-height: 1.3;
}

.hc-archive-item__title a {
    color: var(--hc-dark-blue);
    text-decoration: none;
}

.hc-archive-item__title a:hover {
    color: var(--hc-primary-color);
}

.hc-archive-item__address {
    margin: 0 0 15px;
    font-size: 14px;
    color: #666;
}

.hc-archive-item__meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}

.hc-archive-item__cta {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--hc-dark-blue);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.hc-archive-item__cta:hover {
    background-color: var(--hc-primary-color);
}

/* Responsive for Archive Grid */
@media (max-width: 991px) {
    .hc-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .hc-archive-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
 * 4. Single Listing Page - FINAL POLISHED DESIGN
 * -------------------------------------------------------------------------- */
.hc-single-listing-container {
    max-width: 1100px;
    margin: 30px auto;
}

.hc-single-listing {
    background: #fff;
}

/* Swiper Slider Styles */
.swiper { width: 100%; height: 550px; margin-bottom: 30px; }
.swiper-slide { background-size: cover; background-position: center; }
.swiper-button-next, .swiper-button-prev { color: #fff !important; }
.swiper-pagination-bullet-active { background-color: #fff !important; }

/* Flex container for the two columns below slider */
.hc-content-flex-container {
    display: flex;
    gap: 40px;
    padding: 0 30px;
}
.hc-content-cola { /* Left Column */
    flex: 1.1;
    min-width: 0;
}
.hc-content-colb { /* Right Column */
    flex: 1;
    min-width: 0;
    display: flex; /* Use flexbox for the right column itself */
    flex-direction: column;
    gap: 30px; /* Space between blocks in the right column */
}

.hc-single-listing__header { margin-bottom: 15px; }
.hc-single-listing__title { margin-top: 0; margin-bottom: 5px; font-size: 32px; line-height: 1.2; color: var(--hc-dark-blue); }
.hc-single-listing__address { font-size: 18px; font-weight: 500; margin: 0 0 15px; }
.hc-single-listing__description p { line-height: 1.7; font-size: 16px; }

/* START: New Meta Icons Styles */
.hc-single-listing__meta {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    color: var(--hc-text-color);
}
.hc-single-listing__meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hc-single-listing__meta img {
    width: 24px;
    height: 24px;
}
/* END: New Meta Icons Styles */


/* START: Polished block styles for the right column */
.hc-agent-card--new,
.hc-single-listing__features,
.hc-enquiry-buttons-wrapper {
    background: var(--hc-background-color);
    border: 1px solid var(--hc-border-color);
    border-radius: 8px;
}

/* Agent Card Styles */
.hc-agent-card--new {
    display: flex; align-items: center; gap: 20px;
    padding: 20px;
}
.hc-agent-card__photo--new {
    width: 140px !important; height: 140px !important; border-radius: 50% !important;
    object-fit: cover; flex-shrink: 0;
}
.hc-agent-card__details--new { text-align: left; }
.hc-agent-card__name--new { font-size: 20px; font-weight: bold; margin: 0 0 5px; }
.hc-agent-card__position--new { font-size: 15px; color: #666; margin: 0 0 10px; font-style: italic; }
.hc-agent-card__contact--new { font-size: 16px; margin: 5px 0; }
.hc-agent-card__contact--new strong { font-weight: bold; }
.hc-agent-card__contact--new a { color: var(--hc-dark-blue); text-decoration: none; }
.hc-agent-card__contact--new a:hover { text-decoration: underline; }

/* Property Information Table Styles */
.hc-single-listing__features {
    overflow: hidden; /* Important for border-radius to work on table */
}
.hc-features-table--new {
    width: 100%; border-collapse: collapse;
}
.hc-features-table--new thead th {
    background-color: #7d7d7d; color: #fff; padding: 12px; text-align: center;
    font-size: 18px; font-weight: 500;
}
.hc-features-table--new tbody td { padding: 12px; border-bottom: 1px solid #ddd; font-size: 15px; word-break: break-word; }
.hc-features-table--new tbody tr:last-child td { border-bottom: none; }
.hc-features-table--new tbody tr { background-color: #f7f7f7; }
.hc-features-table--new tbody tr:nth-child(even) { background-color: #fff; }
.hc-features-table--new tbody td:first-child { font-weight: bold; width: 30%; }

/* "More Information" button logic */
.hc-feature-row--hidden { display: none; }
.hc-features-table--new.show-all .hc-feature-row--hidden { display: table-row; }
.hc-button--more-info {
    width: 100%;
    border-radius: 0; /* Full width button */
    background-color: #000; color: #fff; border: none;
}

/* Enquiry & Download Buttons */
.hc-enquiry-buttons-wrapper {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
    padding: 20px;
    /* Remove individual button styles from this block */
    background: none;
    border: none;
}
.hc-button {
    display: block; width: 100%; padding: 14px; text-align: center;
    background-color: #000; color: #fff; text-decoration: none;
    border-radius: 8px; font-weight: bold; border: none; cursor: pointer;
    transition: background-color 0.2s ease;
}
.hc-button:hover { background-color: #333; }
/* END: Polished block styles */


/* Bottom Bar */
.hc-single-listing__bottom-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 30px; margin-top: 30px;
    border-top: 1px solid var(--hc-border-color); font-size: 14px;
}
.hc-single-listing__back-link { color: var(--hc-dark-blue); text-decoration: none; font-weight: bold; }
.hc-single-listing__back-link:hover { color: var(--hc-primary-color); }
.hc-single-listing__id { color: #888; font-family: monospace; }

/* Responsive Adjustments */
@media (max-width: 991px) {
    .hc-content-flex-container { flex-direction: column; padding: 0 15px; }
    .swiper { height: 400px; }
}

/* --------------------------------------------------------------------------
 * 5. Pagination Styles
 * -------------------------------------------------------------------------- */
.hc-pagination {
    margin: 40px 0;
    text-align: center;
}

.hc-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid var(--hc-border-color);
    background-color: #fff;
    color: var(--hc-dark-blue);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.hc-pagination .page-numbers:hover {
    background-color: var(--hc-primary-color);
    color: #fff;
    border-color: var(--hc-primary-color);
}

.hc-pagination .page-numbers.current {
    background-color: var(--hc-dark-blue);
    color: #fff;
    border-color: var(--hc-dark-blue);
    cursor: default;
}

.hc-pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* --------------------------------------------------------------------------
 * 6. Responsive Fix for Agent Card on Mobile
 * -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    /* Target the agent card specifically on smaller screens */
    .hc-agent-card--new {
        flex-direction: column; /* Change flex direction from row to column */
        text-align: center;     /* Center align the text below the image */
    }

    .hc-agent-card__photo--new {
        margin: 0 auto 15px auto; /* Center the image and add space below it */
    }

    .hc-agent-card__details--new {
        text-align: center; /* Ensure text details are centered */
    }
}

/* --------------------------------------------------------------------------
 * 7. Price / Sale Method Text Styles (NEW)
 * -------------------------------------------------------------------------- */

/* For the standard grid layout */
.hc-archive-item__price {
    font-size: 15px;
    font-weight: bold;
    color: var(--hc-dark-blue);
    margin: -5px 0 10px; /* Adjust spacing to be between title and address */
}

/* For the mosaic layout */
.hc-featured-item__price {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin-top: 8px; /* Space below the address */
    opacity: 0.9;
}