/* ================================================
   LIST-IT - Modern Property Platform CSS
   Targeting Zambian Market
   ================================================ */

:root {
    /* Zambian-inspired color palette */
    --primary: #1a5f3f;
    --primary-dark: #134730;
    --accent: #ff6b35;
    --accent-light: #ff8c6b;
    --gold: #d4af37;
    --teal: #008b8b;
    
    /* Neutral colors */
    --dark: #1a1a1a;
    --dark-soft: #2d2d2d;
    --gray: #6c757d;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================
   RESET & BASE STYLES
   ================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ================================================
   NAVIGATION
   ================================================ */

.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--dark);
    font-weight: 700;
}

.logo .accent {
    color: var(--primary);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

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

/* User Menu Styles */
.user-menu-wrapper {
    position: relative;
}

.user-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
}

.user-avatar-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.user-initials {
    color: white;
}

.user-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 250px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.user-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.user-menu-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.user-menu-email {
    font-size: 0.85rem;
    opacity: 0.9;
}

.user-menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #1a1a1a !important;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

/* Ensure text is always visible */
.user-menu-item span {
    color: inherit !important;
}

.user-menu-item:hover span {
    color: inherit !important;
}

/* Force text visibility for menu items */
.user-menu-item {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent child elements from blocking clicks but allow text selection */
.user-menu-item * {
    pointer-events: auto;
    user-select: text;
}

.user-menu-item:hover {
    background: #f8f9fa;
    color: var(--primary) !important;
}

.user-menu-item:visited,
.user-menu-item:active,
.user-menu-item:link {
    color: #1a1a1a !important;
}

.user-menu-item.logout-item {
    color: #dc3545 !important;
}

.user-menu-item.logout-item:visited,
.user-menu-item.logout-item:active,
.user-menu-item.logout-item:link {
    color: #dc3545 !important;
}

.user-menu-item.logout-item:hover {
    background: #fff5f5;
    color: #c82333;
}

/* Admin User Menu */
.admin-user-menu {
    margin-left: auto;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: var(--transition);
}

.user-avatar-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

.user-profile-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    z-index: 1001;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.user-profile-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--luxury-primary, var(--primary)), var(--luxury-primary-dark, var(--primary-dark)));
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.user-email {
    font-size: 0.85rem;
    opacity: 0.9;
}

.profile-menu-item {
    display: block;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.profile-menu-item:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.profile-menu-item.logout-btn {
    color: #dc3545;
}

.profile-menu-item.logout-btn:hover {
    background: #fff5f5;
    color: #c82333;
}

.profile-menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ================================================
   BUTTONS
   ================================================ */

.btn-primary {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-full {
    width: 100%;
    margin-top: var(--spacing-sm);
}

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

.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    margin-top: 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.2);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    max-width: 1600px;
    padding: var(--spacing-xl) var(--spacing-md);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    animation: fadeInUp 1s ease-out;
}

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

/* ================================================
   SEARCH CONTAINER
   ================================================ */

.search-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInUp 1.2s ease-out;
    max-width: 1400px;
    margin: 0 auto;
}

.search-tabs {
    display: flex;
    background: var(--light-gray);
}

.tab-btn {
    flex: 1;
    padding: var(--spacing-md);
    background: transparent;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    background: var(--white);
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.search-form {
    padding: var(--spacing-lg);
}

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

.search-field label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.search-field select,
.search-field input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-field select:focus,
.search-field input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

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

/* ================================================
   FEATURES SECTION
   ================================================ */

.features {
    padding: var(--spacing-xl) 0;
    background: var(--light-gray);
}

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

.feature-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.feature-card h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.8;
}

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

.properties {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark);
}

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

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

.property-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

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

.property-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--light-gray);
}

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

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

.property-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--accent);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.property-info {
    padding: var(--spacing-md);
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

.property-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--spacing-xs);
}

.property-location {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-details {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--gray);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--light-gray);
}

.property-detail {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ================================================
   MODAL
   ================================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: var(--spacing-xl);
    position: relative;
    animation: slideUp 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

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

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

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.close:hover {
    color: var(--dark);
}

.modal-content h2 {
    margin-bottom: var(--spacing-lg);
    color: var(--dark);
}

/* ================================================
   FORMS
   ================================================ */

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

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

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: var(--font-main);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-footer {
    text-align: center;
    margin-top: var(--spacing-md);
    color: var(--gray);
}

.form-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* ================================================
   LOADING SPINNER
   ================================================ */

.loading-spinner {
    display: flex;
    justify-content: center;
    padding: var(--spacing-xl);
}

.spinner {
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.footer {
    background: var(--dark);
    color: var(--white);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: var(--spacing-md);
}

.footer-section h3 .accent {
    color: var(--accent);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--light-gray);
}

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

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
}




