/* =============================================================
   AVIORA PROPERTIES LIMITED - Main Stylesheet
   Style: Modern Elegant / Luxury Real Estate
   ============================================================= */

/* CSS Variables */
:root {
    --gold: #B8963E;
    --gold-light: #D4AF61;
    --gold-dark: #8B6914;
    --dark: #0F1923;
    --dark-2: #1C2A38;
    --dark-3: #243447;
    --text: #4A5568;
    --text-light: #718096;
    --white: #FFFFFF;
    --off-white: #F9F7F4;
    --light-gray: #F2EFE9;
    --border: #E5DDD0;
    --success: #2D7D46;
    --error: #C53030;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
    --shadow-gold: 0 8px 30px rgba(184,150,62,0.25);

    --radius: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    --transition: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden; /* prevent ANY element from causing horizontal scroll */
    max-width: 100vw;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    max-width: 100vw;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    color: var(--dark);
    line-height: 1.2;
    font-weight: 600;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
p, li, span, div { word-break: break-word; overflow-wrap: break-word; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    padding: 8px 0;
    letter-spacing: 0.03em;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.top-bar a {
    color: rgba(255,255,255,0.75);
    margin-right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.top-bar a:hover { color: var(--gold-light); }
.top-bar-right a { margin-right: 0; margin-left: 20px; }

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    gap: 2rem;
    position: relative;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    font-family: var(--font-display);
    font-size: 1.5rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border-radius: 2px; flex-shrink: 0;
}
.logo-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 700;
    color: var(--dark);
    letter-spacing: 0.08em; line-height: 1;
}
.logo-tagline {
    display: block;
    font-size: 0.68rem; color: var(--gold);
    letter-spacing: 0.12em; text-transform: uppercase; margin-top: 3px;
}
.nav-links { display: flex; align-items: center; gap: 0; }
.nav-links > li { position: relative; }
.nav-links > li > a {
    display: flex; align-items: center; gap: 5px;
    padding: 8px 16px;
    font-size: 0.875rem; font-weight: 500;
    color: var(--dark);
    letter-spacing: 0.02em; white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li.active > a { color: var(--gold); }

/* Dropdown */
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown {
    position: absolute; top: 100%; left: 0;
    background: white; min-width: 220px;
    border: 1px solid var(--border); border-top: 2px solid var(--gold);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: var(--transition); z-index: 100;
}
.dropdown li a {
    display: block; padding: 10px 20px;
    font-size: 0.875rem; color: var(--text);
    border-bottom: 1px solid var(--light-gray);
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: var(--off-white); color: var(--gold); padding-left: 26px; }

/* WhatsApp Nav Button */
.btn-whatsapp {
    background: #25D366; color: white !important;
    padding: 9px 18px !important; border-radius: 50px !important;
    font-weight: 600 !important; font-size: 0.82rem !important;
    margin-left: 8px;
    display: inline-flex !important; align-items: center; gap: 6px;
}
.btn-whatsapp:hover { background: #1da851 !important; transform: translateY(-1px); }

/* Mobile Toggle */
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
    display: block; width: 25px; height: 2px;
    background: var(--dark); transition: var(--transition); border-radius: 2px;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    border: 2px solid transparent;
    letter-spacing: 0.05em; text-transform: uppercase;
}
.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white; border-color: var(--gold);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    box-shadow: var(--shadow-gold); transform: translateY(-2px); color: white;
}
.btn-outline { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: white; transform: translateY(-2px); }
.btn-dark { background: var(--dark); color: white; border-color: var(--dark); }
.btn-dark:hover { background: var(--dark-2); transform: translateY(-2px); }
.btn-footer {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--gold); color: white;
    padding: 10px 22px; border-radius: var(--radius);
    font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em;
}
.btn-footer:hover { background: var(--gold-light); color: white; }

/* ===== SECTION TITLES ===== */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label {
    display: inline-block;
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 0.75rem; position: relative;
}
.section-label::before, .section-label::after {
    content: ''; display: inline-block;
    width: 30px; height: 1px; background: var(--gold);
    vertical-align: middle; margin: 0 10px;
}
.section-title { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--dark); margin-bottom: 1rem; }
.section-subtitle { color: var(--text-light); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* ===== HERO ===== */
.hero {
    min-height: 92vh; position: relative;
    display: flex; align-items: center;
    overflow: hidden; background: var(--dark);
}
.hero-bg {
    position: absolute; inset: 0;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.35; transform: scale(1.05); transition: transform 8s ease;
}
.hero-bg.animated { transform: scale(1); }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(15,25,35,0.95) 0%, rgba(15,25,35,0.6) 60%, transparent 100%);
}
.hero-content {
    position: relative; z-index: 2;
    max-width: 700px; color: white;
    animation: fadeInUp 0.9s ease both;
    padding: 2rem 0;
}
.hero-badge {
    display: inline-block;
    background: rgba(184,150,62,0.15); border: 1px solid rgba(184,150,62,0.4);
    color: var(--gold-light); padding: 6px 16px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: white; line-height: 1.08; margin-bottom: 1.25rem; font-weight: 700;
}
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero-sub {
    font-size: 1.1rem; color: rgba(255,255,255,0.75);
    margin-bottom: 2.5rem; max-width: 520px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero Search */
.hero-search {
    background: white; border-radius: var(--radius-md);
    padding: 8px; display: flex; gap: 8px; flex-wrap: wrap;
    box-shadow: var(--shadow-lg); margin-top: 3rem; max-width: 680px;
}
.hero-search select, .hero-search input {
    flex: 1; min-width: 140px; padding: 12px 16px;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--font-body); font-size: 0.9rem;
    color: var(--dark); background: var(--off-white);
}
.hero-search .btn { flex-shrink: 0; }

/* ===== STATS BAR ===== */
.stats-bar { background: var(--dark); padding: 2rem 0; }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1px; background: rgba(255,255,255,0.08);
}
.stat-item { text-align: center; padding: 1.5rem; background: var(--dark); }
.stat-number {
    font-family: var(--font-display); font-size: 2.2rem;
    font-weight: 700; color: var(--gold-light); line-height: 1;
}
.stat-label {
    font-size: 0.8rem; color: rgba(255,255,255,0.5);
    letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px;
}

/* ===== PROPERTY CARD ===== */
.properties-section { padding: 5rem 0; background: var(--off-white); }
.properties-filter { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 3rem; }
.filter-btn {
    padding: 9px 22px;
    border: 1.5px solid var(--border); background: white; color: var(--text);
    border-radius: 50px; cursor: pointer;
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
    transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active { background: var(--gold); border-color: var(--gold); color: white; }

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.property-card {
    background: white; border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: var(--transition); border: 1px solid var(--border);
}
.property-card:hover { box-shadow: var(--shadow-md); transform: translateY(-5px); }
.property-card-image {
    position: relative; height: 220px;
    overflow: hidden; background: var(--light-gray);
}
.property-card-image img {
    width: 100%; height: 100%; object-fit: cover; transition: var(--transition-slow);
}
.property-card:hover .property-card-image img { transform: scale(1.05); }
.property-badge {
    position: absolute; top: 14px; left: 14px;
    background: var(--gold); color: white;
    padding: 4px 12px; border-radius: 50px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.property-badge.sold { background: #C53030; }
.property-badge.reserved { background: #C05621; }
.property-badge.rented { background: #2C7A7B; }
.property-status { position: absolute; top: 14px; right: 14px; }
.prop-favorite {
    width: 34px; height: 34px;
    background: white; border: none; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light); box-shadow: var(--shadow-sm); font-size: 0.9rem;
    transition: var(--transition);
}
.prop-favorite:hover { color: #e53e3e; transform: scale(1.1); }

.property-card-body { padding: 1.25rem; }
.prop-type { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.prop-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--dark); margin-bottom: 0.5rem; font-weight: 600; }
.prop-location { display: flex; align-items: center; gap: 5px; color: var(--text-light); font-size: 0.85rem; margin-bottom: 1rem; }
.prop-location i { color: var(--gold); font-size: 0.75rem; }
.prop-features {
    display: flex; gap: 1rem;
    padding: 0.875rem 0;
    border-top: 1px solid var(--light-gray); border-bottom: 1px solid var(--light-gray);
    margin-bottom: 1rem; flex-wrap: wrap;
}
.prop-feature { display: flex; align-items: center; gap: 5px; font-size: 0.82rem; color: var(--text-light); }
.prop-feature i { color: var(--gold); }
.prop-footer { display: flex; justify-content: space-between; align-items: center; }
.prop-price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--dark); }
.prop-price span { font-size: 0.8rem; color: var(--text-light); font-weight: 400; font-family: var(--font-body); }
.prop-cta { background: var(--gold); color: white; padding: 8px 16px; border-radius: var(--radius); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; }
.prop-cta:hover { background: var(--gold-dark); color: white; }

/* ===== SERVICES SECTION ===== */
.services-section { padding: 5rem 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.service-card {
    background: var(--off-white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 2.5rem 2rem;
    transition: var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: scaleX(0); transition: var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); background: white; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, rgba(184,150,62,0.1), rgba(184,150,62,0.2));
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--gold); margin-bottom: 1.25rem;
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.service-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.7; }

/* ===== WHY US ===== */
.why-section { padding: 5rem 0; background: var(--dark); color: white; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.why-content .section-title { color: white; }
.why-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.why-item { display: flex; gap: 1rem; align-items: flex-start; }
.why-icon {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(184,150,62,0.15); border: 1px solid rgba(184,150,62,0.3);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-light); flex-shrink: 0; font-size: 0.9rem;
}
.why-item h4 { color: white; font-size: 1rem; margin-bottom: 0.25rem; }
.why-item p { color: rgba(255,255,255,0.55); font-size: 0.875rem; }
.why-image { position: relative; border-radius: var(--radius-lg); overflow: hidden; height: 500px; }
.why-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.why-image-card {
    position: absolute; bottom: 2rem; left: -2rem;
    background: white; padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
}
.why-image-card .big-num { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; color: var(--gold); line-height: 1; }
.why-image-card p { font-size: 0.8rem; color: var(--text); margin-top: 4px; }

/* ===== TESTIMONIALS ===== */
.testimonials-section { padding: 5rem 0; background: var(--off-white); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.testimonial-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.testimonial-stars { color: var(--gold); margin-bottom: 1rem; font-size: 0.9rem; }
.testimonial-text { font-family: var(--font-display); font-size: 1.05rem; color: var(--dark); line-height: 1.7; margin-bottom: 1.5rem; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex; align-items: center; justify-content: center;
    color: white; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-weight: 600; font-size: 0.9rem; color: var(--dark); }
.author-role { font-size: 0.78rem; color: var(--text-light); }

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
    text-align: center; color: white;
}
.cta-section h2 { color: white; font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.85); margin-bottom: 2.5rem; font-size: 1.05rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-white {
    background: white; color: var(--gold-dark); border: 2px solid white;
    padding: 13px 28px; border-radius: var(--radius);
    font-weight: 700; font-size: 0.875rem; letter-spacing: 0.05em; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 8px; transition: var(--transition);
}
.btn-white:hover { background: transparent; color: white; }
.btn-outline-white {
    background: transparent; color: white; border: 2px solid rgba(255,255,255,0.6);
    padding: 13px 28px; border-radius: var(--radius);
    font-weight: 600; font-size: 0.875rem; letter-spacing: 0.05em; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 8px; transition: var(--transition);
}
.btn-outline-white:hover { border-color: white; background: rgba(255,255,255,0.1); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--dark); margin-bottom: 6px; letter-spacing: 0.04em; }
.form-label .req { color: var(--gold); }
.form-control {
    width: 100%; padding: 12px 16px;
    border: 1.5px solid var(--border); border-radius: var(--radius);
    font-family: var(--font-body); font-size: 0.9rem;
    color: var(--dark); background: var(--off-white); transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--gold); background: white; box-shadow: 0 0 0 3px rgba(184,150,62,0.1); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.alert {
    padding: 1rem 1.25rem; border-radius: var(--radius);
    margin-bottom: 1rem; font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
}
.alert-success { background: #F0FFF4; color: #276749; border: 1px solid #C6F6D5; }
.alert-error { background: #FFF5F5; color: #9B2335; border: 1px solid #FED7D7; }

/* ===== FOOTER ===== */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.6); }
.footer-top { padding: 5rem 0 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 3rem; }
.footer-brand .footer-logo {
    display: flex; align-items: center; gap: 12px; margin-bottom: 1.25rem;
}
/* Footer logo — white version for dark background */
.footer-brand .footer-logo img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}
.footer-brand p { font-size: 0.875rem; line-height: 1.7; margin-bottom: 1.5rem; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
    width: 36px; height: 36px;
    border: 1px solid rgba(255,255,255,0.15); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.5); font-size: 0.85rem; transition: var(--transition);
}
.footer-socials a:hover { background: var(--gold); border-color: var(--gold); color: white; }
.footer-col h4 {
    color: white; font-family: var(--font-display); font-size: 1.1rem;
    margin-bottom: 1.25rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a { font-size: 0.875rem; color: rgba(255,255,255,0.55); }
.footer-col ul li a:hover { color: var(--gold-light); padding-left: 4px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 0.875rem; }
.contact-list i { color: var(--gold); margin-top: 4px; width: 16px; flex-shrink: 0; }
.contact-list a:hover { color: var(--gold-light); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 1.5rem 0;
}
.footer-bottom .container {
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.35); }
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: var(--gold); }

/* ===== FLOATING ELEMENTS ===== */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px;
    width: 56px; height: 56px;
    background: #25D366; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 999; transition: var(--transition);
}
.whatsapp-float:hover { background: #1da851; transform: scale(1.1); color: white; }
.wa-tooltip {
    position: absolute; right: 66px;
    background: var(--dark); color: white;
    padding: 6px 12px; border-radius: 4px;
    font-size: 0.78rem; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: var(--transition);
}
.whatsapp-float:hover .wa-tooltip { opacity: 1; }

.back-to-top {
    position: fixed; bottom: 100px; right: 30px;
    width: 42px; height: 42px;
    background: var(--dark); color: white;
    border: none; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md); z-index: 998;
    opacity: 0; transform: translateY(20px); transition: var(--transition);
    font-size: 0.85rem;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--gold); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== PAGE HEADER ===== */
.page-header { background: var(--dark); padding: 4rem 0; position: relative; overflow: hidden; }
.page-header::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.page-header h1 { color: white; font-size: 2.5rem; margin-bottom: 0.5rem; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-top: 0.75rem; }
.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb i { font-size: 0.6rem; }
.breadcrumb .current { color: var(--gold); }

/* ===== PROPERTY DETAIL ===== */
.property-detail { padding: 4rem 0; }
.property-detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start; }
.property-gallery { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 2rem; }
.gallery-main { height: 460px; overflow: hidden; background: var(--light-gray); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb {
    width: 90px; height: 65px; flex-shrink: 0;
    border-radius: var(--radius); overflow: hidden; cursor: pointer;
    opacity: 0.6; transition: var(--transition); border: 2px solid transparent;
}
.gallery-thumb:hover, .gallery-thumb.active { opacity: 1; border-color: var(--gold); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.property-sidebar { position: sticky; top: 100px; }
.sidebar-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.price-display { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--dark); margin-bottom: 0.25rem; }
.price-type { font-size: 0.82rem; color: var(--text-light); }
.sidebar-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }
.sidebar-actions .btn { justify-content: center; }

/* Mobile Sticky CTA Bar (hidden on desktop, shown ≤1100px via media query) */
.prop-mobile-cta {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 500;
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 12px 16px;
    align-items: center;
    gap: 12px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}
.prop-mobile-cta-price {
    flex: 1;
    min-width: 0;
}
.prop-mobile-cta-price .price-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 2px;
}
.prop-mobile-cta-price .price-val {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prop-mobile-cta-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.prop-mobile-cta .btn-wa {
    background: #25D366;
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}
.prop-mobile-cta .btn-visit {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}
/* Add padding to page bottom so content isn't hidden behind sticky bar */
body.has-prop-cta { padding-bottom: 72px; }

/* ===== MAPS ===== */
#propertyMap { height: 350px; border-radius: var(--radius-lg); overflow: hidden; }

/* ===== SEARCH PAGE ===== */
.search-filters { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 2rem; box-shadow: var(--shadow-sm); }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; align-items: end; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.page-btn {
    width: 40px; height: 40px;
    border: 1.5px solid var(--border); background: white; color: var(--text);
    border-radius: var(--radius); cursor: pointer;
    font-family: var(--font-body); font-size: 0.875rem;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
}
.page-btn:hover, .page-btn.active { background: var(--gold); border-color: var(--gold); color: white; }

/* ===== ABOUT PAGE CLASSES ===== */
/* Leadership grid — used in about.php */
.leader-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}
.leader-photo {
    position: relative;
}
.leader-photo-inner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, var(--dark-2), var(--dark-3));
    box-shadow: var(--shadow-lg);
}
.leader-photo-inner img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
}
.leader-photo-monogram {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    text-align: center;
}
.leader-name-bar {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    padding: 1.25rem 1.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Team grid for multiple members */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.team-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}
.team-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.team-card-photo {
    height: 300px; overflow: hidden;
    background: linear-gradient(135deg, var(--dark-2), var(--dark-3));
}
.team-card-photo img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
}
.team-card-body { padding: 1.5rem; }
.team-card-body h3 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.team-card-role { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.75rem; }
.team-card-bio { font-size: 0.875rem; color: var(--text-light); line-height: 1.7; margin-bottom: 1.25rem; }
.team-card-contact { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Mission/Vision two-column section */
.about-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.about-intro-image {
    position: relative;
}
.about-image-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 420px;
    background: var(--off-white);
}
.about-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.about-est-badge {
    position: absolute;
    bottom: -1.5rem; left: -1.5rem;
    background: var(--gold); color: white;
    padding: 1.5rem; border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}
.about-stats-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.about-stat { text-align: center; }
.about-stat-num { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; color: var(--gold); line-height: 1; }
.about-stat-label { font-size: 0.78rem; color: var(--text-light); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 4px; }
.about-stat-divider { width: 1px; background: var(--border); }

/* ===== MODAL ===== */
.modal-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 9999;
    align-items: center; justify-content: center;
    padding: 1rem; overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal-box {
    background: white; border-radius: var(--radius-lg);
    padding: 2rem; max-width: 520px; width: 100%;
    position: relative; max-height: 90vh; overflow-y: auto;
}
.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; font-size: 1.3rem;
    cursor: pointer; color: var(--text-light); line-height: 1;
}
.modal-close:hover { color: var(--dark); }

/* ===== RESPONSIVE ===== */

/* --- Property sidebar collapse: 1100px --- */
@media (max-width: 1100px) {
    .property-detail-grid { grid-template-columns: 1fr; }
    .property-sidebar { position: static; width: 100%; max-width: 100%; }
    .sidebar-card { width: 100%; max-width: 100%; box-sizing: border-box; }
    .sidebar-actions .btn { width: 100%; justify-content: center; box-sizing: border-box; }
    .prop-mobile-cta { display: flex; }
}

/* --- Large Tablet: 1024px --- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .why-grid { grid-template-columns: 1fr; gap: 3rem; }
    .why-image { height: 350px; }
    .why-image-card { left: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .leader-grid { grid-template-columns: 280px 1fr; gap: 2.5rem; }
    .about-intro-grid { gap: 3rem; }
}

/* --- Tablet: 900px --- */
@media (max-width: 900px) {
    .about-intro-grid { grid-template-columns: 1fr; }
    .about-intro-image { margin-top: 2rem; }
    .about-est-badge { bottom: 0; left: 0; }
    .about-image-wrap { height: 320px; }

    /* Team layout */
    .leader-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    .leader-photo-inner { aspect-ratio: 4/3; }
}

/* --- Mobile: 768px --- */
@media (max-width: 768px) {

    /* Navigation */
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        background: white; flex-direction: column;
        padding: 0.5rem 0 1rem;
        border-top: 1px solid var(--border); box-shadow: var(--shadow-lg);
        gap: 0; align-items: stretch; z-index: 999;
    }
    .nav-links.open { display: flex; }
    .nav-links > li > a {
        padding: 13px 20px;
        border-bottom: 1px solid var(--light-gray);
        font-size: 0.95rem;
    }
    .dropdown {
        position: static; opacity: 1; visibility: visible;
        transform: none; border: none; box-shadow: none;
        background: var(--off-white); padding: 0 0 0 16px;
        display: none;
    }
    .has-dropdown.open .dropdown { display: block; }
    .btn-whatsapp {
        margin: 0.75rem 1rem 0 !important;
        width: calc(100% - 2rem) !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }
    .top-bar { display: none; }

    /* Hero */
    .hero { min-height: 100svh; padding: 5rem 0 3rem; align-items: flex-end; }
    .hero-content { padding-bottom: 3rem; }
    .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
    .hero-sub { font-size: 1rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-search { flex-direction: column; gap: 0.75rem; margin-top: 2rem; }
    .hero-search select, .hero-search input { min-width: unset; width: 100%; }
    .hero-search .btn { width: 100%; justify-content: center; }

    /* Stats */
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-number { font-size: 1.8rem; }
    .stat-item { padding: 1.25rem; }

    /* Section spacing */
    .properties-section,
    .services-section,
    .why-section,
    .testimonials-section,
    .cta-section { padding: 3rem 0; }
    .section-header { margin-bottom: 2rem; }
    .section-title { font-size: 1.75rem; }

    /* Property cards — 1 column on small screens */
    .properties-grid { grid-template-columns: 1fr; }
    .filter-btn { padding: 7px 14px; font-size: 0.8rem; }

    /* Services */
    .services-grid { grid-template-columns: 1fr; }
    .service-card { padding: 1.75rem 1.5rem; }

    /* Why section */
    .why-grid { grid-template-columns: 1fr; gap: 2rem; }
    .why-image { height: 260px; }
    .why-image-card { left: 0; bottom: 1rem; }

    /* Testimonials */
    .testimonials-grid { grid-template-columns: 1fr; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-top { padding: 3rem 0 2rem; }

    /* Forms */
    .form-row { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: 1fr 1fr; }

    /* Page header */
    .page-header { padding: 2.5rem 0; }
    .page-header h1 { font-size: 1.8rem; }

    /* CTA */
    .cta-buttons { flex-direction: column; align-items: center; }
    .btn-white, .btn-outline-white { width: 100%; max-width: 320px; justify-content: center; }

    /* Floating buttons */
    .whatsapp-float { bottom: 20px; right: 16px; width: 50px; height: 50px; font-size: 1.3rem; }
    .back-to-top { bottom: 84px; right: 16px; }
    /* Push floats up when property sticky CTA is showing */
    body.has-prop-cta .whatsapp-float { bottom: 88px; }
    body.has-prop-cta .back-to-top { bottom: 152px; }

    /* Property detail */
    .gallery-main { height: 260px; }
    .sidebar-card { padding: 1.25rem; }
    .price-display { font-size: 1.6rem; }

    /* Search filters */
    .search-filters { padding: 1rem; }
    .filter-grid { grid-template-columns: 1fr; gap: 0.75rem; }

    /* About page */
    .leader-grid { grid-template-columns: 1fr; max-width: 480px; }
    .leader-photo-inner { aspect-ratio: 1/1; }
    .about-intro-grid { grid-template-columns: 1fr; }
    .about-image-wrap { height: 260px; }
    .about-est-badge { position: static; display: inline-block; margin-top: 1rem; }
    .about-stats-row { gap: 1rem; }
    .about-stat-num { font-size: 2rem; }
    .about-stat-divider { display: none; }
    .team-grid { grid-template-columns: 1fr; max-width: 400px; }

    /* Catch inline grids (pages using style="display:grid") */
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns:1fr 420px"],
    [style*="grid-template-columns:340px 1fr"],
    [style*="grid-template-columns:1fr 340px"],
    [style*="grid-template-columns:1fr 380px"],
    [style*="grid-template-columns:1fr 1.4fr"],
    [style*="grid-template-columns:1.4fr 1fr"],
    [style*="grid-template-columns:1.5fr 1fr"],
    [style*="grid-template-columns:1fr 320px"],
    [style*="grid-template-columns:repeat(4,1fr)"],
    [style*="grid-template-columns:repeat(3,1fr)"],
    [style*="grid-template-columns:repeat(2,1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* About page absolute badge fix */
    [style*="position:absolute;bottom:-1.5rem;left:-1.5rem"] {
        position: static !important;
        display: inline-block;
        margin-top: 1rem;
    }

    /* Misc */
    .prop-features { flex-wrap: wrap; gap: 0.5rem; }
    .why-image-card { position: static; margin-top: 1rem; display: inline-block; }
    .modal-box { padding: 1.5rem; }
}

/* --- Small Mobile: 480px --- */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    html { font-size: 15px; }
    .hero h1 { font-size: 1.9rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-item { padding: 1rem; }
    .properties-grid { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-socials a { width: 32px; height: 32px; }
    .gallery-main { height: 220px; }
    .page-header h1 { font-size: 1.5rem; }
    .section-title { font-size: 1.5rem; }
    [style*="grid-template-columns:repeat(auto-fill"] { grid-template-columns: 1fr !important; }

    /* Ensure team contacts stack */
    .team-card-contact { flex-direction: column; align-items: center; }

    /* Nav tighter */
    .navbar .container { height: 65px; }
    .nav-brand img { height: 44px !important; }

    /* Property page: prevent long text/hashtags from causing overflow */
    .property-detail [style*="line-height:1.8"],
    .property-detail [style*="line-height: 1.8"],
    .sidebar-card,
    .property-detail div,
    .property-detail p {
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: 100%;
    }
    /* Property detail cards take full width */
    .property-detail [style*="background:white"],
    .property-detail [style*="background: white"] {
        max-width: 100%;
        overflow: hidden;
    }
    /* Share buttons row wraps */
    .sidebar-card [style*="display:flex;gap:8px"],
    .sidebar-card [style*="display: flex; gap: 8px"] {
        flex-wrap: wrap;
    }
    .sidebar-card [style*="display:flex;gap:8px"] a,
    .sidebar-card [style*="display: flex; gap: 8px"] a {
        flex: 1 1 80px;
    }
}

/* --- Very small: 360px --- */
@media (max-width: 360px) {
    .container { padding: 0 12px; }
    .hero h1 { font-size: 1.65rem; }
    .btn { padding: 11px 20px; font-size: 0.82rem; }
    .stat-number { font-size: 1.5rem; }
}
