/* --- 1. CORE THEME VARIABLES & DEFAULTS --- */
:root {
    --brand-green-dark: #1e4620;
    --brand-green-accent: #2a9d8f;
    --brand-green-mid: #81c784;
    --brand-green-light: #e8f5e9;
    --glow-color: rgba(129, 199, 132, 0.5);
    --text-on-dark: #fbfdfb;
    --text-primary: #1a3b1a;
    --text-secondary: #36533c;
    --bg-light: #fbfdfb;
    --border-color: #dde5dd;
    --error-color: #e74c3c;

    /* Animation durations */
    --animation-duration: 0.6s;
    --animation-duration-fast: 0.3s;
    --animation-duration-med: 0.5s;

    /* JS-driven variables for interactivity */
    --mouse-x: 50%;
    --mouse-y: 50%;
    --x: 50%;
    --y: 50%;
}

/* Universal Box Sizing for consistent layout */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
}

.tpl-font-playfair {
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.02em;
}

/* --- 2. THEME-CONSISTENT BUTTONS --- */
.tpl-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.25rem;
    border-radius: 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    font-size: 1rem;
    color: #fff;
    background-image: linear-gradient(110deg, var(--brand-green-accent) 0%, var(--brand-green-mid) 100%);
    box-shadow: 0 10px 30px -5px rgba(42, 157, 143, 0.4), 0 0 15px var(--glow-color) inset;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    background-size: 250% auto;
    outline: none;
    position: relative;
    overflow: hidden;
}

.tpl-btn-primary:hover, .tpl-btn-primary:focus {
    background-position: right center;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 18px 45px -8px rgba(42, 157, 143, 0.5), 0 0 20px var(--glow-color) inset;
    outline: 2px solid var(--brand-green-accent);
    outline-offset: 2px;
}

.tpl-btn-primary:focus-visible {
    outline: 2px solid var(--brand-green-accent);
    outline-offset: 2px;
}

.tpl-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tpl-btn-primary:hover::before, .tpl-btn-primary:focus::before {
    left: 100%;
}

.tpl-btn-arrow {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tpl-btn-primary:hover .tpl-btn-arrow {
    transform: translateX(5px);
}

.tpl-btn-secondary {
    padding: 0.875rem 2rem;
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--animation-duration-fast) ease;
    font-family: 'Manrope', sans-serif;
    border-radius: 0;
}
.tpl-btn-secondary:hover {
    color: var(--brand-green-accent);
    text-decoration: underline;
}
.tpl-btn-secondary:focus-visible {
    outline: 2px solid var(--brand-green-accent);
    outline-offset: 2px;
}

/* Section Divider */
.tpl-section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--brand-green-accent) 0%, var(--brand-green-mid) 50%, var(--brand-green-accent) 100%);
    margin: 0 auto;
    box-shadow: 0 0 10px var(--glow-color);
    border: none;
}

/* Fade-in Animation Utility */
.tpl-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(.2, .8, .2, 1), transform 1s cubic-bezier(.2, .8, .2, 1);
}
.tpl-fade-in-up.tpl-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 3. HERO SECTION --- */
#tpl-listings-hero-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark);
    text-align: center;
    perspective: 1200px;
    padding-top: 80px;
    box-sizing: border-box;
    background-color: var(--brand-green-dark);
}

.tpl-listings-hero-layer {
    position: absolute;
    top: -5%; left: -5%;
    width: 110%; height: 110%;
    background-size: cover;
    background-position: center;
    transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.3, 1);
}

#tpl-hero-layer-base {
    background-image: url('/assets/images/property-list-hero.png'); /* Explicit path to assets/images */
    filter: brightness(0.5) contrast(1.1);
    transform: translateZ(-200px) scale(1.5) translateX(calc(var(--mouse-x, 0.5) * -10px)) translateY(calc(var(--mouse-y, 0.5) * -10px));
}

#tpl-hero-layer-grid {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cdefs%3E%3Cpattern id='p' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Cpath d='M100 0H0v100' fill='none' stroke='%2381c784' stroke-width='0.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23p)'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    opacity: 0.1;
    mix-blend-mode: screen;
    transform: translateZ(-50px) scale(1.2) translateX(calc(var(--mouse-x, 0.5) * 20px)) translateY(calc(var(--mouse-y, 0.5) * 20px));
}

#tpl-hero-layer-overlay {
    background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(30, 70, 32, 0.8) 80%);
    z-index: 2;
}

#tpl-hero-layer-glow {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(129, 199, 132, 0.2) 0%, transparent 40%);
    mix-blend-mode: screen;
    z-index: 3;
}

.tpl-listings-hero-content {
    position: relative;
    z-index: 10;
    max-width: 950px; 
    padding: 2rem;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.tpl-hero-heading-line {
    display: block;
    overflow: hidden;
}
.tpl-hero-heading-line span {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1.2s cubic-bezier(0.5, 1, 0.89, 1);
}

.tpl-listings-hero-heading {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    text-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.tpl-listings-hero-subheading {
    font-size: 1.25rem;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    color: var(--brand-green-light);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out 0.8s, transform 1s ease-out 0.8s;
}

.tpl-listings-hero-cta {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out 1s;
}

.tpl-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-decoration: none;
    opacity: 0;
    animation: tpl-fadeInScroll 2s ease-out 2s forwards;
}
.tpl-scroll-indicator .tpl-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    position: relative;
}
.tpl-scroll-indicator .tpl-scroller {
    width: 4px;
    height: 8px;
    background-color: #fff;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: tpl-scroll-anim 2s infinite;
}
@keyframes tpl-scroll-anim {
    0% { top: 8px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}
@keyframes tpl-fadeInScroll {
    to { opacity: 1; }
}

/* Animation Trigger Class */
.tpl-content-loaded .tpl-hero-heading-line:nth-child(1) span { transition-delay: 0.2s; }
.tpl-content-loaded .tpl-hero-heading-line:nth-child(2) span { transition-delay: 0.4s; }
.tpl-content-loaded .tpl-hero-heading-line span,
.tpl-content-loaded .tpl-listings-hero-subheading,
.tpl-content-loaded .tpl-listings-hero-cta {
    transform: translateY(0);
    opacity: 1;
}

/* --- 4. FILTER BAR CONTAINER & LAYOUT --- */
#tpl-property-filter-section {
    padding: 2rem 1.5rem;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 50;
}

.tpl-filter-bar-container {
    max-width: 1400px;
    margin: 0 auto;
}

.tpl-filter-controls-wrapper {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .tpl-filter-controls-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem 2rem;
    }
}

/* --- 5. FILTER GROUP & GENERAL INPUT STYLING --- */
.tpl-filter-group {
    position: relative;
}

.tpl-filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.tpl-filter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tpl-filter-input-base {
    width: 100%;
    height: 3.5rem; /* 56px */
    padding: 0 1rem 0 2.75rem;
    font-size: 1rem;
    font-family: 'Manrope', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0;
    transition: all var(--animation-duration-fast) ease-in-out;
    appearance: none;
    -webkit-appearance: none;
}

.tpl-filter-input-base:focus {
    outline: none;
    border-color: var(--brand-green-accent);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.2), 0 0 8px rgba(42, 157, 143, 0.3);
}
.tpl-filter-group.tpl-open .tpl-filter-input-base {
    border-color: var(--brand-green-accent);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.2), 0 0 8px rgba(42, 157, 143, 0.3);
}

.tpl-filter-input-base.tpl-error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.tpl-filter-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color var(--animation-duration-fast) ease;
}

.tpl-filter-input-base:focus ~ .tpl-filter-input-icon {
    color: var(--brand-green-accent);
}

/* --- 6. CUSTOM MULTI-SELECT DROPDOWN --- */
.tpl-dropdown-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: transform var(--animation-duration-fast) ease;
}

.tpl-filter-group.tpl-open .tpl-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.tpl-multiselect-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -5px rgba(30, 70, 32, 0.15);
    z-index: 100;
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    transition: all var(--animation-duration-fast) ease;
    max-height: 250px;
    overflow-y: auto;
}

.tpl-filter-group.tpl-open .tpl-multiselect-dropdown {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.tpl-multiselect-list {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.tpl-multiselect-list-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background-color var(--animation-duration-fast) ease;
}

.tpl-multiselect-list-item:hover {
    background-color: var(--brand-green-light);
}

.tpl-multiselect-list-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--brand-green-accent);
}

/* --- 7. DUAL-HANDLE RANGE SLIDER --- */
.tpl-range-slider-wrapper {
    padding-top: 1rem;
}
.tpl-range-slider {
    position: relative;
    height: 4px;
    background-color: var(--border-color);
    width: 100%;
}
.tpl-range-slider-progress {
    position: absolute;
    height: 100%;
    background-color: var(--brand-green-accent);
    left: 0%;
    right: 0%;
}
.tpl-range-input {
    position: relative;
}
.tpl-range-input input {
    position: absolute;
    width: 100%;
    height: 4px;
    top: -4px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}
.tpl-range-input input::-webkit-slider-thumb {
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 50%;
    border: 3px solid #fff;
    background-color: var(--brand-green-accent);
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 2px 10px rgba(42, 157, 143, 0.4);
    cursor: grab;
    transition: background-color var(--animation-duration-fast) ease, border-color var(--animation-duration-fast) ease;
}
.tpl-range-input input::-webkit-slider-thumb:active {
    cursor: grabbing;
}
.tpl-range-input input.tpl-error::-webkit-slider-thumb {
    background-color: var(--error-color);
    border-color: var(--error-color);
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.4);
}
.tpl-range-tooltip {
    position: absolute;
    background-color: var(--brand-green-dark);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transform: translateX(-50%) translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--animation-duration-fast) ease, transform var(--animation-duration-fast) ease;
    pointer-events: none;
    z-index: 101;
}
.tpl-range-input:hover .tpl-range-tooltip,
.tpl-range-input input:focus + .tpl-range-tooltip,
.tpl-range-input input:active + .tpl-range-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-150%);
}

.tpl-range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.tpl-range-error-message {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    text-align: center;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity var(--animation-duration-fast) ease, max-height var(--animation-duration-fast) ease;
}
.tpl-range-error-message.tpl-visible {
    opacity: 1;
    max-height: 20px;
}

/* --- 8. ACTION BUTTONS & ACTIVE FILTERS --- */
.tpl-filter-actions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    grid-column: 1 / -1;
}

.tpl-active-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.5rem 0;
}
.tpl-result-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 1rem;
    white-space: nowrap;
}

.tpl-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--brand-green-light);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    animation: tpl-chip-fade-in 0.3s ease;
}

@keyframes tpl-chip-fade-in {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.tpl-filter-chip-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    transition: color var(--animation-duration-fast) ease;
    outline: none;
    border-radius: 50%;
}
.tpl-filter-chip-close:hover {
    color: var(--brand-green-dark);
}
.tpl-filter-chip-close:focus-visible {
    outline: 2px solid var(--brand-green-accent);
    outline-offset: 2px;
}

.tpl-filter-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.tpl-mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--brand-green-light);
    border: 1px solid var(--border-color);
    cursor: pointer;
    text-align: center;
    border-radius: 0;
    transition: background-color var(--animation-duration-fast) ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}
.tpl-mobile-filter-toggle:hover {
    background-color: rgba(129, 199, 132, 0.2);
}
.tpl-mobile-filter-toggle ion-icon {
    transition: transform var(--animation-duration-fast) ease;
}
.tpl-mobile-filter-toggle.tpl-open ion-icon {
    transform: rotate(180deg);
}

/* --- 9. PROPERTY LISTINGS SECTION --- */
#tpl-property-listings-section {
    padding: 2rem 2rem;
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e8f5e9' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.tpl-listings-container {
    max-width: 1400px;
    margin: 0 auto;
}

.tpl-listings-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tpl-view-toggle-buttons {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
}

.tpl-view-toggle-button {
    background-color: var(--bg-light);
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    outline: none;
}

.tpl-view-toggle-button:hover {
    background-color: var(--brand-green-light);
    color: var(--text-primary);
}

.tpl-view-toggle-button.tpl-active {
    background-color: var(--brand-green-accent);
    color: #fff;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}
.tpl-view-toggle-button.tpl-active:hover {
    background-color: var(--brand-green-accent);
    color: #fff;
}

.tpl-view-toggle-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.tpl-sort-dropdown-wrapper {
    position: relative;
    z-index: 10;
}

.tpl-sort-select {
    appearance: none;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    border-radius: 0;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tpl-sort-select:focus {
    border-color: var(--brand-green-accent);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.2);
}

.tpl-sort-dropdown-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.tpl-property-list-container {
    display: grid;
    gap: 2.5rem;
    transition: all 0.5s ease-in-out;
}

.tpl-property-list-container.tpl-grid-view {
    grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 768px) {
    .tpl-property-list-container.tpl-grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .tpl-property-list-container.tpl-grid-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tpl-property-list-container.tpl-list-view {
    grid-template-columns: 1fr;
}

.tpl-property-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.tpl-property-card::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    transform: translate(-50%, -50%) scale(0);
    width: 300px;
    height: 300px;
    background-image: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: none;
    z-index: 0;
    pointer-events: none;
}

.tpl-property-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}
.tpl-property-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.tpl-purpose-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--brand-green-accent);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.tpl-property-card-content {
    padding: 1rem 1.5rem;
    position: relative;
    z-index: 1;
}

.tpl-property-card-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand-green-dark);
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.tpl-property-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.tpl-property-card-location {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tpl-property-card-location svg {
    width: 1rem;
    height: 1rem;
    color: var(--brand-green-accent);
}

.tpl-property-acres {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}
.tpl-property-acres svg {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--brand-green-mid);
}

.tpl-property-card-detailed-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
    opacity: 0;
    pointer-events: none;
    padding-top: 0.75rem;
}

.tpl-property-card-detailed-features.tpl-expanded {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
}

.tpl-detailed-feature-item {
    display: flex;
    flex-direction: column;
    text-align: left;
    font-size: 1rem;
    line-height: 1.4;
}
.tpl-detailed-feature-label {
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}
.tpl-detailed-feature-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.tpl-show-more-toggle {
    display: block;
    width: fit-content;
    margin: 0.1rem auto 0.5rem auto;
    background: none;
    border: none;
    color: var(--brand-green-accent);
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
    outline: none;
    padding: 0.5rem 0;
}
.tpl-show-more-toggle:hover, .tpl-show-more-toggle:focus {
    color: var(--brand-green-dark);
}

.tpl-property-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.tpl-property-card-action-btn {
    flex-grow: 1;
    min-width: 100px;
    padding: 0.8rem 1rem;
    border-radius: 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
}

.tpl-action-btn-view-details {
    background-color: var(--brand-green-accent);
    color: #fff;
    border: 1px solid var(--brand-green-accent);
}
.tpl-action-btn-view-details:hover {
    background-color: var(--brand-green-dark);
    border-color: var(--brand-green-dark);
}

.tpl-action-btn-inquire {
    background-color: transparent;
    color: var(--brand-green-accent);
    border: 1px solid var(--brand-green-accent);
}
.tpl-action-btn-inquire:hover {
    background-color: var(--brand-green-light);
    color: var(--brand-green-dark);
    border-color: var(--brand-green-dark);
}

.tpl-action-btn-share {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.tpl-action-btn-share:hover {
    background-color: var(--brand-green-light);
    color: var(--text-primary);
    border-color: var(--brand-green-mid);
}

/* --- List View Specific Styles --- */
.tpl-property-list-container.tpl-list-view .tpl-property-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
}
@media (min-width: 768px) {
    .tpl-property-list-container.tpl-list-view .tpl-property-card {
        flex-direction: row;
        padding: 2rem;
    }
    .tpl-property-list-container.tpl-list-view .tpl-property-card-image-wrapper {
        width: 300px;
        height: 200px;
        flex-shrink: 0;
        margin-right: 2rem;
    }
    .tpl-property-list-container.tpl-list-view .tpl-property-card-content {
        flex-grow: 1;
        padding: 0;
    }
    .tpl-property-list-container.tpl-list-view .tpl-property-card-price {
        margin-top: 0.5rem;
    }
    .tpl-property-list-container.tpl-list-view .tpl-property-card-actions {
        justify-content: flex-start;
        margin-top: 1.5rem;
    }
    .tpl-property-list-container.tpl-list-view .tpl-property-card-action-btn {
        flex-grow: 0;
        width: auto;
    }
}
@media (max-width: 767px) {
    .tpl-listings-controls { gap: 1.5rem; }
    .tpl-view-toggle-button { padding: 0.6rem 0.8rem; }
    .tpl-sort-select { padding: 0.6rem 2rem 0.6rem 0.8rem; }
    .tpl-property-list-container.tpl-grid-view { grid-template-columns: 1fr; }
    .tpl-property-card-image-wrapper { height: 180px; }
    .tpl-property-card-content { padding: 1rem; }
}

/* --- 10. PERSONALIZED ASSISTANCE CTA SECTION --- */
#tpl-personalized-assistance-section {
    padding: 6rem 2rem;
    width: 100%;
    background-color: var(--bg-light);
}

.tpl-assistance-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.tpl-assistance-heading {
    font-family: 'Playfair Display', serif;
    font-size: 2.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

.tpl-assistance-text {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
}

/* --- 11. RESPONSIVE DESIGN --- */
@media (max-width: 767px) {
    #tpl-listings-hero-section { perspective: none; }
    .tpl-listings-hero-layer { transform: none !important; }
    #tpl-hero-layer-base, #tpl-hero-layer-grid { top: 0; left: 0; width: 100%; height: 100%; }
    .tpl-listings-hero-subheading { font-size: 1.1rem; }
    .tpl-btn-primary { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .tpl-scroll-indicator { display: none; }

    .tpl-listings-controls { gap: 1.5rem; }
    .tpl-view-toggle-button { padding: 0.6rem 0.8rem; }
    .tpl-sort-select { padding: 0.6rem 2rem 0.6rem 0.8rem; }
    .tpl-property-list-container.tpl-grid-view { grid-template-columns: 1fr; }
    .tpl-property-card-image-wrapper { height: 180px; }
    .tpl-property-card-content { padding: 1rem; }

    #tpl-personalized-assistance-section { padding: 4rem 1.5rem; }
    .tpl-assistance-heading { font-size: 2rem; margin-bottom: 1rem; }
    .tpl-assistance-text { font-size: 1rem; margin-bottom: 1.5rem; }
}

@media (max-width: 1023px) {
    .tpl-mobile-filter-toggle {
        display: flex;
    }
    .tpl-filter-controls-wrapper {
        display: none;
        padding-top: 1.5rem;
    }
    .tpl-filter-controls-wrapper.tpl-open {
        display: grid;
    }
     .tpl-filter-actions-container {
        flex-direction: column;
        align-items: stretch;
    }
    .tpl-filter-actions {
        justify-content: center;
        width: 100%;
    }
    .tpl-result-count {
        margin-bottom: 1rem;
        text-align: center;
        width: 100%;
    }
    .tpl-active-filters-container {
        justify-content: center;
        width: 100%;
        margin-bottom: 1rem;
    }

    #tpl-property-listings-section { padding: 4rem 1.5rem; }
    .tpl-listings-controls { flex-direction: column; align-items: stretch; }
    .tpl-view-toggle-buttons { width: 100%; margin-bottom: 1rem; }
    .tpl-sort-dropdown-wrapper { width: 100%; }
    .tpl-sort-select { width: 100%; }
    .tpl-property-card-title { font-size: 1.25rem; }
    .tpl-property-card-location, .tpl-property-acres { font-size: 0.85rem; }
    .tpl-property-card-price { font-size: 1.5rem; }
    .tpl-property-card-action-btn { font-size: 0.9rem; padding: 0.7rem 1.2rem; }
    .tpl-detailed-feature-item { font-size: 0.85rem; }
    .tpl-detailed-feature-label { font-size: 0.7rem; }
}

@media (min-width: 1024px) {
    .tpl-mobile-filter-toggle {
        display: none !important;
    }
}

/* --- 12. PAGINATION STYLES --- */
.tpl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding: 1rem;
    flex-wrap: wrap;
}

.tpl-pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.tpl-pagination-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    min-width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tpl-pagination-button:hover:not(:disabled) {
    background-color: var(--brand-green-light);
    color: var(--text-primary);
    border-color: var(--brand-green-mid);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tpl-pagination-button.tpl-active {
    background-color: var(--brand-green-accent);
    color: #fff;
    border-color: var(--brand-green-accent);
    box-shadow: 0 4px 12px rgba(42, 157, 143, 0.3);
    transform: translateY(-2px);
}

.tpl-pagination-button:disabled {
    background-color: var(--bg-light);
    color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#tpl-prev-page, #tpl-next-page {
    gap: 0.5rem;
    min-width: auto;
    padding: 0.75rem 1.25rem;
}

/* "No Results" Visuals */
#tpl-no-results-message {
    display: none;
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 600px;
    margin: 2rem auto;
    border: 1px dashed var(--border-color);
    background-color: var(--brand-green-light);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
#tpl-no-results-message.tpl-visible {
    display: block;
}
#tpl-no-results-message ion-icon {
    font-size: 3rem;
    color: var(--brand-green-mid);
    margin-bottom: 1rem;
}
#tpl-no-results-message h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
}
#tpl-no-results-message p {
    margin-bottom: 1.5rem;
}
#tpl-no-results-message button {
    padding: 0.875rem 2rem;
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--animation-duration-fast) ease;
    font-family: 'Manrope', sans-serif;
    border-radius: 0;
}
#tpl-no-results-message button:hover {
    color: var(--brand-green-accent);
    text-decoration: underline;
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    #tpl-hero-layer-base, #tpl-hero-layer-grid, #tpl-hero-layer-glow,
    .tpl-hero-heading-line span,
    .tpl-listings-hero-subheading,
    .tpl-listings-hero-cta,
    .tpl-btn-primary,
    .tpl-scroll-indicator .tpl-scroller,
    .tpl-filter-input-base,
    .tpl-filter-input-icon,
    .tpl-dropdown-arrow,
    .tpl-multiselect-dropdown,
    .tpl-multiselect-list-item,
    .tpl-range-input input::-webkit-slider-thumb,
    .tpl-filter-chip,
    .tpl-filter-chip-close,
    .tpl-btn-secondary,
    .tpl-mobile-filter-toggle,
    .tpl-mobile-filter-toggle ion-icon,
    .tpl-range-error-message,
    .tpl-range-tooltip,
    .tpl-fade-in-up,
    .tpl-property-card,
    .tpl-property-card::before,
    .tpl-property-card-image,
    .tpl-view-toggle-button,
    .tpl-sort-select,
    .tpl-pagination-button,
    .tpl-btn-primary::before,
    .tpl-btn-arrow,
    .tpl-property-card-detailed-features,
    .tpl-show-more-toggle,
    .tpl-property-card-action-btn
    {
        transition: none !important;
        animation: none !important;
    }
}
