﻿/* ========== GLOBAL STYLES ========== */
:root {
	
    --primary-blue: #2A6F97;
    --primary-dark: #1E4A6F;
    --success-green: #2E9B6C;
    --dark-text: #333;
    --light-text: #666;
    --light-bg: #F8F9FA;
    --white: #fff;
    --border: #E5E5E5;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark-text);
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}
.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--white);
}
.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
}
.gradient-text {
    background: linear-gradient(135deg, #FFD166, #FFB347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 18px;
    margin-bottom: 30px;
}
.hero-search .search-fields {
    display: flex;
    gap: 10px;
    background: var(--white);
    border-radius: 50px;
    padding: 5px;
    max-width: 800px;
    margin: 20px auto;
}
.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--light-bg);
    border-radius: 40px;
    padding: 0 15px;
}
.search-field i {
    color: var(--primary-blue);
}
.search-field input, .search-field select {
    width: 100%;
    padding: 12px 0;
    border: none;
    background: transparent;
    font-size: 14px;
}
.search-field select {
    cursor: pointer;
}
.hero-search button {
    border-radius: 40px;
    padding: 0 30px;
}
.hero-trust {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    font-size: 14px;
}

/* Property Cards */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}
.property-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.property-card:hover .property-image img {
    transform: scale(1.05);
}
.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--success-green);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.property-details {
    padding: 20px;
}
.property-title {
    font-size: 18px;
    margin-bottom: 8px;
}
.property-title a {
    color: var(--dark-text);
    text-decoration: none;
}
.property-location {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 12px;
}
.property-features {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}
.property-features span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Calculator Section */
.calculator-section {
    background: var(--light-bg);
    padding: 60px 0;
}
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.calculator-box {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.range-input {
    display: flex;
    align-items: center;
    gap: 15px;
}
.range-input input[type="range"] {
    flex: 1;
}
.range-input input[type="number"] {
    width: 120px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
}
.calculator-result .result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.calculator-result .result-item:last-child {
    border-bottom: none;
}
.result-item strong {
    font-size: 20px;
    color: var(--primary-blue);
}

/* Steps Section */
.steps-section {
    padding: 60px 0;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}
.step-card {
    text-align: center;
    padding: 30px;
    background: var(--light-bg);
    border-radius: 12px;
}
.step-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    color: var(--white);
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
}
.step-card h3 {
    margin-bottom: 10px;
}
.step-card p {
    color: var(--light-text);
    margin: 0;
}

/* Cities Section */
.cities-section {
    background: var(--light-bg);
    padding: 60px 0;
}
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 40px;
}
.city-card {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--white);
    height: 150px;
}
.city-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}
.city-card:hover .city-image {
    transform: scale(1.05);
}
.city-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 20px;
    text-align: center;
}
.city-info h3 {
    margin: 0;
    font-size: 18px;
}
.city-info span {
    font-size: 12px;
    opacity: 0.9;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}
.cta-wrapper {
    max-width: 600px;
    margin: 0 auto;
}
.cta-wrapper h2 {
    font-size: 36px;
    margin-bottom: 15px;
}
.cta-wrapper p {
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
    .hero-search .search-fields {
        flex-direction: column;
        background: transparent;
        gap: 10px;
    }
    .search-field {
        background: var(--white);
    }
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
    .steps-grid {
        grid-template-columns: 1fr;
    }
}
/* ========== ENHANCED NAVIGATION ========== */

.main-navigation {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

/* Desktop menu items */
#primary-menu > li {
    position: relative;
}

#primary-menu > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    color: #2c3e50;
    border-radius: 40px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Dropdown indicator (chevron) */
#primary-menu .menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    margin-left: 6px;
    transition: transform 0.3s;
}

/* Hover effect – gradient background (WishLoan style) */
#primary-menu > li > a:hover {
    background: linear-gradient(135deg, #005BAC 0%, #004080 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,91,172,0.3);
}

/* Active menu item */
#primary-menu .current-menu-item > a {
    background: linear-gradient(135deg, #005BAC 0%, #004080 100%);
    color: #fff;
}

/* Dropdown menu (sub-menu) */
#primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 16px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    border-top: 3px solid #005BAC;
}

#primary-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Sub-menu items */
#primary-menu .sub-menu li {
    margin: 0;
    position: relative;
}

#primary-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.2s;
}

#primary-menu .sub-menu a:hover {
    background: #f5f9ff;
    color: #005BAC;
    padding-left: 26px;
}

/* Optional: arrow for sub‑sub‑menus (if deeper) */
#primary-menu .sub-menu .menu-item-has-children > a::after {
    content: '\f105';
    float: right;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    margin-top: 2px;
}

/* Mobile menu (base styles already exist, but we refine) */
@media (max-width: 992px) {
    .main-navigation {
        position: static;
    }

    #primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        border-top: 1px solid #eee;
        max-height: 80vh;
        overflow-y: auto;
    }

    #primary-menu.toggled-on {
        display: flex;
    }

    #primary-menu > li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    #primary-menu > li:last-child {
        border-bottom: none;
    }

    #primary-menu > li > a {
        padding: 15px;
        justify-content: space-between;
        white-space: normal;
        border-radius: 0;
    }

    #primary-menu .menu-item-has-children > a::after {
        float: right;
        transform: rotate(0deg);
    }

    /* Dropdown on mobile: we use JavaScript to toggle, not hover */
    #primary-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        background: #fafafa;
        padding: 0;
        margin-top: 8px;
        margin-bottom: 8px;
        display: none;
    }

    #primary-menu .sub-menu.open {
        display: block;
    }

    #primary-menu .sub-menu a {
        padding: 12px 20px 12px 35px;
    }
	
	/* Improve property card hover effect */
.property-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

/* Sticky contact card on desktop */
@media (min-width: 1024px) {
    .sticky {
        position: sticky;
        top: 100px;
    }
}

 @layer components {
        .btn-primary {
            @apply bg-blue-700 text-white px-5 py-2 rounded-full font-medium hover:bg-blue-800 transition duration-200;
        }
        .btn-outline {
            @apply border border-blue-700 text-blue-700 px-5 py-2 rounded-full font-medium hover:bg-blue-50 transition duration-200;
        }
    }
}

/* ========== GLOBAL STYLES & ANIMATIONS ========== */
:root {
    --primary: #2A6F97;
    --primary-dark: #1e4a6f;
    --secondary: #FFB347;
    --secondary-dark: #e68a2e;
    --gray-light: #f9fafb;
    --gray-medium: #6c757d;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animated gradient background for hero */
.hero-gradient {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    position: relative;
    overflow: hidden;
}
.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><path fill="white" d="M20 20 L80 20 L80 80 L20 80 Z"/><circle cx="50" cy="50" r="15" fill="white"/></svg>') repeat;
    background-size: 60px 60px;
    animation: moveBackground 20s linear infinite;
}
@keyframes moveBackground {
    from { background-position: 0 0; }
    to { background-position: 100px 100px; }
}

/* Fade-in on scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover lift */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Card styles */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: var(--shadow-md);
}

/* Input focus effects */
input:focus, select:focus, textarea:focus {
    @apply outline-none ring-2 ring-blue-500 border-transparent;
    box-shadow: 0 0 0 3px rgba(42, 111, 151, 0.2);
}

/* Custom range slider (for rent calculator) */
.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    outline: none;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #2A6F97;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Button styles */
.btn-primary {
    @apply bg-blue-700 text-white px-5 py-2 rounded-full font-medium hover:bg-blue-800 transition duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2;
}
.btn-secondary {
    @apply bg-gray-200 text-gray-800 px-5 py-2 rounded-full font-medium hover:bg-gray-300 transition duration-200;
}
.btn-outline {
    @apply border border-blue-700 text-blue-700 px-5 py-2 rounded-full font-medium hover:bg-blue-50 transition duration-200;
}

/* Loading spinner */
.spinner {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: #2A6F97;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tooltip (simple) */
[data-tooltip] {
    position: relative;
    cursor: help;
}
[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    pointer-events: none;
}
[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
}

