:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #64748b;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --success: #10b981;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --text-main: #1e293b;
    --text-light: #64748b;

    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    border: 2px solid var(--gray-300);
    background: transparent;
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

/* Header */
.main-header {
    background: linear-gradient(to bottom, var(--white), var(--gray-50));
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-100);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    transition: var(--transition);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.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);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
}

/* Hero Section */
.hero {
    height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-bottom: 4rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* Search Box */
.search-box {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.search-field {
    flex: 1;
    padding: 0.5rem;
}

.search-field select,
.search-field input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    outline: none;
}

/* Listings Grid */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2rem;
    text-align: center;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.listing-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.listing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-image {
    height: 250px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    position: relative;
    overflow: hidden;
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.listing-card:hover .card-image img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
}

.card-badge.rent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.card-content {
    padding: 1.75rem;
}

.card-price {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-location {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-features {
    display: flex;
    gap: 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px solid var(--gray-100);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.card-content .btn {
    display: block;
    width: 100%;
    margin-top: 1.25rem;
    text-align: center;
    box-sizing: border-box;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
}

/* Footer */
.main-footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Detail Page */
.detail-header {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.detail-title h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.image-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 250px 250px;
    gap: 1rem;
    margin-bottom: 3rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.detail-price {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.main-image {
    grid-row: 1 / -1;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.property-info p {
    margin-bottom: 1.5rem;
}

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 90vh;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--gray-300);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 1rem;
    user-select: none;
    transition: color 0.2s;
}

.lightbox-nav:hover {
    color: var(--gray-300);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Responsive Media Queries */
/* Tablet (Larger than mobile, smaller than desktop) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .nav-wrapper {
        gap: 1rem;
    }

    .main-nav ul {
        gap: 1rem;
    }

    .main-nav a {
        font-size: 0.9rem;
    }

    .header-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .logo img {
        height: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* Typography */
    .hero-content h1 {
        font-size: 2rem !important;
    }

    .hero-content p {
        font-size: 1rem !important;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: flex !important;
    }

    .nav-wrapper {
        position: relative;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .main-nav.active {
        max-height: 400px;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    .main-nav li {
        border-bottom: 1px solid var(--gray-100);
    }

    .main-nav a {
        display: block;
        padding: 1rem 1.5rem;
    }

    .header-actions {
        display: none;
    }

    /* Hero */
    .hero {
        height: auto !important;
        padding: 6rem 1rem 2rem 1rem;
        min-height: 400px;
    }

    .search-box {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Listings */
    .listings-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Detail page */
    .detail-title h1 {
        font-size: 1.75rem !important;
    }

    .image-gallery {
        grid-template-columns: 1fr !important;
        grid-template-rows: 250px auto auto !important;
    }

    .main-image {
        grid-row: 1 !important;
    }

    .detail-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .info-card {
        position: static !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    /* WhatsApp Button */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Typography */
    .hero-content h1 {
        font-size: 1.5rem !important;
    }

    .card-title {
        font-size: 1.1rem !important;
    }

    .card-price {
        font-size: 1.25rem !important;
    }

    /* Buttons */
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
}