/* =========================================
   GLOBAL OVERRIDES & VARIABLES
   ========================================= */

/* Apply Dynamic Variables */
body {
    background-color: var(--ev-body-bg, #f9f9f9) !important;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ev-heading-color, #222222) !important;
}

/* Fix white text on white background issues */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6,
.site-main h1,
.site-main h2,
.site-main h3,
.site-main h4,
.site-main h5,
.site-main h6 {
    color: var(--ev-page-heading-color, #222222) !important;
}

.entry-content p,
.entry-content li,
.page-content p,
.page-content li,
.site-main p,
.site-main li {
    color: var(--ev-text-color, #333333) !important;
}

/* Process Steps (Verhuren) - Ensure readable text */
.elitvastgoed-process-steps,
.elitvastgoed-process-steps h3,
.elitvastgoed-process-steps p {
    color: var(--ev-text-color, #333333) !important;
}

.elitvastgoed-step h3 {
    color: var(--ev-process-step-heading-color, #222222) !important;
}

.elitvastgoed-step p {
    color: var(--ev-text-color, #555555) !important;
}

/* Carousel/Slider Headings - High specificity to override parent inline styles */
/* Note: These will be overridden by page-specific selectors below */
.carouselcaption h1,
.carouselcaption h2,
.carouselcaption h3,
.carouselcaption h4,
.carouselcaption h5,
.carouselcaption h6,
.sliderTitle,
.sliderTitle span {
    /* Color will be set by page-specific CSS variables */
}

/* Homepage Carousel Headings - Maximum specificity to override inline styles */
body.home .carouselcaption h1,
body.home .carouselcaption h1.sliderTitle,
body.home .sliderTitle,
body.home .sliderTitle span,
body.home .sliderTitle span.small,
body.home .elitvastgoed-hero .carouselcaption h1,
body.home .elitvastgoed-hero .carouselcaption h1.sliderTitle,
body.home .elitvastgoed-hero .carouselcaption .sliderTitle,
body.home .elitvastgoed-hero .carouselcaption .sliderTitle span,
body.home .slider-container .carouselcaption h1,
body.home .slider-container .carouselcaption h1.sliderTitle,
.carouselcaption h1.sliderTitle,
.carouselcaption h1.sliderTitle span,
.carouselcaption h1.sliderTitle span.small,
.elitvastgoed-hero .carouselcaption h1.sliderTitle,
.elitvastgoed-hero .carouselcaption h1.sliderTitle span,
.elitvastgoed-hero .carouselcaption .sliderTitle,
.elitvastgoed-hero .carouselcaption .sliderTitle span,
.slider-container .carouselcaption h1.sliderTitle,
.slider-container .carouselcaption h1.sliderTitle span,
h1.sliderTitle,
h1.sliderTitle span,
h1.sliderTitle span.small {
    color: var(--ev-homepage-h1, #222222) !important;
}
body.home .carouselcaption h2,
body.home .elitvastgoed-hero .carouselcaption h2,
.carouselcaption h2,
.elitvastgoed-hero .carouselcaption h2 {
    color: var(--ev-homepage-h2, #222222) !important;
}

/* Contact Page - Individual heading levels - High specificity */
body.page-contact .entry-content h1,
body.page-contact .page-content h1,
body.page-contact .site-main h1,
body.page-contact .carouselcaption h1,
body.page-contact .sliderTitle,
body.page-contact .sliderTitle span,
#main .entry-content h1,
.site-main .entry-content h1 {
    color: var(--ev-contact-h1, #222222) !important;
}
body.page-contact .entry-content h2,
body.page-contact .page-content h2,
body.page-contact .site-main h2,
body.page-contact .carouselcaption h2,
#main .entry-content h2,
.site-main .entry-content h2 {
    color: var(--ev-contact-h2, #222222) !important;
}
body.page-contact .entry-content h3,
body.page-contact .page-content h3,
body.page-contact .site-main h3,
body.page-contact .row h3,
body.page-contact .col-md-6 h3,
body.page-contact .row .col-md-6 h3,
#main .entry-content .row .col-md-6 h3,
.site-main .entry-content .row .col-md-6 h3,
.content-area .entry-content .row .col-md-6 h3,
.entry-content .row .col-md-6 h3 {
    color: var(--ev-contact-h3, #222222) !important;
}
body.page-contact .entry-content h4,
body.page-contact .page-content h4,
body.page-contact .site-main h4,
#main .entry-content h4,
.site-main .entry-content h4 {
    color: var(--ev-contact-h4, #222222) !important;
}
body.page-contact .entry-content h5,
body.page-contact .page-content h5,
body.page-contact .site-main h5,
#main .entry-content h5,
.site-main .entry-content h5 {
    color: var(--ev-contact-h5, #222222) !important;
}
body.page-contact .entry-content h6,
body.page-contact .page-content h6,
body.page-contact .site-main h6,
#main .entry-content h6,
.site-main .entry-content h6 {
    color: var(--ev-contact-h6, #222222) !important;
}

a {
    color: var(--ev-link-color, var(--ev-primary)) !important;
}

/* HEADER STYLES - Fix readability */
#masthead, 
.site-header,
.navbar-default {
    background-color: var(--ev-header-bg, #ffffff) !important;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

#masthead .navbar-brand,
.navbar-default .navbar-brand,
.site-title a,
.navbar-nav > li > a,
.main-navigation a,
.main-navigation .menu-item a,
.nav-menu li a,
.menu li a {
    color: var(--ev-header-text, #333333) !important;
}

/* Fix dark menu items on dark background if theme defaults match */
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus,
.main-navigation a:hover,
.main-navigation .menu-item a:hover {
    color: var(--ev-primary) !important;
    background-color: transparent !important;
}

/* FOOTER STYLES */
#colophon,
.site-footer,
footer#footer {
    background-color: var(--ev-footer-bg, #222222) !important;
    color: var(--ev-footer-text, #eeeeee) !important;
}

#colophon a,
.site-footer a,
footer#footer a {
    color: var(--ev-footer-text, #eeeeee) !important;
    opacity: 0.8;
}

#colophon a:hover,
.site-footer a:hover,
footer#footer a:hover {
    color: var(--ev-primary) !important;
    opacity: 1;
}

#colophon h1, #colophon h2, #colophon h3, #colophon h4, #colophon h5, #colophon h6,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4, .site-footer h5, .site-footer h6,
footer#footer h1, footer#footer h2, footer#footer h3, footer#footer h4, footer#footer h5, footer#footer h6 {
    color: #fff !important;
}

/* Fix copyright text visibility */
.site-info, .copyright {
    background-color: rgba(0,0,0,0.2) !important;
    color: #999 !important;
}

/* BUTTONS */
input[type="submit"], 
button[type="submit"], 
.btn, 
.button, 
.havenlytics-btn-primary,
.btn-primary {
    background-color: var(--ev-button-bg, var(--ev-primary)) !important;
    color: var(--ev-button-text, #ffffff) !important;
    border: none !important;
}

input[type="submit"]:hover, 
button[type="submit"]:hover, 
.btn:hover, 
.button:hover, 
.havenlytics-btn-primary:hover,
.btn-primary:hover {
    background-color: var(--ev-primary) !important;
    opacity: 0.9;
    color: var(--ev-button-text, #ffffff) !important;
}

/* =========================================
   HOME & SEARCH PAGE STYLES (RENTASTONE)
   ========================================= */

/* Hero Section */
.elitvastgoed-hero {
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex !important; /* Specificity */
    align-items: center;
    justify-content: center;
    height: 500px !important; /* Override potential theme heights */
    margin-bottom: 30px;
}

.elitvastgoed-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3); /* Overlay for text readability */
    z-index: 1;
}

.elitvastgoed-hero .container {
    z-index: 2;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Featured / Specials Grid (replicate .object.special from Rentastone) */
.havenlytics-property-card-grid {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    background: #fff;
    margin-bottom: 30px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.havenlytics-property-card-grid:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

.havenlytics-property-thumbnail-item {
    position: relative;
    overflow: hidden;
}

.havenlytics-property-thumbnail-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.havenlytics-property-card-grid:hover .havenlytics-property-thumbnail-item img {
    transform: scale(1.1);
}

/* Status Labels */
.havenlytics-property-featured {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--ev-primary);
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
    border-radius: 2px;
}

.havenlytics-property--content {
    padding: 20px;
    position: relative;
    display: block !important; /* Force standard block flow */
}

.havenlytics-property-title {
    margin-bottom: 5px !important;
    margin-top: 0 !important;
    float: none !important;
    position: static !important;
}

.havenlytics-property-title a {
    color: #333;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    display: block;
}

.havenlytics-property-amount {
    margin-bottom: 15px !important;
    margin-top: 0 !important;
    float: none !important;
    position: static !important;
}

.havenlytics-property-amount h5 {
    color: var(--ev-primary);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.havenlytics-property-short-details {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    float: none !important;
    position: static !important;
    clear: both;
}

.havenlytics-property-location {
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
}

.havenlytics-property-short-details li {
    font-size: 13px;
    color: #555;
    list-style: none;
}

.heavenlytics-property-meta-item svg {
    fill: #999;
    margin-right: 5px;
    vertical-align: middle;
}

/* Remove default button style to match Rentastone cleaner look */
.havenlytics-btn-primary.havenlytics-btn-style-2 {
    display: none; 
}

/* Branche Logos Hover */
.widget.branche-logos .item:hover img {
    opacity: 1 !important;
}

/* Home Grid Cards */
.elitvastgoed-home-grid {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 40px;
    background: transparent !important;
}

.elitvastgoed-home-grid.row {
    background: transparent !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Results Grid - Equal Height Cards */
.elitvastgoed-results-grid.row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
}

.elitvastgoed-results-grid .col-md-4,
.elitvastgoed-results-grid .col-sm-6 {
    display: flex !important;
    flex-direction: column !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-bottom: 30px !important;
}

.elitvastgoed-results-grid .grid_card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.elitvastgoed-results-grid .grid_card .content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.elitvastgoed-results-grid .grid_card .content > div:last-child {
    margin-top: auto !important;
}

.elitvastgoed-results-grid .grid_card .content h3 {
    min-height: 2.4em !important;
    line-height: 1.2 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.elitvastgoed-home-grid .col-md-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding: 0 15px;
    background: transparent !important;
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .elitvastgoed-home-grid .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
}

.elitvastgoed-home-grid .grid_card {
    display: block;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 300px; /* Fixed height for consistency */
    text-decoration: none;
}

.elitvastgoed-home-grid .grid_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    z-index: 5;
}

.elitvastgoed-home-grid .grid_card .image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.elitvastgoed-home-grid .grid_card .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8; /* Darken slightly for text contrast */
    transition: opacity 0.3s ease;
}

.elitvastgoed-home-grid .grid_card:hover .image img {
    opacity: 0.6;
}

.elitvastgoed-home-grid .grid_card .content {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 2;
}

.elitvastgoed-home-grid .grid_card h2 {
    margin: 0;
    color: #fff !important; /* White text on dark bg */
    font-size: 18px !important;
    line-height: 1.4;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.elitvastgoed-home-grid .grid_card h2 strong {
    color: var(--ev-primary) !important;
    display: block;
    font-size: 24px;
    margin-top: 5px;
}

/* Search Container (Rentastone Style) */
.elitvastgoed-search-container {
    background: transparent;
    position: relative;
    z-index: 100; /* Ensure dropdown is above other elements */
}

.elitvastgoed-search-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    border-bottom: 1px solid #ddd;
}

.elitvastgoed-search-tabs li {
    margin-right: 5px;
}

.elitvastgoed-search-tabs a {
    display: block;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    border-radius: 4px 4px 0 0;
    border: 1px solid #ddd;
    border-bottom: none;
    font-weight: 500;
}

.elitvastgoed-search-tabs a.active {
    background: #fff;
    color: var(--ev-primary);
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    font-weight: 700;
}

.elitvastgoed-search-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.elitvastgoed-form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end; /* Align items to bottom */
}

.elitvastgoed-form-inline .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
    position: relative; /* For autocomplete dropdown positioning */
    display: flex;
    flex-direction: column;
    padding-bottom: 20px; /* Space for the toggle text */
}

.elitvastgoed-form-inline .form-group .ev-price-toggle {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 11px;
    line-height: 1.2;
    height: auto;
    white-space: nowrap;
    margin-top: 0;
    cursor: pointer;
    color: #666;
    display: block;
}

/* Location input specific styling */
.elitvastgoed-form-inline .form-group:first-child {
    flex: 2;
    min-width: 250px;
}

.elitvastgoed-form-inline .form-control {
    width: 100%;
    height: 45px !important; /* Force height */
    line-height: 1.5;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    color: #333;
    box-sizing: border-box; /* Ensure padding doesn't affect width/height calculation */
    margin: 0; /* Remove any default margins */
    margin-bottom: 0 !important;
}

.elitvastgoed-form-inline .form-group {
    padding-bottom: 20px; /* Space for the toggle text */
}

.elitvastgoed-form-inline .submit-btn {
    flex: 0 0 auto;
}

.elitvastgoed-form-inline .btn-primary {
    background-color: var(--ev-primary);
    border: none;
    padding: 0 30px;
    height: 45px !important; /* Force match input height */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
    color: #fff;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0; /* Remove default margins */
    white-space: nowrap;
    box-sizing: border-box;
}

/* Autocomplete Dropdown */
.elitvastgoed-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.elitvastgoed-autocomplete-results li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 14px;
}

.elitvastgoed-autocomplete-results li:last-child {
    border-bottom: none;
}

.elitvastgoed-autocomplete-results li:hover {
    background-color: #f5f5f5;
    color: var(--ev-primary);
}

@media (max-width: 768px) {
    .elitvastgoed-form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    .elitvastgoed-form-inline .form-group {
        width: 100%;
        min-width: 100%;
    }
    .elitvastgoed-form-inline .submit-btn {
        width: 100%;
    }
    .elitvastgoed-form-inline .btn-primary {
        width: 100%;
    }
}
.elitvastgoed-filters-sidebar {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    padding: 20px;
    margin-bottom: 30px;
}

.elitvastgoed-filters-sidebar .widget {
    margin-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 20px;
}

.elitvastgoed-filters-sidebar .widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.elitvastgoed-filters-sidebar .filter-toggle {
    width: 100%;
    text-align: left;
    background: none !important;
    border: none !important;
    padding: 10px 0 !important;
    color: var(--ev-secondary) !important;
    font-weight: 700 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: none !important;
}

.elitvastgoed-filters-sidebar .filter-toggle:hover {
    color: var(--ev-primary) !important;
}

.elitvastgoed-filters-sidebar .filter-content {
    padding-top: 10px;
}

.elitvastgoed-filters-sidebar .form-control {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
}

.elitvastgoed-filters-sidebar .editor-radio {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.elitvastgoed-filters-sidebar .editor-radio input {
    margin-right: 8px;
}

.elitvastgoed-filters-sidebar .editor-radio label {
    font-weight: 400 !important;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 0;
}

/* Search Header */
.search-header {
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.search-header h1 {
    font-size: 24px !important;
    margin: 0 !important;
    text-transform: uppercase;
}

/* =========================================
   PAGE CONTENT STYLES
   ========================================= */

/* Contact Details */
.elitvastgoed-contact-info {
    color: #333333 !important;
}

.elitvastgoed-contact-info p {
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: flex-start;
    color: #333333 !important;
}

.elitvastgoed-contact-info a {
    color: var(--ev-primary, #f39200) !important;
    text-decoration: none;
}

.elitvastgoed-contact-info a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.elitvastgoed-contact-info i {
    width: 25px;
    color: var(--ev-primary, #f39200) !important;
    margin-right: 10px;
    margin-top: 5px;
}

.elitvastgoed-contact-info span {
    color: #333333 !important;
}

/* Social media links - same styling as other contact info */
.elitvastgoed-contact-info a[target="_blank"] {
    display: inline-block;
}

.elitvastgoed-contact-info a[target="_blank"] i {
    margin-right: 10px;
    margin-top: 5px;
    width: 25px;
}

/* Footer overrides - keep footer text color for footer only */
.site-footer .elitvastgoed-contact-info,
footer .elitvastgoed-contact-info {
    color: inherit !important;
}

.site-footer .elitvastgoed-contact-info p,
footer .elitvastgoed-contact-info p {
    color: inherit !important;
}

.site-footer .elitvastgoed-contact-info a,
footer .elitvastgoed-contact-info a {
    color: inherit !important;
}

.site-footer .elitvastgoed-contact-info span,
footer .elitvastgoed-contact-info span {
    color: inherit !important;
}

.elitvastgoed-social-links a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.elitvastgoed-social-links a:hover {
    color: var(--ev-primary);
}

/* Process Steps (Verhuren) */
.elitvastgoed-process-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.elitvastgoed-step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.elitvastgoed-step-number {
    width: 50px;
    height: 50px;
    background: var(--ev-primary);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    line-height: 50px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.elitvastgoed-step h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

/* Team Grid (Over ons) */
.elitvastgoed-team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.elitvastgoed-team-member {
    flex: 0 0 calc(33.333% - 20px);
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.elitvastgoed-team-img {
    height: 250px;
    background-position: center;
    background-size: cover;
    background-color: #eee;
}

.elitvastgoed-team-info {
    padding: 20px;
    text-align: center;
}

.elitvastgoed-team-info h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.elitvastgoed-team-info p {
    color: #777;
    margin: 0;
    font-size: 14px;
}

/* Services Grid (Diensten) */
.elitvastgoed-services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.elitvastgoed-service-card {
    flex: 0 0 calc(50% - 15px);
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    border-left: 4px solid var(--ev-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.elitvastgoed-service-card:hover {
    transform: translateY(-5px);
}

.elitvastgoed-service-card h3 {
    margin-top: 0;
    color: #333;
}

@media (max-width: 768px) {
    .elitvastgoed-team-member,
    .elitvastgoed-service-card {
        flex: 0 0 100%;
    }
}

/* Map Container */
.elitvastgoed-map-container {
    width: 100%;
    height: 600px !important;
    position: relative;
    overflow: hidden;
}

.elitvastgoed-map-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0;
    position: absolute;
    top: 0;
    left: 0;
}

/* Energy Labels */
.object_energyclass {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    margin-left: 10px;
    background: #999; /* Default */
}
.object_energyclass-A, .object_energyclass-A_, .object_energyclass-A____ { background-color: #27a844; }
.object_energyclass-B { background-color: #4db748; }
.object_energyclass-C { background-color: #a4cf3d; }
.object_energyclass-D { background-color: #f7ec00; color: #333; }
.object_energyclass-E { background-color: #f29f00; }
.object_energyclass-F { background-color: #e65100; }
.object_energyclass-G { background-color: #d32f2f; }

/* Favorites */
.object_favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    cursor: pointer;
}
.object_favorite i {
    color: rgba(255,255,255,0.8);
    font-size: 24px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    transition: color 0.3s, transform 0.3s;
}
.object_favorite:hover i {
    transform: scale(1.1);
    color: #fff;
}
.object_favorite.active i {
    color: #ff4081; /* Pink/Red */
    font-weight: 900; /* Solid heart */
}

/* =========================================
   OVERRIDE HAVENLYTICS HARDCODED BLUE COLORS
   ========================================= */

/* Property Price Background - Override hardcoded rgba(108, 96, 254, 0.1) */
/* Note: Actual rgba values are set via PHP in output_dynamic_css() */
/* This CSS file provides fallback overrides */
.havenlytics_property_single .property-price,
.property-price,
.havenlytics-property-price {
    color: var(--havenlytics-primary, var(--ev-secondary)) !important;
}

/* Sorting & Layout Bar */
.elitvastgoed-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.elitvastgoed-sort-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Agent Sidebar */
.elitvastgoed-agent-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.elitvastgoed-agent-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    display: block;
}
.elitvastgoed-agent-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--ev-heading-color);
}
.elitvastgoed-agent-role {
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Similar Properties & Status Badge Styling */
.elitvastgoed-similar-properties .grid_card {
    display: block;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 20px;
}

.elitvastgoed-similar-properties .image {
    position: relative !important; /* Ensure absolute children are positioned relative to this */
    overflow: hidden;
}

.elitvastgoed-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    /* Background and color will be set by dynamic CSS based on data-status attribute */
    color: #ffffff;
    font-weight: 700 !important;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 5;
    /* Inline styles from PHP handle padding/font-size, but bold is enforced here */
}

@media print {
    /* 1. HIDE EVERYTHING NON-ESSENTIAL */
    #masthead, .site-header, 
    #colophon, .site-footer, footer,
    #secondary, .sidebar, .widget-area,
    .main-navigation, .nav-links, .post-navigation,
    .elitvastgoed-share-bar, .elitvastgoed-ticket-trigger, 
    .elitvastgoed-video-section, .elitvastgoed-similar-properties,
    .elitvastgoed-search-container, .elitvastgoed-mortgage-calc,
    .elitvastgoed-map-container, 
    button, input, select, textarea, .btn, .button,
    .comments-area, .edit-link, .cookie-consent {
        display: none !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
    }

    /* 2. RESET LAYOUT CONTAINERS */
    html, body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt !important;
        line-height: 1.5;
        height: auto !important;
        overflow: visible !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #page, .site, .site-content, .content-area, .site-main, .entry-content {
        background: transparent !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        position: static !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* 3. SPECIFIC CONTENT STYLING */
    /* Hide page titles on all pages */
    .page .entry-header,
    .page .entry-title,
    .page h1.entry-title,
    .page h2.entry-title,
    .page-title,
    .entry-header .entry-title {
        display: none !important;
    }

    h1.entry-title, h1.post-title {
        font-size: 24pt !important;
        color: #000 !important;
        margin: 0 0 20px 0 !important;
        padding-bottom: 10px !important;
        border-bottom: 2px solid #000 !important;
        page-break-after: avoid;
    }

    .entry-content p {
        orphans: 3;
        widows: 3;
    }

    /* Images */
    img, .wp-post-image {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        page-break-inside: avoid;
    }

    /* Agent Card */
    .elitvastgoed-agent-card {
        display: block !important;
        border: 1px solid #000 !important;
        background: #f9f9f9 !important;
        padding: 15px !important;
        margin: 20px 0 !important;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact; 
        print-color-adjust: exact;
    }

    /* Features & Neighborhood */
    .elitvastgoed-features-section,
    .elitvastgoed-neighborhood-section {
        display: block !important;
        margin-top: 20px !important;
        page-break-inside: avoid;
    }

    .elitvastgoed-features-table td, 
    .elitvastgoed-features-table th {
        border-bottom: 1px solid #ccc !important;
        padding: 5px 0 !important;
    }

    /* Links */
    a {
        text-decoration: none !important;
        color: #000 !important;
    }
    
    /* Remove link URL expansion in some print stylesheets */
    a:after {
        content: "" !important;
    }
}
