/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --white: #FFFFFF;
    --orange: #FF6B00;
    --yellow: #FFD700;
    --blue-dark: #0A192F;
    --text-dark: #333333;
    --text-muted: #666666;
    --light-gray: #F5F5F5;
    --border-radius: 8px;
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --swiper-theme-color: #FF6B00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

/* Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #E65A00;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.btn-outline:hover {
    background-color: var(--orange);
    color: var(--white);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition);
}

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

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.card-price {
    color: var(--orange);
    font-size: 1.5rem;
    font-weight: 800;
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Navbar Refined */
.navbar {
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--orange);
    letter-spacing: -1px;
}

.logo span {
    color: var(--text-dark);
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.nav-link:hover {
    color: var(--orange);
}

/* Hero Refined */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.95;
}

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

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

/* Search Container Refined */
.search-container {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-top: -60px;
    position: relative;
    z-index: 100;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    width: 100%;
}

.search-form .form-group {
    flex: 1;
    min-width: 0;
}

.search-form .form-group.btn-group {
    flex: 0 0 auto;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    height: 44px;
}

/* Swiper Custom */
.swiper {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile Page */
.profile-header {
    background: var(--white);
    margin-bottom: 80px;
}

.banner {
    height: 300px;
    width: 100%;
}

.profile-info-container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-top: 0;
    padding-top: 15px;
    padding-bottom: 20px;
}

.profile-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 8px solid var(--white);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-medium);
    margin-top: -100px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details {
    padding-bottom: 20px;
}

.profile-details h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.profile-actions {
    margin-top: 12px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: #fff3e6;
    color: var(--orange);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .profile-info-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 0;
    }

    .profile-avatar {
        width: 150px;
        height: 150px;
        margin-top: -75px;
    }

    .profile-details h1 {
        font-size: 1.8rem;
    }
}

.form-control:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }

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

@media (max-width: 768px) {
    .container {
        padding: 0 25px !important;
    }

    /* More aggressive padding */
    .navbar {
        height: 70px;
    }

    .menu-toggle {
        display: block;
    }

    .card {
        margin-bottom: 10px;
        border: 1px solid #eee;
        box-shadow: none;
    }

    .card-img {
        height: 140px;
    }

    .card-body {
        padding: 8px;
    }

    .card-title {
        font-size: 0.85rem;
        margin-bottom: 5px;
        white-space: normal;
        /* Allow wrapping */
        overflow: visible;
        text-overflow: clip;
        font-weight: 700;
        line-height: 1.2;
    }

    .card-price {
        font-size: 1rem;
        margin-bottom: 4px;
        color: var(--orange);
    }

    .card-body p {
        font-size: 0.75rem;
        margin-bottom: 5px !important;
    }

    .card-body .secondary-info {
        display: none !important;
    }

    /* Hide Hab/Baños on mobile grid */
    .btn-outline {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .property-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 40px;
        /* Space between filter and cards */
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        gap: 20px;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        height: 70vh;
    }

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

    .hero-content p {
        font-size: 1.1rem;
    }

    .search-container {
        margin-top: 100px;
        padding: 25px;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .main-img {
        height: 350px;
    }

    .side-imgs {
        display: none;
    }

    /* Hide extra images on very small mobile for speed, or stack them */

    .property-info {
        grid-template-columns: 1fr;
    }

    .contact-card {
        position: static;
        margin-top: 30px;
    }

    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .search-container {
        margin-top: -40px;
        padding: 15px;
        width: 95%;
    }

    .mobile-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 12px;
        background: var(--blue-dark);
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 10px;
    }

    .search-form {
        display: none;
        flex-direction: column;
        gap: 15px;
    }

    .search-form.active {
        display: flex;
    }

    .search-form .form-group {
        width: 100%;
    }

    .search-form .btn-primary {
        width: 100%;
        margin-top: 10px;
    }
}

@media (min-width: 769px) {
    .mobile-filter-toggle {
        display: none;
    }
}

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

    .section-padding {
        padding: 40px 0;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 450px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Share Button */
.btn-share {
    background: var(--white);
    border: 1px solid #eee;
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.btn-share:hover {
    color: var(--orange);
}

/* Autocomplete */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    z-index: 1001;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-medium);
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
}

.autocomplete-item:hover {
    background: var(--light-gray);
    color: var(--orange);
}