/* ===================================
   EMPIREAN HEIGHTS - CSS STYLESHEET
   Modern Real Estate Website Design
   Updated with Enhanced Branding
   =================================== */

@import url('modal-styles.css');

/* CSS Variables for Theme Support */
:root {
    /* Primary Colors */
    --primary-color: #1a5490;
    --primary-dark: #0d3a5f;
    --primary-light: #2d6ba8;
    --accent-color: #c89e5c;
    --accent-dark: #a07d3f;
    
    /* Neutral Colors */
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-color: #1f1f1f;
    --text-secondary: #5a5a5a;
    --text-light: #777777;
    --border-color: #e5e5e5;
    
    /* Semantic Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-size-base: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-color: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --border-color: #334155;
    --primary-color: #3b82f6;
    --primary-light: #60a5fa;
    --accent-color: #fbbf24;
}

/* ===================================
   GLOBAL STYLES & RESET
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 600;
    color: var(--text-color);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===================================
   THEME TOGGLE BUTTON
   =================================== */

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.theme-toggle .sun-icon {
    display: block;
    color: var(--accent-color);
}

.theme-toggle .moon-icon {
    display: none;
    color: var(--accent-color);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

/* ===================================
   NAVIGATION - UPDATED WITH BRANDING
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
}

/* NEW: Enhanced Logo & Branding Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    height: 50px;
    width: auto;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.company-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.company-name .highlight-gold {
    color: var(--accent-color);
}

.tagline {
    font-family: var(--font-primary);
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Dark mode adjustments */
[data-theme="dark"] .company-name {
    color: var(--primary-light);
}

[data-theme="dark"] .tagline {
    color: var(--text-secondary);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-menu li a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-menu li a:not(.cta-button):hover,
.nav-menu li a.active {
    color: var(--primary-color);
}

.nav-menu li a:not(.cta-button)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-normal);
}

.nav-menu li a:not(.cta-button):hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

.cta-button {
    background: var(--primary-color);
    color: white !important;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all var(--transition-normal);
    border-radius: 3px;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('images/header-bg.jpg') center/cover no-repeat;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);   /* faint dark overlay */
    backdrop-filter: blur(3px);        /* softens your interior image */
    z-index: 0;
}

.hero * {
    position: relative;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(200, 158, 92, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--spacing-2xl) 0;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    color: white;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-title .highlight {
    color: var(--accent-color);
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-2xl);
}

/* FIX: Enhanced button visibility in both light and dark modes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(200, 158, 92, 0.4);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(200, 158, 92, 0.5);
}

/* FIX: Better visibility for secondary button in BOTH light and dark mode */
.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
}

.hero-stats {
    display: flex;
    gap: var(--spacing-2xl);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-2xl);
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
    animation: bounce 2s infinite;
}

/* ===================================
   HIGHLIGHT TEXT EFFECTS
   =================================== */

.highlight {
    position: relative;
    display: inline-block;
}

.section-tag {
    display: inline-block;
    background: rgba(26, 84, 144, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(26, 84, 144, 0.2);
}

[data-theme="dark"] .section-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    border-color: rgba(59, 130, 246, 0.2);
}

/* ===================================
   TRUST BADGES SECTION
   =================================== */

.trust-badges {
    background: var(--bg-color);
    padding: var(--spacing-2xl) 0;
    border-bottom: 1px solid var(--border-color);
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    text-align: center;
}

.badge svg {
    color: var(--primary-color);
}

.badge p {
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

/* ===================================
   SECTION HEADER STYLES
   =================================== */

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-2xl);
}

.section-header h2 {
    margin-bottom: var(--spacing-md);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ===================================
   ABOUT SECTION
   =================================== */

.about-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    margin-top: var(--spacing-2xl);
}

.about-text h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.about-text p {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.about-stat {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.about-stat h4 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.about-stat p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* FIX: About image with proper placeholder display */
.about-image {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.about-image .image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-image .image-placeholder svg {
    color: rgba(255, 255, 255, 0.2);
    width: 100px;
    height: 100px;
}

/* ===================================
   SERVICES SECTION
   =================================== */

.services-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.service-card {
    background: var(--bg-color);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.service-icon svg {
    color: white;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.service-card p {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

/* FIX: Proper green checkmark bullets for service lists */
.service-card ul {
    list-style: none;
    padding: 0;
}

.service-card ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.service-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 1.125rem;
    height: 1.125rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* ===================================
   PROPERTIES SECTION
   =================================== */

.properties-section {
    background: var(--dark-bg);
    color: #fff;
    padding: 80px 0;
    margin-bottom: 120px; /* increased gap below */
}

.property-filters {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-2xl);
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.property-card {
    background: var(--bg-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.property-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    z-index: 1;
}

.property-details {
    padding: var(--spacing-lg);
}

.property-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.property-location svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Soft Luxury Property Card Layout */
.property-content {
    padding: 1.5rem 1.75rem;
    text-align: center;
}

.property-content h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.property-content .property-description {
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.property-features {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-md);
    justify-content: center;
    text-align: center;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.property-features svg {
    color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.property-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.property-price .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.property-price .period {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.property-actions {
    display: flex;
    gap: 0.75rem;
}

.property-actions .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
    background: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(200, 158, 92, 0.3);
}

.property-actions .btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 158, 92, 0.5);
}

.property-actions .btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.property-actions .btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}

.cta-container {
    text-align: center;
}

/* ===================================
   WHY CHOOSE US SECTION
   =================================== */

.why-us-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
    margin-top: var(--spacing-3xl); /* adds space above Why Us */
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.why-us-card {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-color);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.why-us-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.why-us-card svg {
    width: 60px;
    height: 60px;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.why-us-card h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.why-us-card p {
    line-height: 1.7;
}

/* ===================================
   CONTACT SECTION
   =================================== */

.contact-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-color);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
}

.contact-info-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    align-items: flex-start;
}

.contact-info-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-info-item div h4 {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.contact-info-item div p {
    color: var(--text-secondary);
    margin: 0;
}

.contact-form-container h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: 0;
}

.contact-form .form-group {
    margin-bottom: var(--spacing-md);
}

.legal-link {
    margin-top: 2px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    text-align: right;
}

.legal-link button {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font: inherit;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 84, 144, 0.1);
}

.contact-form select {
    cursor: pointer;
    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='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Fix for dark mode dropdown arrow */
[data-theme="dark"] .contact-form select {
    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='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

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

.contact-form button[type="submit"] {
    width: 100%;
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--bg-secondary);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-brand {
    max-width: 400px;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: var(--spacing-md);
}

.footer-logo-icon {
    height: 60px;
    width: auto;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-company-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
}

.footer-company-name .highlight-gold {
    color: var(--accent-color);
}

.footer-tagline {
    font-family: var(--font-primary);
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 500;
}

[data-theme="dark"] .footer-company-name {
    color: var(--primary-light);
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.footer-registration {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-column h4 {
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.newsletter-form {
    display: flex;
    margin-top: var(--spacing-md);
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
}

.newsletter-form button {
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* ===================================
   ANIMATIONS
   =================================== */

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .about-content,
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-base: 15px;
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 4rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Responsive branding - Navigation */
    .logo-icon {
        height: 40px;
    }
    
    .company-name {
        font-size: 1.25rem;
    }
    
    .tagline {
        font-size: 0.7rem;
    }
    
    /* Responsive branding - Footer */
    .footer-logo-icon {
        height: 50px;
    }
    
    .footer-company-name {
        font-size: 1.25rem;
    }
    
    .footer-tagline {
        font-size: 0.8rem;
    }
    
    .hero-stats {
        gap: var(--spacing-lg);
    }
    
    .stat h3 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .about-image {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
    }
    
    /* Extra small mobile branding */
    .logo {
        gap: 0.75rem;
    }
    
    .logo-icon {
        height: 35px;
    }
    
    .company-name {
        font-size: 1.1rem;
    }
    
    .tagline {
        font-size: 0.65rem;
    }
    
    .footer-logo-container {
        gap: 0.75rem;
    }
    
    .footer-logo-icon {
        height: 45px;
    }
    
    .footer-company-name {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-buttons .btn span {
        font-size: 0.9rem;
    }
    
    .property-filters {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
    }
}

/* ===================================
   CONTACT MODAL STYLES
   =================================== */

#contactModal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

#contactModal .modal-content {
    background: var(--bg-color);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

#contactModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
}

#contactModal .modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    font-size: 28px;
}

#contactModal .modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#contactModal .modal-close:hover {
    color: var(--primary-color);
}

#contactModal .modal-body {
    padding: 30px;
}

/* Phone number field flex container styling */
.form-group > div[style*="display: flex"] {
    display: flex !important;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: stretch;
}

.form-group > div[style*="display: flex"] select {
    min-width: 120px;
    max-width: 140px;
    flex-shrink: 0;
}

.form-group > div[style*="display: flex"] input[type="tel"] {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    #contactModal .modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    #contactModal .modal-header {
        padding: 20px;
    }
    
    #contactModal .modal-header h2 {
        font-size: 24px;
    }
    
    #contactModal .modal-body {
        padding: 20px;
    }
    
    /* Mobile phone field layout fix */
    .form-group > div[style*="display: flex"] {
        display: flex !important;
        gap: 6px;
    }
    
    .form-group > div[style*="display: flex"] select {
        min-width: 100px;
        max-width: 110px;
        font-size: 0.85rem;
    }
    
    .form-group > div[style*="display: flex"] input[type="tel"] {
        flex: 1;
        min-width: 0;
        font-size: 0.9rem;
    }
}

/* Properties search bar */
.property-search {
  margin: 0 0 16px 0;
}
.property-search input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  font-size: 16px;
}

/* === Contact form: mobile-only field reordering (works across .form-row) === */
@media (max-width: 640px) {
  /* Put the form on a simple grid */
  #contact .contact-form form {
    display: grid;
    grid-auto-flow: row;
    gap: 16px;
  }

  /* Flatten row wrappers so groups become direct grid children */
  #contact .contact-form .form-row {
    display: contents;
  }

  /* Reorder by the field each group contains */
  #contact .contact-form .form-group:has(#name)           { order: 1; } /* Row 1 (left)  */
  #contact .contact-form .form-group:has(#email)          { order: 2; } /* Row 1 (right) */
  #contact .contact-form .form-group:has(#phone)          { order: 3; } /* Row 2         */
  #contact .contact-form .form-group:has(#interest)       { order: 4; } /* Row 3 (left)  */
  #contact .contact-form .form-group:has(#assetClass)     { order: 5; } /* Row 3 (right) */
  #contact .contact-form .form-group:has(#contactCountry) { order: 6; } /* Row 4         */
  #contact .contact-form .form-group:has(#message)        { order: 7; } /* Row 5         */
  #contact .contact-form button[type="submit"]            { order: 8; } /* Submit        */
}
/* Temporarily hide For Sale, For Rent, and Investment buttons */
.property-filters .filter-btn[data-filter="sale"],
.property-filters .filter-btn[data-filter="rent"],
.property-filters .filter-btn[data-filter="investment"] {
  display: none !important;
}

/* Card descriptions: clamp to 5 lines with ellipsis */
.properties-grid .property-card .property-description {
  display: -webkit-box;
  display: box;                  /* fallback for older browsers */
  -webkit-box-orient: vertical;
  box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;                 /* standard property */
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-height: 8.25em;
}

/* === Mobile-only clamp for property card description (5 lines) === */
@media (max-width: 640px) {
  .properties-grid .property-card .property-description {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    text-overflow: ellipsis;
    /* keep lines consistent across devices */
    line-height: 1.65;
    max-height: calc(1.65em * 5);
    word-break: break-word;
    white-space: normal;
  }
}

/* Modal meta row (deposit line) */
.modal-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(0,0,0,.06);
}
.modal-meta-row span { opacity: .8; }

/* === Why Choose Us: light-mode icon visibility (no deletions) === */
html:not([data-theme="dark"]) .why-card .why-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto var(--spacing-md);
  background: rgba(26, 84, 144, 0.08);
}

html:not([data-theme="dark"]) .why-card .why-icon svg {
  width: 36px;
  height: 36px;
  color: var(--primary-color) !important;
  opacity: 1 !important;
  stroke: currentColor !important; /* works with stroke-based outline icons */
  stroke-width: 2.25;
}

/* Dark mode contrast */
[data-theme="dark"] .why-card .why-icon {
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .why-card .why-icon svg {
  color: #fbbf24 !important;
}

/* === Why Choose Us: Dark-mode icon centering & background fix === */
[data-theme="dark"] .why-card .why-icon {
  /* keep the same circular “badge” as light mode */
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto var(--spacing-md); /* centers the badge */
  background: rgba(255, 255, 255, 0.08); /* subtle circle, not a bar */
}

[data-theme="dark"] .why-card .why-icon svg {
  /* override any global svg rules that cause the gray bar & left align */
  width: 36px !important;
  height: 36px !important;
  display: block;          /* no inline gaps */
  margin: 0;               /* stay centered by grid parent */
  background: transparent !important;  /* kill the gray rectangle */
  color: #fbbf24 !important;           /* same accent as before */
  stroke: currentColor !important;
  stroke-width: 2.25;
  /* don't force fill; most icons are stroke-based */
}

/* === Back to Top Floating Button === */
#backToTopBtn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: #fff;
  font-size: 1.6rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

#backToTopBtn:hover {
  background: var(--accent-color);
  color: #101010;
  transform: scale(1.1);
}

#backToTopBtn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* === Reduce space below footer (bottom of site) === */
.footer {
    padding-bottom: var(--spacing-sm);
}

/* === Balanced footer spacing adjustment === */
.footer { 
  padding-top: var(--spacing-xl);       /* keep a nice top cushion */
  padding-bottom: var(--spacing-md);    /* reduce but not eliminate bottom gap */
}

.footer-grid { 
  margin-bottom: var(--spacing-md);     /* slight gap above footer bottom row */
}

.footer-bottom { 
  padding-top: var(--spacing-md);       /* consistent inner padding */
}

/* Make sure footer stays at bottom when content is short, but not flush */
html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  margin: 0;
}
footer.footer {
  margin-top: auto;
}

/* Hide Twitter & LinkedIn social icons */
.social-links a[aria-label="Twitter"],
.social-links a[aria-label="LinkedIn"] {
    display: none !important;
}
