:root {
    --bg-color: #fdfdfd;
    /* Ivory/White */
    --text-color: #333333;
    --text-muted: #666666;
    --primary-color: #D7BD8B;
    /* Muted Gold */
    --primary-hover: #C5A059;
    --surface-color: #ffffff;
    --surface-hover: #f8f9fa;
    --border-color: #eee;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: blur(16px);
    --gradient-gold: linear-gradient(135deg, #D7BD8B 0%, #E9DBC0 100%);
    --gradient-text: linear-gradient(135deg, #2C3E50 0%, #4CA1AF 100%);
    --font-main: 'Outfit', sans-serif;
    --container-width: 1200px;
    --transition: all 0.3s ease;
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* Animations & Reveals */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s var(--ease-out-expo), transform 1.5s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1.5s var(--ease-out-expo), transform 1.5s var(--ease-out-expo);
}

.reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}


.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-out-expo);
    /* Slower, smoother zoom */
}

.listing-card:hover .listing-image img {
    transform: scale(1.08);
}

/* Button Micro-interactions */
.btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn:active {
    transform: scale(0.96);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 1.05rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    color: var(--primary-color);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#hero h1 {
    color: white;
}

h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.text-gradient {
    background: var(--gradient-gold);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    /* Pill shape for modern look */
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
    background: var(--gradient-gold);
    color: #fff;
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(197, 160, 89, 0.5);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Top Announcement Bar */
.top-announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--gradient-gold);
    /* Gold Theme */
    color: black;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 1001;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    animation: marquee 80s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
}

/* Individual text items with spacing */
.marquee-content span {
    display: inline-flex;
    align-items: center;
    padding: 0 5vw;
}

.top-announcement-bar span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.top-announcement-bar .disclaimer {
    font-size: 0.75rem;
    opacity: 0.9;
    /* Increased opacity for better visibility on red */
    margin-left: 10px;
    font-weight: 400;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Header */
header {
    position: fixed;
    top: 55px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1200px;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: rgba(15, 15, 20, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 12px 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

#header.scrolled {
    top: 50px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 10px 25px;
    width: 95%;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.logo-main {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.3s ease;
}

.logo-main:hover {
    opacity: 0.8;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1;
    color: var(--text-color);
}

#header:not(.scrolled) .logo-name,
#header:not(.scrolled) .logo-subtitle {
    color: white;
}

.logo-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary-color);
    opacity: 0.9;
    line-height: 1;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.logo-subtitle:hover {
    opacity: 1;
}

.header-profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.header-profile-icon:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-color);
    position: relative;
}

#header:not(.scrolled) .nav-links a {
    color: rgba(255, 255, 255, 0.9);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

#header:not(.scrolled) .nav-links a:hover {
    color: white;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero */
#hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/hero_bg.jpg');
    background-size: cover;
    background-position: center 40%;
    z-index: -2;
    animation: kenBurns 25s infinite alternate ease-in-out;
    will-change: transform;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.12);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(180deg, 
            rgba(10, 10, 20, 0.35) 0%, 
            rgba(10, 10, 20, 0.25) 30%, 
            rgba(10, 10, 20, 0.45) 60%, 
            rgba(10, 10, 20, 0.85) 100%),
        linear-gradient(135deg, 
            rgba(196, 167, 125, 0.08) 0%, 
            transparent 50%);
    z-index: -1;
}

/* Animated shimmer line across hero */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(232, 213, 183, 0.04), transparent);
    z-index: 0;
    animation: heroShimmer 8s ease-in-out infinite;
}

@keyframes heroShimmer {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

/* Floating particles effect */
#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 10% 20%, rgba(232, 213, 183, 0.25) 50%, transparent 50%),
        radial-gradient(1px 1px at 25% 55%, rgba(255, 255, 255, 0.15) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 45% 15%, rgba(232, 213, 183, 0.2) 50%, transparent 50%),
        radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.12) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 75% 35%, rgba(232, 213, 183, 0.18) 50%, transparent 50%),
        radial-gradient(1px 1px at 85% 80%, rgba(255, 255, 255, 0.1) 50%, transparent 50%),
        radial-gradient(1px 1px at 30% 85%, rgba(232, 213, 183, 0.15) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 90% 10%, rgba(255, 255, 255, 0.12) 50%, transparent 50%);
    animation: floatParticles 20s linear infinite alternate;
    pointer-events: none;
}

@keyframes floatParticles {
    0% { transform: translateY(0) translateX(0); opacity: 0.6; }
    25% { opacity: 1; }
    50% { transform: translateY(-30px) translateX(15px); opacity: 0.7; }
    75% { opacity: 1; }
    100% { transform: translateY(-60px) translateX(-10px); opacity: 0.5; }
}

.hero-content {
    max-width: 900px;
    z-index: 1;
    padding-top: 150px;
    padding-bottom: 40px;
}

.hero-content h1 {
    color: white;
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.15;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4), 0 4px 60px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.25rem;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
    text-shadow: 0 1px 15px rgba(0, 0, 0, 0.3);
}

#hero .btn-outline {
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

#hero .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

#hero .btn-primary {
    box-shadow: 0 8px 30px rgba(196, 167, 125, 0.35);
    transition: all 0.3s ease;
}

#hero .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(196, 167, 125, 0.5);
}

.hero-actions {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Hero stats bar at bottom */
.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    text-shadow: 0 0 30px rgba(196, 167, 125, 0.4);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.25rem;
    display: block;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.4rem;
    }
    .hero-content p {
        font-size: 1.05rem;
    }
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    .hero-stat-number {
        font-size: 1.5rem;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* Listings */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.listing-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 1;
}

.listing-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    z-index: 2;
}

/* Sold Listing Styles */
.is-sold .listing-image img {
    filter: grayscale(100%);
    opacity: 0.8;
}

.sold-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background-color: rgba(200, 0, 0, 0.8);
    color: white;
    padding: 10px 30px;
    font-size: 2rem;
    font-weight: 800;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 10;
    pointer-events: none;
}

.listing-image {
    height: 300px;
    /* Taller image */
    overflow: hidden;
    position: relative;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.listing-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.listing-card:hover .listing-image img {
    transform: scale(1.05);
}

.listing-price-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    bottom: auto;
    left: auto;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    padding: 10px 20px;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
}

.listing-details {
    padding: 24px;
    background: transparent;
    position: relative;
}

.listing-address {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
    padding-right: 50px;
}

.card-whatsapp-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    z-index: 5;
}

.card-whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.5);
    background-color: #20bd5a;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    width: 100%;
    height: 100%;
}

.carousel-track::-webkit-scrollbar { 
    display: none;  /* Safari and Chrome */
}

.carousel-img {
    flex: 0 0 100%;
    scroll-snap-align: center;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.carousel-container:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav.left {
    left: 12px;
}

.carousel-nav.right {
    right: 12px;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.06);
    color: white;
}

@media (max-width: 768px) {
    .carousel-nav {
        display: none; /* Hide arrows on touch devices (they swipe instead) */
    }
}

.carousel-dot {
    cursor: pointer;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

.listing-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info h2 {
    margin-bottom: 20px;
}

.contact-details {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item span {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.detail-item a {
    font-size: 1.2rem;
}

.contact-form {
    background: var(--surface-color);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-family: var(--font-main);
    transition: var(--transition);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    background: var(--surface-color);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-brand h3 {
    letter-spacing: 2px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes zoomIn {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Simple mobile hide for now */

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    /* About section responsive - stack image and text on mobile */
    #about .container>div>div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
    }

    #about .container>div>div[style*="display: flex"] img {
        max-width: 250px !important;
        width: 100% !important;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    /* Make language selector smaller on mobile */
    #language-selector {
        padding: 4px !important;
        font-size: 0.8rem !important;
        height: auto;
    }

    /* Prevent header overlap */
    .logo {
        font-size: 1.1rem;
        gap: 8px;
    }

    .header-profile-icon {
        width: 35px;
        height: 35px;
    }

    /* Hide 'Book Consultation' text on mobile, keep icon */
    .nav-actions .btn-primary span {
        display: none;
    }

    .nav-actions .btn-primary {
        padding: 8px;
        /* Reduce padding since text is gone */
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent background scroll */
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 4px;
    animation: zoomIn 0.3s;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    /* Ensure image fits within box */
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 600px) {
    .lightbox-content {
        width: auto;
        height: auto;
        max-width: 100vw;
        max-height: 80vh;
        /* Leave room for UI */
        border-radius: 0;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
    }
}


/* Lightbox Navigation */
.lightbox-nav {
    cursor: pointer;
    z-index: 2002;
    transition: 0.3s;
    border-radius: 50%;
    width: 60px;
    /* Larger touch target */
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    /* Slightly darker for better visibility */
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    /* Subtle grow effect */
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
    /* Tactile feedback */
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 600px) {
    .lightbox-nav {
        padding: 10px;
        font-size: 1.5rem;
        width: 50px;
        /* Still large enough for thumb */
        height: 50px;
        background: rgba(0, 0, 0, 0.7);
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

.lightbox-prev,
.lightbox-next {
    /* Legacy class support if needed, but primarily using lightbox-nav now */
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    border-radius: 0 3px 3px 0;
    user-select: none;

    -webkit-user-select: none;
    z-index: 2002;
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Ambient Background Blobs */
.ambient-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: blobFloat 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--gradient-gold);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #4ca1af 0%, #c4e0e5 100%);
    animation-delay: -5s;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Custom Language Selector */
.custom-lang-dropdown {
    position: relative;
    z-index: 1000;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-color);
    font-family: var(--font-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.lang-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.current-lang-code {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: #333;
}

.chevron-icon {
    width: 10px;
    height: 6px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.custom-lang-dropdown.active .chevron-icon {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 4px;
    width: 140px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    list-style: none;
    transform-origin: top center;
}

.custom-lang-dropdown.active .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-size: 0.9rem;
    color: var(--text-color);
}

.lang-menu li:hover {
    background: var(--surface-hover);
    color: var(--primary-color);
}

.lang-menu li.selected {
    background: #f0f0f0;
    font-weight: 600;
    color: var(--text-color);
}

.lang-flag {
    font-size: 1.1rem;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
    padding-bottom: 30px;
}

.page-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    color: var(--text-color);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Marquee / Client Carousel */
.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding-bottom: 20px;
}

.marquee-content {
    display: inline-flex;
    animation: scroll 60s linear infinite;
    gap: 20px;
    padding-left: 20px;
    /* Initial offset */
    animation-play-state: running;
    /* Auto-play by default */
}

.marquee-container:hover .marquee-content {
    animation-play-state: paused;
    /* Pause on hover */
}

.marquee-item {
    flex: 0 0 auto;
    width: 400px;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    /* Stronger shadow for depth */
    transition: transform 0.3s ease;
    background-color: #f0f0f0;
}

.marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.marquee-item:hover img {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .marquee-content {
        animation-play-state: running;
        /* Always run on mobile */
        animation-duration: 45s;
        /* Faster on mobile? Or same? */
    }

    .marquee-item {
        width: 250px;
        height: 160px;
    }
}

/* Chatbot Styles */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

/* Chatbot Tooltip */
.chatbot-tooltip {
    position: absolute;
    bottom: 80px;
    right: 10px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--text-color);
    padding: 12px 18px;
    border-radius: 20px;
    border-bottom-right-radius: 5px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
    font-size: 0.95rem;
    font-weight: 550;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 10001;
}

.chatbot-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    background: #F5F5F5;
    /* Greyish White */
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#chatbot-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--surface-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transform-origin: bottom right;
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 2px solid white;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.status-indicator {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-indicator::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
}

#chatbot-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
    white-space: pre-wrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    background: white;
    border-bottom-left-radius: 5px;
    border: 1px solid #eee;
    align-self: flex-start;
    color: var(--text-color);
}

.message.user {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
}

.chatbot-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.chat-option-btn {
    background: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-option-btn:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    .chatbot-window {
        width: 85vw;
        max-width: 360px;
        height: 50vh;
        max-height: 450px;
        bottom: 90px;
        right: 7.5vw;
        left: auto;
        border-radius: 16px;
    }

    .chatbot-window.active {
        display: flex;
        flex-direction: column;
    }

    .chatbot-header {
        padding: 12px 15px;
    }

    .chatbot-header h4 {
        font-size: 1rem;
    }

    .chatbot-messages {
        padding: 15px;
        max-height: calc(70vh - 140px);
    }

    .message {
        font-size: 0.9rem;
        padding: 10px 14px;
        max-width: 85%;
    }

    .chat-option-btn {
        font-size: 0.85rem;
        padding: 10px 14px;
        flex: 1 1 auto;
        min-width: calc(50% - 4px);
    }

    .chatbot-input-area {
        padding: 12px;
        gap: 6px;
    }

    #chatbot-toggle {
        width: 56px;
        height: 56px;
        bottom: 15px;
        right: 15px;
    }

    #chatbot-toggle svg {
        width: 56px;
        height: 56px;
    }

    .chatbot-tooltip {
        bottom: 85px;
        right: 5px;
        font-size: 0.85rem;
        padding: 10px 14px;
        max-width: 200px;
    }

    .typing-indicator {
        padding: 6px 10px;
    }

    .typing-indicator span {
        width: 5px;
        height: 5px;
    }

    /* Mobile UI Fixes */
    .filter-group select {
        color: #000000 !important;
        background-color: #ffffff !important;
        -webkit-appearance: none;
        /* Normalize appearance */
        appearance: none;
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 0.65em auto;
    }

    .page-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        flex-shrink: 0;
        border-radius: 50% !important;
        /* Ensure it stays circular */
        padding: 0;
        /* Remove padding that might distort shape */
    }
}

#chatbot-toggle svg {
    animation: rotate-gradient 3s linear infinite;
}

@keyframes rotate-gradient {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 12px;
    width: fit-content;
    margin-bottom: 10px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Mobile Alignment Fixes - Pagination and Grid */
@media (max-width: 768px) {
    .listings-grid {
        grid-template-columns: minmax(100%, 1fr);
        gap: 20px;
    }

    .pagination-container {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 30px;
        padding: 0 5px;
    }

    .page-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}

/* Mobile Navigation Menu Drawer */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    /* Header layout and padding adjustments on mobile */
    header {
        top: 52px;
        padding: 10px 18px !important;
        width: 94% !important;
    }
    #header.scrolled {
        top: 46px !important;
        padding: 8px 18px !important;
        width: 96% !important;
    }

    /* Logo scaling on mobile to prevent overflow/wrap */
    .logo-subtitle {
        font-size: 0.55rem !important;
        letter-spacing: 1px !important;
        transition: display 0.3s ease;
    }

    /* Unscrolled hamburger menu visibility (needs white lines on dark header) */
    #header:not(.scrolled) .mobile-menu-btn span {
        background-color: white;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1010;
    }

    /* Force links inside mobile panel to be dark gray so they don't blend with light slide-out background */
    .nav-links {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: var(--surface-color);
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
        padding: 100px 40px 40px;
        transition: right 0.55s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1005;
        gap: 25px;
    }

    .nav-links a {
        color: var(--text-color) !important;
        font-size: 1rem !important;
        text-transform: capitalize !important;
    }
    
    .nav-links.open {
        right: 0;
    }
    
    /* Hamburger animation */
    .mobile-menu-btn.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-btn.open span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Extra support for ultra-small screen sizes (down to 320px) to prevent navbar overflow */
@media (max-width: 480px) {
    header {
        width: 95% !important;
        padding: 8px 12px !important;
    }
    #header.scrolled {
        width: 97% !important;
        padding: 6px 12px !important;
    }
    .logo-subtitle {
        display: none !important; /* Hide long subtitle to prevent wrapping/overflow entirely */
    }
    .logo {
        gap: 6px !important;
    }
    .header-profile-icon {
        width: 32px !important;
        height: 32px !important;
    }
    .logo-name {
        font-size: 1rem !important;
    }
    .nav-actions {
        gap: 8px !important; /* Tighten action gaps */
    }
}

/* Sold Pages Pagination Indicator */
.page-btn.sold-page {
    background: #eaeaea !important;
    color: #888888 !important;
    border-color: #dcdcdc !important;
}

.page-btn.sold-page:hover {
    background: #dfdfdf !important;
    color: #666666 !important;
    border-color: #cccccc !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.page-btn.sold-page.active {
    background: #888888 !important;
    border-color: #888888 !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
}

/* User Entrances Hover Effect */
.entrance-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Transaction Active/Sold Tabs */
.transaction-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 45px;
}
.transaction-tab {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.transaction-tab:hover {
    border-color: var(--primary-color);
    color: var(--text-color);
    transform: translateY(-1px);
}
.transaction-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Quick Filter Entrance Cards Styling */
.quick-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}
.quick-filter-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    color: white;
}
.quick-filter-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}