/* =============================================
   REAL ESTATE CMS - Main Stylesheet
   Modern, responsive, premium design
   ============================================= */

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--color-text, #1e293b);
    background: #f8fafc;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo img {
    max-height: 64px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-buttons));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: #475569;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.08);
}

.nav-link i { margin-right: 0.35rem; }

/* Mobile toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* =============================================
   FLASH MESSAGES
   ============================================= */
.flash-message {
    padding: 1rem 0;
    animation: slideDown 0.4s ease;
    margin-top: 72px;
}

.flash-success { background: #ecfdf5; color: #065f46; }
.flash-error { background: #fef2f2; color: #991b1b; }
.flash-message .container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

/* =============================================
   HERO / BANNER SECTION
   ============================================= */
.hero-section {
    margin-top: 72px;
    position: relative;
    overflow: hidden;
    background: var(--color-secondary);
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 540px;
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.banner-slide.active { opacity: 1; }

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content {
    text-align: center;
    color: #fff;
    padding: 2rem;
    max-width: 700px;
}

.banner-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.banner-content p {
    font-size: 1.15rem;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.banner-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.banner-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* =============================================
   SEARCH SECTION
   ============================================= */
.search-section {
    position: relative;
    z-index: 10;
    margin-top: -3rem;
    margin-bottom: 3rem;
}

.search-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-group { display: flex; flex-direction: column; }
.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
    background: #fff;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.35);
    color: #fff;
}

.btn-success {
    background: var(--color-buttons);
    color: #fff;
}

.btn-success:hover {
    background: var(--color-buttons-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-block { width: 100%; }

/* =============================================
   SECTIONS
   ============================================= */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #64748b;
    font-size: 1.05rem;
}

.section-header .accent-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--color-primary), var(--color-buttons));
    border-radius: 2px;
    margin: 1rem auto 0;
}

/* =============================================
   PROPERTY CARDS
   ============================================= */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.property-card {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

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

.property-card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-card-img img {
    transform: scale(1.05);
}

.property-card-img .no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 3rem;
}

.property-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.35rem;
}

.badge {
    padding: 0.3rem 0.7rem;
    border-radius: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sale { background: var(--color-primary); color: #fff; }
.badge-rent { background: var(--color-buttons); color: #fff; }
.badge-featured { background: #f59e0b; color: #fff; }

/* Favorite Button */
.btn-favorite {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.15rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-favorite:hover, .btn-favorite.active {
    color: #ef4444;
    transform: scale(1.1);
}
.text-danger { color: #ef4444 !important; }

.property-card-body {
    padding: 1.25rem;
}

.property-card-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card-body h3 a {
    color: inherit;
}

.property-card-body h3 a:hover {
    color: var(--color-primary);
}

.property-location {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.property-location i { color: var(--color-primary); }

.property-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.property-features {
    display: flex;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.8rem;
}

.property-feature i {
    color: var(--color-primary);
    font-size: 0.85rem;
}

/* =============================================
   PROPERTY DETAIL PAGE
   ============================================= */
.detail-hero {
    margin-top: 72px;
    padding-top: 2rem;
}

.detail-breadcrumb {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.detail-breadcrumb a { color: var(--color-primary); }
.detail-breadcrumb span { margin: 0 0.5rem; }

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Gallery */
.gallery-main {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #1e293b;
    height: 450px;
}

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

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.gallery-nav:hover { background: rgba(0,0,0,0.8); }
.gallery-prev { left: 0.75rem; }
.gallery-next { right: 0.75rem; }

.gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 0.35rem;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-thumb.active, .gallery-thumb:hover {
    opacity: 1;
    border-color: var(--color-primary);
}

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

/* Detail Sidebar */
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.detail-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
    color: var(--color-secondary);
}

.detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.detail-code {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.detail-info-list {
    list-style: none;
}

.detail-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.detail-info-list li:last-child { border-bottom: none; }

.detail-info-list .label {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-info-list .label i { color: var(--color-primary); width: 16px; }

.detail-info-list .value {
    font-weight: 600;
    color: var(--color-secondary);
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    color: #fff;
}

.detail-description {
    background: #fff;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
}

.detail-description h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

.detail-description .content {
    color: #475569;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Recommend Button */
.btn-recommend {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
}

.btn-recommend:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99,102,241,0.4);
}

/* WhatsApp Contact Modal */
.whatsapp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.25s ease;
    padding: 1rem;
}

.whatsapp-modal-overlay.active {
    display: flex;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.whatsapp-modal {
    background: #fff;
    border-radius: 1rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: slideUpModal 0.3s ease;
}

@keyframes slideUpModal {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.whatsapp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #25D366;
    color: #fff;
}

.whatsapp-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.whatsapp-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.whatsapp-modal-close:hover { opacity: 1; }

.whatsapp-modal-body {
    padding: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.whatsapp-contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    color: inherit;
    text-decoration: none;
}

.whatsapp-contact-item:hover {
    background: #f0fdf4;
    color: inherit;
}

.whatsapp-contact-info {
    display: flex;
    flex-direction: column;
}

.whatsapp-contact-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
}

.whatsapp-contact-role {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.whatsapp-contact-btn {
    background: #25D366;
    color: #fff;
    padding: 0.4rem 0.85rem;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.whatsapp-contact-item:hover .whatsapp-contact-btn {
    background: #1da851;
}

/* =============================================
   FILTERS SIDEBAR
   ============================================= */
.listing-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding-top: 2rem;
    margin-top: 72px;
}

.filters-sidebar {
    position: sticky;
    top: 88px;
    height: fit-content;
}

.filters-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.filters-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-card .form-group { margin-bottom: 1rem; }

.filter-reset {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.filter-reset:hover { color: var(--color-primary); }

.listing-content { min-height: 60vh; }

.listing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.listing-header h1 {
    font-size: 1.5rem;
    color: var(--color-secondary);
}

.listing-count {
    color: #64748b;
    font-size: 0.9rem;
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 0.85rem;
    border-radius: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

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

.pagination .active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* =============================================
   BLOG
   ============================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

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

.blog-card-img {
    height: 200px;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img img { transform: scale(1.05); }

.blog-card-body {
    padding: 1.25rem;
}

.blog-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.blog-card-body h3 a { color: var(--color-secondary); }
.blog-card-body h3 a:hover { color: var(--color-primary); }

.blog-card-date {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-detail {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 2rem;
    margin-top: 72px;
}

.blog-detail h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-secondary);
}

.blog-detail .blog-meta {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.blog-detail .blog-content {
    line-height: 1.8;
    color: #334155;
    font-size: 1.05rem;
}

.blog-detail .blog-content p { margin-bottom: 1.25rem; }
.blog-detail .blog-content img {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-page {
    margin-top: 72px;
    padding-top: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.contact-info-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-buttons));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.contact-form-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.contact-form-card h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
}

.contact-form-card .form-group { margin-bottom: 1.25rem; }

.form-control-textarea {
    resize: vertical;
    min-height: 120px;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--color-secondary);
    color: #cbd5e1;
    padding: 3rem 0 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
}

.footer-title {
    color: #fff;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.7;
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
}

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 0.25rem;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.footer-contact li i {
    color: var(--color-primary);
    margin-top: 0.2rem;
    width: 16px;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Footer Credit */
.footer-credit {
    margin-top: 0.75rem;
}

.footer-credit-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.8rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-credit-link:hover {
    opacity: 1;
    color: #fff;
}

.footer-credit-logo {
    max-height: 24px;
    width: auto;
    filter: brightness(0) invert(0.7);
    transition: filter 0.3s ease;
}

.footer-credit-link:hover .footer-credit-logo {
    filter: brightness(0) invert(1);
}

/* =============================================
   MULTI-SELECT DROPDOWN (Bairro filter)
   ============================================= */
.multi-select-wrapper {
    position: relative;
}

.multi-select-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #f8fafc;
    text-align: left;
}

.multi-select-toggle i {
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.multi-select-dropdown.open + .multi-select-toggle i,
.multi-select-dropdown.open ~ .multi-select-toggle i {
    transform: rotate(180deg);
}

.multi-select-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #475569;
    font-size: 0.9rem;
}

.multi-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 50;
    display: none;
    max-height: 280px;
    overflow: hidden;
    flex-direction: column;
}

.multi-select-dropdown.open {
    display: flex;
}

.multi-select-search {
    padding: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.multi-select-search .form-control {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
}

.multi-select-options {
    overflow-y: auto;
    max-height: 220px;
    padding: 0.35rem 0;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #334155;
    transition: background 0.15s ease;
}

.multi-select-option:hover {
    background: #f1f5f9;
}

.multi-select-option input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.multi-select-empty {
    padding: 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* =============================================
   WHATSAPP FLOATING BUTTON
   ============================================= */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
    box-shadow: 0 6px 30px rgba(37,211,102,0.5);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 30px rgba(37,211,102,0.6); }
}

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar {
    background: var(--color-secondary);
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    color: #fff;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--color-primary-light, #93c5fd));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .detail-grid { grid-template-columns: 1fr; }
    .listing-layout { grid-template-columns: 1fr; }
    .filters-sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .mobile-toggle { display: flex; }

    /* Logo bottom spacing */
    .header-inner {
        padding-bottom: 10px;
    }

    /* Mobile menu opens below header */
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 8px 30px rgba(0,0,0,0.1);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        z-index: 100;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Increase space below logo on home */
    .hero-section {
        margin-top: 88px;
    }

    .banner-slider { height: 350px; }
    .banner-content h1 { font-size: 2rem; }

    .search-form { grid-template-columns: 1fr; }

    .property-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }

    /* Property detail - gallery */
    .gallery-main { height: 260px; }

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

    /* Thumbnails: horizontal scroll, no wrapping */
    .gallery-thumbs {
        gap: 0.35rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
    }

    .gallery-thumb {
        width: 60px;
        height: 45px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    /* Property detail - equal padding & centered content */
    .detail-hero {
        overflow-x: hidden;
    }

    .detail-hero .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .detail-description {
        padding: 1.25rem;
        margin-left: 0;
        margin-right: 0;
    }

    .detail-card {
        margin-left: 0;
        margin-right: 0;
    }

    .detail-description .content img {
        max-width: 100%;
        height: auto;
    }

    .detail-price { font-size: 1.5rem; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .stat-number { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .header-inner { height: auto; min-height: 60px; padding-bottom: 10px; }
    .hero-section, .detail-hero, .listing-layout, .contact-page, .blog-detail { margin-top: 70px; }
    .flash-message { margin-top: 70px; }
    .banner-slider { height: 280px; }
    .banner-content h1 { font-size: 1.5rem; }
    .property-card-img { height: 180px; }
    .gallery-main { height: 200px; }
    .whatsapp-float { bottom: 1.25rem; right: 1.25rem; width: 52px; height: 52px; font-size: 1.5rem; }

    .hero-section {
        margin-top: 72px;
    }

    .gallery-thumb {
        width: 54px;
        height: 40px;
    }
}
