/* ==========================================================================
   0. CSS Variables (Theme Colors)
   ========================================================================== */

/* Theme 1: Coastal & Calm (Default) */
:root {
    --primary-text: #343A40;      /* Charcoal */
    --secondary-bg: #EAE0D5;      /* Sandstone */
    --accent-color: #F7941D;      /* Sunset Orange */
    --neutral-white: #FFFFFF;     /* White */
    --border-color: #d8cec5;      /* A slightly darker sandstone for borders */
    --link-color:   #005A9C;      /* Coastal Blue */
}

/* Theme 2: Modern & Minimalist */
[data-theme="minimalist"] {
    --primary-text: #212529;      /* Charcoal */
    --secondary-bg: #F1F3F5;      /* Light Grey */
    --accent-color: #FF6B6B;      /* Vibrant Orange/Coral */
    --neutral-white: #FFFFFF;     /* White */
    --border-color: #dee2e6;      /* A slightly darker grey for borders */
    --link-color:   #212529;      /* Charcoal for links */
}

/* Theme 3: Forest & Clay */
[data-theme="forest"] {
    --primary-text: #3d403a;      /* Dark Moss */
    --secondary-bg: #f4f1ea;      /* Cream */
    --accent-color: #c87e66;      /* Terracotta Clay */
    --neutral-white: #FFFFFF;     /* White */
    --border-color: #e0ddd5;      /* A slightly darker cream */
    --link-color:   #0d6b4f;      /* Deep Forest Green */
}

/* Theme 4: Elegant Teal */
[data-theme="elegant"] {
    --primary-text: #2c3e50;
    --secondary-bg: #ecf0f1;
    --accent-color: #1abc9c;
    --neutral-white: #FFFFFF;
    --border-color: #bdc3c7;
    --link-color:   #2980b9;
}

/* Theme 5: Vibrant Blue */
[data-theme="vibrant"] {
    --primary-text: #212529;
    --secondary-bg: #FFFFFF;
    --accent-color: #4285F4;
    --neutral-white: #FFFFFF;
    --border-color: #dee2e6;
    --link-color:   #4285F4;
}

/* Theme 6: Energetic Orange */
[data-theme="orange"] {
    --primary-text: #212529;
    --secondary-bg: #f8f9fa;
    --accent-color: #f04b24;
    --neutral-white: #FFFFFF;
    --border-color: #dee2e6;
    --link-color:   #212529;
}

/* ==========================================================================
   1. Base Styles & Typography
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--secondary-bg);
    font-family: 'Lato', sans-serif;
    color: var(--primary-text);
    margin: 0;
    padding: 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--link-color); /* Use Coastal Blue for all headings */
}


/* ==========================================================================
   2. Layout Styles
   ========================================================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header {
    display: flex;
    align-items: center;
    gap: 30px;
}

header h1 a {
    text-decoration: none;
    color: inherit;
}

nav {
    margin-top: 10px;
}

nav a {
    margin-right: 20px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--link-color); /* Use Coastal Blue for nav links */
    transition: color 0.2s ease-in-out;
}

nav a:hover {
    color: var(--accent-color); /* Use Sunset Orange for hover */
    text-decoration: none;
}

/* --- Footer Styles --- */
footer {
    margin-top: 60px;
    padding: 40px 0;
    background-color: var(--neutral-white);
    border-top: 1px solid var(--border-color);
    color: #6c757d;
    font-size: 0.9rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.footer-subscribe h4 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--primary-text);
}

.footer-subscribe p {
    margin-bottom: 20px;
    max-width: 350px;
}

.footer-content {
    text-align: right;
    flex-shrink: 0; /* Prevents this column from shrinking */
}

.footer-content p {
    margin: 0 0 15px 0;
}

.search-form {
    display: flex;
}

.search-form input {
    border: 1px solid var(--border-color);
    border-radius: 5px 0 0 5px;
    padding: 8px;
    min-width: 200px; /* Give the search bar a decent width */
}

.search-form button {
    border: 1px solid var(--accent-color);
    background-color: var(--accent-color);
    color: var(--neutral-white);
    border-radius: 0 5px 5px 0;
    padding: 8px 12px;
    cursor: pointer;
}

.subscribe-form {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 30px;
}
.subscribe-form input {
    border: 1px solid var(--border-color);
    border-radius: 5px 0 0 5px;
    padding: 12px;
    min-width: 300px;
}

/* --- Map Page Layout --- */
.map-layout {
    /* On mobile, stack the map on top of the results */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.map-container {
    /* On mobile, map is a 400px tall block */
    height: 400px;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.results-container {
    width: 100%;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 8px; /* Match our other components */
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.brokerage-logo-header {
    height: 45px; /* Adjust size as needed */
    width: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-logo {
    height: 40px; /* Adjust size as needed */
    width: auto;
}

/* ==========================================================================
   3. Component Styles
   ========================================================================== */
.card-grid {
    display: grid;
    gap: 25px;
    padding: 0;
    list-style: none;
    /* Mobile First: Default to 1 column */
    grid-template-columns: 1fr;
}

.card {
    background-color: var(--neutral-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* Important for keeping child corners rounded */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-image-placeholder {
    height: 180px;
    background-color: #ccc; /* A simple grey placeholder */
}

.card-content {
    padding: 20px;
    flex-grow: 1; /* Allows content to fill space */
}

.card-content a {
    text-decoration: none;
    color: var(--link-color);
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.card .card-website-link a {
    font-size: 1rem;
    font-weight: 400;
    font-family: 'Lato', sans-serif;
    text-decoration: underline;
    color: var(--accent-color); /* Use Sunset Orange for secondary links */
}

.card .card-website-link a:hover {
    text-decoration: none;
}

.card-image {
    height: 180px;
    width: 100%;
    object-fit: cover; /* This ensures the image covers the area without distortion */
}

.card-link-wrapper {
    text-decoration: none;
    color: inherit;
	display: block;
}

.card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-text);
    margin: 0 0 5px 0;
}

.card-subtitle {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.card-tagline {
    font-size: 0.9rem;
    color: #555;
    margin: 5px 0 10px 0;
    font-style: italic;
}

.card-content .card-address a {
    color: inherit;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex; /* Aligns icon and text */
    align-items: flex-start; /* Aligns to the top */
    gap: 6px; /* Space between icon and text */
}
.card-content .card-address a:hover {
    text-decoration: underline;
}

/* Style for the SVG icon itself */
.card-address a svg {
    width: 16px;
    height: 16px;
    margin-top: 2px; /* Small adjustment for vertical alignment */
    flex-shrink: 0; /* Prevents the icon from shrinking */
}

.card-address a,
.property-address a {
    color: inherit; /* Inherit the text color from the parent <p> tag */
    text-decoration: none; /* Remove the underline */
}

/* Add the underline back on hover to show it's clickable */
.card-address a:hover,
.property-address a:hover {
    text-decoration: underline;
}

.social-icons {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
}

.social-icons a {
    transition: opacity 0.2s;
}
.social-icons a:hover {
    opacity: 0.7;
}

/* --- Brand colors (always on) --- */
.social-icons .social-icon-web { color: var(--primary-text); }
.social-icons .social-icon-fb { color: #1877F2; } /* Facebook Blue */
.social-icons .social-icon-ig { color: #E4405F; } /* Instagram Pink */
.social-icons .social-icon-tt { color: #000000; } /* TikTok Black */
.social-icons .social-icon-yt { color: #FF0000; } /* YouTube Red */

.detail-header-image {
	width: 100%;
	height: 350px;
	object-fit: cover;
	border-radius: 8px;
	margin-bottom: -20px;
	position: relative;
	z-index: 0;
}

.detail-article {
	position: relative;
	z-index= 1;
    background-color: var(--neutral-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-article hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.detail-meta {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-header h2 {
    margin: 0;
}

.category-tags {
    margin-top: 15px;
    margin-bottom: 10px;
}

.category-tag {
    display: inline-block;
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 5px;
}

.category-tags a {
	display: inline-block;
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 5px;
    text-decoration: none; /* Explicitly remove the underline */
    transition: background-color 0.2s;
}

.category-tags a:hover {
	background-color: var(--border-color);
	color: var(--primary-text);
}

.button {
    background-color: var(--accent-color);
    color: var(--neutral-white);
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
	text-decoration: none;
	display: inline-block;
}

.button:hover {
    opacity: 0.85;
}

/* --- Message Styles --- */
.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.message {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- Filter Tag Styles --- */
.filter-tags {
    margin: 20px 0;
}

.filter-tag {
    display: inline-block;
    background-color: var(--neutral-white);
    border: 1px solid var(--border-color);
    color: var(--link-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.2s ease-in-out;
}

.filter-tag:hover {
    background-color: var(--link-color);
    color: var(--neutral-white);
    border-color: var(--link-color);
}

.filter-tag.active,
.filter-tag.active:hover {
    background-color: var(--link-color);
    color: var(--neutral-white);
    border-color: var(--link-color);
}

/* --- Article Row Styles --- */
.article-row {
    display: flex;
    gap: 30px;
    align-items: center;
    background-color: var(--neutral-white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease-in-out;
}

.article-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* On every even-numbered row, reverse the order */
.article-row:nth-child(even) {
    flex-direction: row-reverse;
}

.article-row-image {
    width: 35%;
    flex-shrink: 0;
    height: 250px;
}

.article-row-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-row-content {
    padding: 30px;
}

.article-row-content h3 a {
    text-decoration: none;
    color: var(--link-color);
}

/* --- Property Card Styles --- */
.property-card-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr; /* 1 column on mobile */
}

.property-card .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.property-card.highlighted {
    border-color: var(--accent-color);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    transform: scale(1.03);
    background-color: #FFF4E3; /* A light, noticeable shade of the theme's orange */
}

.card-main-content {
    display: flex;
    justify-content: space-between;
    flex-grow: 1;
}

.property-info {
    flex-grow: 1;
}

.property-image-container {
    position: relative;
}

.rmls-logo {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 50px;
    height: auto;
    background: rgba(255,255,255,0.8);
    padding: 2px;
    border-radius: 3px;
}

.rmls-logo-detail {
    width: 70px;
    height: auto;
	flex-shrink: 0;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--primary-text);
    margin: 0 0 5px 0;
}

.property-stats {
    font-size: 0.9rem;
    margin: 0 0 8px 0;
}

.property-address {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.property-agent {
    font-size: 0.8rem;
    color: #777;
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    text-align: right;
}

.property-type-badge {
    display: inline-block;
    margin: 5px 0 10px 0;
    padding: 4px 8px;
    background-color: var(--accent-color);
    color: var(--neutral-white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.agent-info {
    display: flex;
    flex-direction: column; /* Stack the text vertically */
}

.card-actions {
    display: none;
    flex-direction: column; /* Stacks share and like buttons */
    align-items: flex-end;
    gap: 8px;
}

.action-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%; /* Makes the buttons circular */
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-btn:hover {
    background-color: var(--secondary-bg);
}

/* --- Property Status Ribbon --- */
.property-status-ribbon {
    position: absolute;
    top: 15px;
    left: -8px;
    padding: 5px 15px;
    background-color: var(--accent-color);
    color: var(--neutral-white);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Specific status colors */
.property-status-ribbon.status-pending {
    background-color: #ffc107; /* Orange */
}
.property-status-ribbon.status-sold {
    background-color: #e34c26; /* Red */
}
.property-status-ribbon.status-short-sale-pending {
    background-color: #6a0572; /* Dark Purple */
}

.property-status-ribbon.status-bumpable {
    background-color: #007bff; /* A professional blue */
}

.property-status-ribbon.status-short-sale-pending,
.property-status-ribbon.status-pending-lease-option {
    background-color: #6f42c1; /* Deep purple */
}

/* --- Custom Map Marker Styles --- */
.custom-marker {
    background-color: #333;
    color: white;
    height: 28px;
    padding: 0 12px;
    border-radius: 14px;
    border: 2px solid white;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

/* Status colors */
.custom-marker.status-active {
    background-color: #28a745; /* Green */
}
.custom-marker.status-pending {
    background-color: #ffc107; /* Yellow */
    color: #333; /* Darker text for yellow background */
}
.custom-marker.status-bumpable {
    background-color: #007bff; /* A professional blue */
}

.custom-marker.status-short-sale-pending,
.custom-marker.status-pending-lease-option {
    background-color: #6f42c1; /* Deep purple */
}

/* Highlight effect on hover */
.custom-marker.highlighted {
    height: 34px; /* Increase height */
    padding: 0 16px; /* Increase padding for a wider look */
    border-radius: 17px; /* Adjust radius */
    font-size: 14px; /* Make the font a bit bigger */
    z-index: 10;
    background-color: var(--accent-color);
    color: var(--neutral-white);
}

/* --- Mapbox Popup Styles --- */
.mapboxgl-popup-content {
    background-color: var(--neutral-white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0; /* Remove default padding */
    font-family: 'Lato', sans-serif;
}

.mapboxgl-popup-close-button {
    /* Make the 'x' button easier to see and click */
    color: var(--primary-text);
    font-size: 20px;
    padding: 5px;
}

/* Style the content inside our popup */
.popup-link {
    text-decoration: none;
    color: var(--primary-text);
}

.popup-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.popup-content {
    padding: 10px;
}

.popup-price {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
	margin: 0;
}

.popup-address {
    font-size: 0.9rem;
    margin: 5px 0 0 0;
}

.popup-stats {
    font-size: 0.9rem;
    margin: 8px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rmls-logo-popup {
    height: 25px; /* Adjust size as needed */
    width: auto;
}

.popup-container {
    border-radius: 8px; /* Match our other components */
    overflow: hidden; /* This is what rounds the image corners */
}

.popup-image-container {
    position: relative;
}

.popup-ribbon {
    top: 10px;      /* Adjust position for the smaller popup */
    left: -5px;
    padding: 3px 8px;
    font-size: 0.7rem;
    min-width: 80px;
}

.popup-agent {
    font-size: 0.75rem;
    color: #777;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

/* --- Image Gallery Styles --- */
.image-gallery .main-image {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative; /* CRUCIAL: This is the anchor for the arrows */
}

.image-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-container {
    position: relative;
    display: flex;
    align-items: center;
}

.thumbnail-strip {
    display: flex;
    flex-wrap: wrap; /* Allow thumbnails to wrap to the next line */
    gap: 10px;
}

.thumbnail {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumbnail:hover, .thumbnail.active {
    border-color: var(--link-color);
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid #ccc;
    
    /* Make the button a circle */
    width: 80px;
    height: 80px;
    border-radius: 50%; 
    
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
}

.gallery-arrow:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.image-gallery:hover .gallery-arrow {
    opacity: 1;
}
.gallery-arrow.prev {
    left: 15px;
}
.gallery-arrow.next {
    right: 15px;
}

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

.pagination .step-links a, .pagination .step-links .current {
    margin: 0 4px;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    vertical-align: middle;
}

.pagination .step-links .ellipsis {
    padding: 8px 5px;
    vertical-align: middle;
}

.pagination .step-links a:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--neutral-white);
}

.pagination .step-links .current {
    background-color: var(--link-color);
    border-color: var(--link-color);
    color: var(--neutral-white);
    font-weight: 700;
}

/* --- Disclaimer Box --- */
.disclaimer-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #6c757d;
    border-top: 1px solid var(--border-color);
}

.disclaimer-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

.disclaimer-text-content p {
    margin: 0 0 10px 0;
}

.disclaimer-text-content p:last-child {
    margin-bottom: 0;
}

/* --- Filter Bar Styles --- */
.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    align-items: flex-end;
    padding: 20px;
    background-color: var(--secondary-bg); /* Use the theme's main background */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-text);
}

.filter-group select,
.filter-group input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    width: 100%;
    background-color: var(--neutral-white); /* Make inputs stand out */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--link-color) 20%, transparent);
}

.input-range {
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-range input {
    width: 100%;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-bottom: 2px;
}

.filter-apply-btn {
    width: 100%;
}

.filter-reset-btn {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-reset-btn:hover {
    text-decoration: underline;
}

.load-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

/* --- School lists in property details --- */
.school-list {
    margin-bottom: 15px;
}

.school-item {
    padding: 5px 0;
}

.disclaimer-text {
    font-size: 0.8rem;
    font-style: italic;
    color: #6c757d;
}

/* ==========================================================================
   4. Page-Specific Styles
   ========================================================================== */
.hero-home {
    background-color: var(--neutral-white);
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--primary-text);
    margin: 0;
    margin-bottom: 40px;
}

.hero-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
	flex-wrap: wrap;
}

.hero-nav a {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--link-color); /* Use Coastal Blue for hero nav links */
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.hero-nav a:hover {
    background-color: var(--accent-color); /* Use Sunset Orange for hover */
    color: var(--neutral-white);
}

.hero-search-form {
    margin-top: 30px;
}

.featured-section {
    margin-bottom: 60px; /* Increased spacing */
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* ==========================================================================
   5. Media Queries & Responsive Design
   ========================================================================== */
/*
 * These styles only apply when the screen size is below a certain width.
 * This is how we make the site look good on tablets and phones.
 */
 
@media (max-width: 992px) {
    .filter-bar {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (min-width: 768px) {
    body {
        padding: 20px; /* Restore larger padding */
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-home {
        padding: 60px 40px; /* Restore larger padding */
    }
	
	.property-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
	
	.card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Map page layout becomes side-by-side */
    .map-layout {
        flex-direction: row;
    }
    .map-container {
        flex: 5; /* Takes up half the space */
        position: sticky;
        top: 20px;
        height: 90vh;
    }
    .results-container {
        flex: 5; /* Takes up the other half */
    }
    /* But the grid on the map page stays 1 column on tablets */
    .results-container .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Desktop and wider */
@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
	
	.property-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
	
	/* The results grid on the map page gets 2 columns on large desktops */
    .results-container .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}