/* Base Styles - OLX Style */
:root {
    --primary-color: #002f34;
    --secondary-color: #ffce32;
    --accent-color: #3a77ff;
    --success-color: #00a49f;
    --light-gray: #f7f8f9;
    --medium-gray: #e9ebf0;
    --dark-gray: #406367;
    --text-gray: #7c8a97;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --border-radius: 4px;
    --olx-gradient: linear-gradient(135deg, #002f34, #406367);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    overflow-x: hidden;
}

/* Header & Navigation */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

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

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

.nav-links a.active {
    color: var(--secondary-color);
}

.login-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.login-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section - OLX Style */
.properties-hero {
    height: 60vh;
    background: var(--olx-gradient),
                url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--box-shadow);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 206, 50, 0.3);
}

.btn-hero.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid var(--secondary-color);
}

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

.properties-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Property Filters - OLX Style */
.property-filters {
    background-color: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 70px;
    z-index: 100;
    border-bottom: 1px solid var(--medium-gray);
}

.filter-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    width: fit-content;
    margin: 0 auto 1.5rem auto;
    box-shadow: var(--box-shadow);
}

.filter-tab {
    background: var(--light-gray);
    color: var(--text-gray);
    border: none;
    padding: 0.8rem 2rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    border-right: 1px solid var(--medium-gray);
}

.filter-tab:last-child {
    border-right: none;
}

.filter-tab.active {
    background: var(--primary-color);
    color: white;
}

.filter-tab:hover:not(.active) {
    background: var(--medium-gray);
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
}

.filter-select {
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--light-gray);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn-search {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-search:hover {
    background: #2c5aa0;
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Properties Grid */
.properties-grid {
    padding: 4rem 0;
    background-color: var(--light-gray);
}

.properties-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.property-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

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

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

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

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

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.sale-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.rent-badge {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.video-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-badge i {
    font-size: 0.7rem;
}

.property-details {
    padding: 1.5rem;
}

.property-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.4;
}

.property-title:hover {
    color: var(--accent-color);
}

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

.property-address {
    color: #7f8c8d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-address i {
    color: var(--secondary-color);
}

.property-features {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-gray);
    font-size: 0.85rem;
    background: var(--light-gray);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
}

.feature i {
    font-size: 0.9rem;
    color: var(--accent-color);
}

.property-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
}

.posted-date {
    color: var(--text-gray);
    font-size: 0.8rem;
    font-weight: 500;
}

.property-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.btn-secondary {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    max-width: 1000px;
    width: 90%;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #7f8c8d;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3 {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-about p {
    margin-bottom: 1.5rem;
    color: #ecf0f1;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.footer-contact p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #ecf0f1;
}

.footer-contact i {
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease-out forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .properties-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .properties-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default, shown only on mobile */
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 8px;
    min-width: 60px;
}

.mobile-bottom-nav .nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-bottom-nav .nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0 8px 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 12px;
    border-radius: 12px;
    min-width: 65px;
    position: relative;
}

.mobile-bottom-nav .nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.mobile-bottom-nav .nav-item span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-bottom-nav .nav-item.active {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.mobile-bottom-nav .nav-item.active i {
    transform: scale(1.1);
    color: #007bff;
}

.mobile-bottom-nav .nav-item:hover {
    color: #007bff;
    transform: translateY(-2px);
}

.mobile-bottom-nav .nav-item:active {
    transform: translateY(0) scale(0.95);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 70px;
    }
}

@media (max-width: 768px) {
    /* Hide top navigation completely on mobile */
    .header {
        display: none;
    }
    
    /* Adjust main content to account for no header */
    .properties-main {
        margin-top: 0;
    }
    
    .floating-contact-buttons {
        position: fixed;
        left: 15px;
        bottom: 85px; /* Above mobile bottom navigation */
        flex-direction: column;
        gap: 12px;
        z-index: 1001;
    }
    
    .contact-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .nav-links {
        display: none; /* Hide nav links since header is hidden */
    }

    .mobile-menu-btn {
        display: none; /* Hide mobile menu button since header is hidden */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .property-filters {
        position: static;
    }

    .container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .property-card {
        max-width: 100%;
    }

    .property-actions {
        flex-direction: column;
    }

    .btn-secondary {
        width: 100%;
    }
}

/* Floating Contact Buttons */
.floating-contact-buttons {
    position: fixed;
    left: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.contact-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.call-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* OLX Style Property Cards */
.property-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
    border: 1px solid var(--medium-gray);
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

/* Price Blur Effect */
.property-price.blurred-price {
    filter: blur(4px);
    transition: filter 0.3s ease;
    cursor: pointer;
    position: relative;
}

.property-price.blurred-price::after {
    content: "Click to reveal price";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--text-gray);
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
}

.property-price.revealed-price {
    filter: none;
    transition: filter 0.3s ease;
}

.property-price.revealed-price::after {
    display: none;
}

.property-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 1rem 1rem 1rem;
}

.btn-enquiry {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
}

.btn-enquiry:hover {
    background: #008a86;
    transform: translateY(-1px);
}

.btn-call {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
}

.btn-call:hover {
    background: #e6b82e;
    transform: translateY(-1px);
}

/* Modal Styles */
.enquiry-modal-content,
.sell-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(58, 119, 255, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--text-gray);
    border: 1px solid var(--medium-gray);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--medium-gray);
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-hero {
        width: 100%;
        max-width: 300px;
    }
    
    .filter-tabs {
        width: 100%;
        margin: 0 0 1.5rem 0;
    }
    
    .filter-tab {
        flex: 1;
        text-align: center;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .btn-search {
        width: 100%;
        justify-content: center;
    }
}
