/* --- Variables & Typography --- */
:root {
    --primary-color: #4338ca; /* Indigo */
    --primary-dark: #3730a3;
    --accent-color: #ff6b6b;  /* Coral */
    --text-dark: #111827;     /* Almost Black */
    --text-muted: #6b7280;    /* Grey */
    --bg-light: #f9fafb;      /* Very light grey */
    
    /* Font Settings */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- GLOBAL FIXES (Prevents Layout Breaking) --- */
body {
    font-family: var(--font-body);
    color: var(--text-dark);
    font-size: 16px; 
    line-height: 1.6;
    background-color: #ffffff;
    overflow-x: hidden; /* Prevents horizontal scroll */
    width: 100%;
}

/* IMPORTANT: This prevents images from blasting out of the screen */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    letter-spacing: -0.5px;
}
h1 { font-weight: 800; }
h2 { font-weight: 700; }

a { text-decoration: none; color: inherit; transition: 0.3s ease; }

/* --- Navbar --- */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.bannertop, .txtClr, .navbar-brand i { color: var(--primary-color) !important; }

.txthover { transition: all 0.3s ease; }
.txthover:hover { color: var(--primary-color) !important; }

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    font-family: var(--font-heading);
    color: var(--text-dark);
    letter-spacing: -1px;
}
.navbar-brand span { color: var(--text-dark); }

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: #4b5563 !important;
    margin: 0 8px;
}
.nav-link:hover, .nav-link.active { color: var(--primary-color) !important; }

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 12px;
}
.dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 500;
    color: var(--text-dark);
}
.dropdown-item:hover {
    background-color: #eef2ff;
    color: var(--primary-color);
}

/* --- Buttons --- */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    color: white !important;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.25);
}
.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 56, 202, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- Hero Section --- */
.hero-wrapper {
    position: relative;
    padding: 180px 0 120px 0;
    background: url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 0.85), rgba(17, 24, 39, 0.65));
}
.hero-content { position: relative; z-index: 2; }

.display-title { font-size: 3.5rem; line-height: 1.2; }
.lead-text { font-size: 1.25rem; font-weight: 300; color: rgba(255,255,255,0.9); }
.text-gradient-gold {
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Search Box */
.search-box-modern {
    background: white;
    border-radius: 16px;
    padding: 8px;
    max-width: 950px;
    margin: 40px auto 0;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.small-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}
.form-select {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
}
.border-end-md { border-right: 1px solid #f3f4f6; }

/* --- Sections --- */
.section-padding { padding: 50px 0; }
.bg-light-gray { background-color: var(--bg-light); }

.city-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.city-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.city-card:hover img { transform: scale(1.08); }
.city-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 30px;
    color: white;
}

/* --- Listing Cards (UPDATED FOR STRUCTURE) --- */
.filter-tabs .tab-btn {
    background: transparent;
    border: none;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}
.filter-tabs .tab-btn.active, .filter-tabs .tab-btn:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* PROPERTY CARD - FIXED STRUCTURE */
.property-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #f3f4f6;
    transition: 0.4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    
    /* Flex Properties to fix height issues */
    display: flex;
    flex-direction: column;
    height: 100%; 
    width: 100%;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.img-wrapper {
    height: 220px; /* Fixed height so images don't break layout */
    width: 100%;
    position: relative;
    background-color: #eee;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fits box perfectly */
    object-position: center;
}

/* New Class for Badges over Image */
.card-badges-top {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
    pointer-events: none;
}

.badge {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}
.bg-blue { background-color: #3b82f6; color: white; }
.bg-pink { background-color: #ec4899; color: white; }
.bg-purple { background-color: #8b5cf6; color: white; }

/* Home Page Price Tag (Absolute) */
.price-tag {
    position: absolute;
    bottom: 20px; right: 20px;
    background: rgba(255,255,255,0.95);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Listing Page Details */
.card-details {
    padding: 20px;
    flex-grow: 1; /* Pushes button to bottom */
    display: flex;
    flex-direction: column;
}

.card-details h5 { font-size: 1.1rem; font-weight: 700; }

.amenities-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #6b7280;
    margin: 15px 0;
    padding-top: 10px;
    border-top: 1px solid #f9f9f9;
}
.amenities-row span { display: flex; align-items: center; gap: 5px; }
.amenities-row span i { color: var(--primary-color); }

/* --- About & Footer Styles remain same --- */
.image-stack-modern { position: relative; margin-top: 20px; }
.exp-badge {
    position: absolute;
    bottom: -30px; right: -30px;
    background: var(--primary-color);
    color: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

footer { font-size: 0.9rem; }
.social-links a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; color: white; margin-right: 12px;
    transition: 0.3s;
}
.social-links a:hover { background: var(--primary-color); transform: translateY(-3px); }

/* --- Other Utilities --- */
.icon-box-lg {
    width: 80px; height: 80px;
    background: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: 0.3s;
}
.feature-item:hover .icon-box-lg {
    transform: translateY(-5px);
    background: var(--primary-color);
    color: white;
}
.feature-item h5 { font-weight: 700; margin-bottom: 10px; }
.feature-item p { font-size: 0.9rem; color: #6b7280; }

.composition-wrapper { position: relative; height: 400px; }
.comp-img-1 {
    position: absolute; top: 0; left: 0; width: 75%; height: 80%;
    object-fit: cover; border-radius: 20px; z-index: 1;
}
.comp-img-2 {
    position: absolute; bottom: 0; right: 0; width: 60%; height: 60%;
    object-fit: cover; border-radius: 20px; z-index: 2;
    border: 8px solid white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.about-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    background: url('https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    margin-top: 70px;
}

.about-img-group { position: relative; }
.about-img-group .img-main { width: 100%; transition: transform 0.3s; }
.about-img-group:hover .img-main { transform: scale(1.02); }

.floating-box {
    position: absolute;
    bottom: -30px; right: -30px;
    min-width: 200px;
    border-left: 5px solid var(--primary-color);
}

.value-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f3f4f6;
}
.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.bg-blue-light { background-color: #e0e7ff; }
.bg-pink-light { background-color: #fce7f3; }
.bg-purple-light { background-color: #f3e8ff; }

.team-img-wrapper img {
    width: 150px; height: 150px;
    object-fit: cover;
    border: 4px solid white;
    transition: 0.3s;
    margin: auto;
}
.team-card:hover .team-img-wrapper img {
    transform: scale(1.1);
    border-color: var(--primary-color);
}
.social-mini a { font-size: 1.1rem; transition: 0.2s; }
.social-mini a:hover { color: var(--primary-color) !important; }

.border-primary{ border-color: #4338ca !important; }

/* Gallery & Sidebar */
.gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 200px 200px;
    gap: 10px;
    border-radius: 20px;
    overflow: hidden;
}
.gallery-item { position: relative; width: 100%; height: 100%; }
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    cursor: pointer;
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item.main { grid-column: 1 / 2; grid-row: 1 / 3; }

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    pointer-events: none;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 250px 100px;
    }
    .gallery-item.main { grid-column: 1 / 3; grid-row: 1 / 2; }
    .gallery-item:nth-child(3), .gallery-item:nth-child(4) { display: none; }
    .border-end-md { border-right: none; border-bottom: 1px solid #f3f4f6; }
    .display-title { font-size: 2.5rem; }
    .hero-wrapper { padding: 140px 0 80px 0; }
    .search-box-modern { margin-left: 15px; margin-right: 15px; }
    .floating-box { position: relative; bottom: 0; right: 0; margin-top: -20px; margin-left: 20px; }
    .about-hero { height: 40vh; }
}

.icon-square {
    width: 40px; height: 40px;
    background-color: #f3f4f6;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.sticky-sidebar {
    position: sticky;
    top: 100px;
    z-index: 10;
}

.gallery-item a { display: block; width: 100%; height: 100%; cursor: zoom-in; }

/* Filter & Listings */
@media (min-width: 992px) {
    .sidebar-wrapper { position: sticky; top: 100px; }
}
.filter-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.btn-outline-pink { color: #ec4899; border-color: #ec4899 !important; }
.btn-outline-pink:hover, .btn-check:checked + .btn-outline-pink {
    background-color: #ec4899 !important;
    color: white !important;
}

.form-control:focus { box-shadow: unset !important; }
input { border-color: #dee2e6 !important; }

.page-link {
    color: var(--primary-color);
    border-radius: 8px;
    margin: 0 5px;
    border: none;
    font-weight: 600;
}
.page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
}
.page-link:hover { background-color: #e0e7ff; color: var(--primary-color); }

.page-link:focus { box-shadow: none; }


/* --- DASHBOARD STYLES (User & Admin) --- */

/* Sidebar Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: #f3f4f6;
}

.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-brand {
    padding: 20px;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-menu {
    padding: 20px 10px;
    flex-grow: 1;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 5px;
    transition: 0.3s;
}

.menu-link i { width: 25px; font-size: 1.1rem; }

.menu-link:hover, .menu-link.active {
    background-color: #eef2ff;
    color: var(--primary-color);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: 260px; /* Width of sidebar */
    padding: 30px;
}

/* Dashboard Stats Cards */
.stats-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stats-icon {
    width: 60px; height: 60px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}

/* Table Styles */
.custom-table thead th {
    background-color: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 15px;
    border-bottom: 2px solid #e5e7eb;
}
.custom-table tbody td {
    padding: 15px;
    vertical-align: middle;
    color: #374151;
    font-size: 0.95rem;
}

/* Mobile Sidebar Toggle */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); transition: 0.3s; }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
}