/**
 * Listing Cards Styles
 * Teal card layout matching JL Property brand
 */

/* ========================================
   LISTING GRID
   ======================================== */

.loop.epl-shortcode {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px;
    justify-content: flex-start;
}

/* Each listing card */
.loop.epl-shortcode .epl-listing-post.epl-property-blog {
    display: block !important;
    float: none !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Card wrapper - teal background, beige on hover */
.epl-listing-post .epl-property-blog-entry-wrapper {
    display: flex !important;
    flex-direction: column !important;
    border-radius: 5px;
    overflow: hidden;
    background: #2E707A;
    height: 100%;
    transition: background 0.3s ease;
    position: relative;
    cursor: pointer;
}

/* Stretch the address link over the entire card */
.epl-listing-post .property-address a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.epl-listing-post .epl-property-blog-entry-wrapper:hover {
    background: #f0f0eb;
}

/* Dark text on beige hover */
.epl-listing-post .epl-property-blog-entry-wrapper:hover .property-address a,
.epl-listing-post .epl-property-blog-entry-wrapper:hover .item-street {
    color: #222 !important;
}

.epl-listing-post .epl-property-blog-entry-wrapper:hover .entry-title-sub {
    color: #666 !important;
}

.epl-listing-post .epl-property-blog-entry-wrapper:hover .jlpc-listing-icon {
    color: #555;
}

.epl-listing-post .epl-property-blog-entry-wrapper:hover .jlpc-listing-icon svg {
    color: #666;
}

.epl-listing-post .epl-property-blog-entry-wrapper:hover .page-price,
.epl-listing-post .epl-property-blog-entry-wrapper:hover .page-price-rent {
    color: #2E707A !important;
}

/* ========================================
   IMAGE SECTION
   ======================================== */

.epl-listing-post .property-box.property-box-left,
.epl-listing-post .property-featured-image-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
}

.epl-listing-post .epl-archive-entry-image,
.epl-listing-post .epl-archive-entry-image a,
.epl-listing-post .epl-blog-image {
    display: block !important;
    width: 100% !important;
}

.epl-listing-post .epl-blog-image {
    position: relative;
    overflow: hidden;
}

.epl-listing-post .epl-blog-image img,
.epl-listing-post .teaser-left-thumb {
    width: 100% !important;
    max-width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
    display: block !important;
}

/* ========================================
   HOME OPEN / INSPECTION TIMES
   ======================================== */

.epl-listing-post .property-featured-image-wrapper {
    position: relative;
}

.epl-listing-post .epl-inspection-times {
    display: block !important;
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    margin: 0;
    padding: 10px 24px !important;
    background: rgba(0, 0, 0, 0.50);
}

.epl-listing-post .epl-inspection-times .epl-inspection-times-label {
    font-weight: 600;
    color: #fff;
    margin: 0 0 2px;
    display: block;
}

.epl-listing-post .epl-inspection-times ul.home-open-wrapper {
    margin: 0;
    padding: 0;
    list-style: none;
}

.epl-listing-post .epl-inspection-times ul.home-open-wrapper li {
    margin: 0;
    line-height: 1.3;
}

.epl-listing-post .epl-inspection-times a.epl_inspection_calendar {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
}

.epl-listing-post .epl-property-blog-entry-wrapper:hover .epl-inspection-times {
    color: rgba(255, 255, 255, 0.95);
}

.epl-listing-post .epl-property-blog-entry-wrapper:hover .epl-inspection-times .epl-inspection-times-label {
    color: #fff;
}

.epl-listing-post .epl-property-blog-entry-wrapper:hover .epl-inspection-times a.epl_inspection_calendar {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ========================================
   CONTENT SECTION - White text on teal
   ======================================== */

.epl-listing-post .property-box.property-box-right,
.epl-listing-post .property-content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 20px 24px 24px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
    flex: 1;
    box-sizing: border-box;
    color: #fff;
}

/* Hide excerpt */
.epl-listing-post .entry-content,
.epl-listing-post .epl-excerpt-content {
    display: none !important;
}

/* Hide heading */
.epl-listing-post .entry-title {
    display: none !important;
}

/* Address */
.epl-listing-post .property-address {
    order: 1;
}

.epl-listing-post .property-address a {
    text-decoration: none !important;
    color: #fff !important;
}

.epl-listing-post .item-street {
    display: block !important;
    font-size: 1.1rem;
    font-weight: 400;
    color: #fff !important;
    line-height: 1.3;
}

.epl-listing-post .entry-title-sub {
    display: inline !important;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8) !important;
}

.epl-listing-post .item-suburb {
    text-transform: capitalize;
}

/* Icons - white */
.epl-listing-post .property-feature-icons {
    order: 2;
    padding: 6px 0;
}

.jlpc-listing-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jlpc-listing-icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #fff;
}

.jlpc-listing-icon svg {
    fill: none;
    color: rgba(255, 255, 255, 0.85);
}

.jlpc-listing-icon circle {
    fill: none;
}

/* Price - white */
.epl-listing-post .price {
    order: 3;
    margin-top: auto !important;
    padding-top: 6px;
    position: relative;
    z-index: 2;
}

.epl-listing-post .page-price,
.epl-listing-post .page-price-rent {
    font-size: 1rem;
    font-weight: 400;
    color: #fff !important;
}

.epl-listing-post .jlpc-price-card-link {
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.epl-listing-post .epl-property-blog-entry-wrapper:hover .jlpc-price-card-link {
    color: #2E707A !important;
}

/* ========================================
   EPL STICKERS (status badges)
   ======================================== */

.epl-listing-post .epl-stickers-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    gap: 6px;
}

/* Push the "Open Home" sticker to the right */
.epl-listing-post .epl-stickers-wrapper .status-sticker.open {
    margin-left: auto;
}

/* ========================================
   CLEARFIX OVERRIDES
   ======================================== */

.epl-listing-post .epl-clearfix::before,
.epl-listing-post .epl-clearfix::after {
    display: none !important;
}

/* ========================================
   PAGINATION
   ======================================== */

.loop.epl-shortcode .loop-footer {
    width: 100%;
}

div.epl-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    gap: 6px;
    padding: 24px 0;
    text-align: center;
    width: 100%;
    float: none !important;
}

.epl-pagination a,
.epl-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.epl-pagination a {
    color: #2E707A;
    background: #fff;
}

.epl-pagination a:hover {
    background: #2E707A;
    color: #fff;
    border-color: #2E707A;
}

.epl-pagination span.current {
    background: #2E707A;
    color: #fff;
    font-weight: 600;
    border-color: #2E707A;
}

.epl-pagination span.pages {
    color: #666;
    background: none;
    border: 1px solid #ccc;
    font-size: 0.85rem;
}

.epl-pagination span.extend {
    color: #999;
    background: none;
    border: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 640px) {
    .loop.epl-shortcode {
        gap: 16px;
    }

    .epl-listing-post .epl-blog-image img,
    .epl-listing-post .teaser-left-thumb {
        height: 200px !important;
    }
}
