:root {
    --primary: #C8A96E;
    --primary-dark: #A8894E;
    --dark: #1a1a2e;
    --dark-2: #16213e;
    --light: #f8f5f0;
    --text-muted: #6c757d;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Playfair Display', serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--light);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Utilities */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.btn-primary { 
    background-color: var(--primary); 
    border-color: var(--primary); 
    color: white;
}
.btn-primary:hover { 
    background-color: var(--primary-dark); 
    border-color: var(--primary-dark); 
}
.bg-dark-custom { background-color: var(--dark) !important; }
.text-muted-custom { color: #a1a1aa !important; }

/* Navbar */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
}
.navbar-brand {
    font-size: 1.5rem;
    color: white !important;
}
.navbar-transparent {
    background-color: transparent;
}
.nav-scrolled {
    background-color: var(--dark);
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    color: var(--primary) !important;
}
.phone-link:hover {
    color: var(--primary) !important;
}
.navbar-toggler {
    border-color: rgba(255,255,255,0.5);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Navbar adjustments */
@media (max-width: 991px) {
    .navbar-transparent {
        background-color: var(--dark);
    }
    .navbar-collapse {
        background-color: var(--dark);
        padding: 1rem;
        border-radius: var(--radius);
        margin-top: 1rem;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    color: white;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(26, 26, 46, 0.7), rgba(26, 26, 46, 0.4));
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
}
.hero .stars {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Section Padding */
.section-padding {
    padding: 80px 0;
}
.section-title {
    margin-bottom: 3rem;
    text-align: center;
}
.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
}
.section-title .divider {
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    margin: 15px auto;
}

/* Apartment Cards */
.apartment-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
}
.apartment-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.apartment-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
}
.apartment-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.apartment-card:hover .apartment-img-wrapper img {
    transform: scale(1.05);
}
.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    z-index: 2;
}
.bg-available { background-color: #28a745; }
.bg-booked { background-color: #dc3545; }
.bg-maintenance { background-color: #ffc107; color: #000; }
.apartment-price {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
}
.apartment-icons {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Booking Form */
.booking-widget {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}
.price-summary-box {
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 15px;
    background-color: rgba(200, 169, 110, 0.05);
}
.flatpickr-input {
    background-color: white !important;
}

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

/* Single Page Gallery */
.gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    height: 400px;
    margin-bottom: 10px;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}
.gallery-thumb {
    width: 100px;
    height: 70px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    object-fit: cover;
}
.gallery-thumb.active, .gallery-thumb:hover {
    opacity: 1;
}

/* Footer */
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    margin-bottom: 8px;
}
.footer-links a:hover {
    color: var(--primary);
}
.social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: white;
    transition: all 0.3s;
}
.social-links a:hover {
    background-color: var(--primary);
    color: white;
}

/* Scroll to top */
#scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    display: none;
    z-index: 99;
}

/* --- Admin Layout --- */
.admin-body {
    background-color: #f4f6f9;
}
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: var(--dark);
    color: white;
    z-index: 1040;
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.main-content {
    margin-left: 260px;
    padding: 20px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-nav {
    padding: 20px 0;
    list-style: none;
    margin: 0;
}
.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
}
.sidebar-nav li a:hover, .sidebar-nav li a.active {
    color: var(--primary);
    background-color: rgba(200, 169, 110, 0.1);
    border-left: 3px solid var(--primary);
}
.sidebar-nav li a i {
    margin-right: 15px;
    font-size: 1.1rem;
}
.topbar {
    background: white;
    padding: 15px 20px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary);
}

/* Admin Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .sidebar, .topbar, .btn, #scroll-top {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .container {
        width: 100% !important;
        max-width: 100% !important;
    }
    body {
        background-color: white;
    }
    .apartment-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
