:root {
    --primary-dark: #0a2540;
    --primary: #153e63;
    --primary-light: #e6f0f9;
    --gold: #c5a059;
    --gold-gradient: linear-gradient(135deg, #e6c88b 0%, #c5a059 100%);
    --bg-body: #f8fafc;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #4a5568;
    background-color: var(--bg-body);
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* --- Colors --- */
.text-primary-dark { color: var(--primary-dark) !important; }
.bg-primary-dark { background-color: var(--primary-dark) !important; }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.text-gold { color: var(--gold) !important; }
.bg-gold { background-color: var(--gold) !important; }

.text-gold-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    transition: all 0.3s ease;
}
.btn-primary:hover, .btn-primary:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-gold {
    background: var(--gold);
    color: white;
    border: none;
    transition: all 0.3s ease;
}
.btn-gold:hover {
    background: #b08d4b;
    color: white;
}

.btn-outline-gold {
    color: var(--gold);
    border-color: var(--gold);
    background: transparent;
}
.btn-outline-gold:hover {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
}

/* --- Floating Background Shapes --- */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(60px);
    will-change: transform;
    animation: floatBounce 10s ease-in-out infinite alternate;
}

.shape-1 {
    top: -10%; left: -10%; width: 60vh; height: 60vh;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
}
.shape-2 {
    bottom: 10%; right: -10%; width: 50vh; height: 50vh;
    background: radial-gradient(circle, rgba(21, 62, 99, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
    animation-delay: 2s;
}
.shape-3 {
    top: 40%; left: 40%; width: 40vh; height: 40vh;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    animation-delay: 5s;
}

@keyframes floatBounce {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- Glassmorphism --- */
.glass-effect {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-effect-sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--primary-dark);
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100dvh;
    background: linear-gradient(rgba(10,37,64,0.5), rgba(10,37,64,0.5)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?q=80&w=1600&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

@media (min-width: 992px) {
    .hero-section {
        background-attachment: fixed;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 37, 64, 0.5) 0%, rgba(10, 37, 64, 0.5) 100%);
    z-index: 1;
}

/* --- Hover Effects --- */
.hover-scale {
    transition: transform 0.3s ease;
}
.hover-scale:hover {
    transform: translateY(-5px);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.property-card-link {
    display: block;
}
.property-card-link:hover .glass-card {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.property-link:hover .hover-scale {
    transform: scale(1.02);
}

/* --- Property Cards --- */
.property-img {
    height: 200px;
    object-fit: cover;
}

/* --- Icon Circles --- */
.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-circle i {
    width: 32px;
    height: 32px;
}

.icon-sm {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-sm i {
    width: 18px;
    height: 18px;
}

/* --- Step Numbers --- */
.step-number {
    width: 60px;
    height: 60px;
    font-size: 24px;
    font-weight: bold;
}

/* --- Utilities --- */
.section-padding { padding-top: 4rem; padding-bottom: 4rem; }
.text-white-80 { color: rgba(255, 255, 255, 0.8); }
.text-white-50 { color: rgba(255, 255, 255, 0.5); }
.bg-white-10 { background-color: rgba(255, 255, 255, 0.2); color: white; }
.bg-gradient-dark {
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.hover-text-primary:hover {
    color: var(--primary) !important;
}

/* Fix inputs on iOS from zooming */
input, select, textarea { font-size: 16px !important; }

/* Scrollbar Hiding */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Infinite Scroll Animation */
.animate-scroll {
    animation: scroll 20s linear infinite;
    white-space: nowrap;
    width: max-content;
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .display-3, .display-5, .display-4 {
        font-size: 2rem;
    }
    .hero-title {
        font-size: 2.25rem;
    }
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

.img-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}
.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Utilities --- */
.section-padding { padding-top: 4rem; padding-bottom: 4rem; }
.text-white-80 { color: rgba(255, 255, 255, 0.8); }
.text-white-50 { color: rgba(255, 255, 255, 0.5); }
.bg-white-10 { background-color: rgba(255, 255, 255, 0.2); color: white; }
/* Fix inputs on iOS from zooming */
input, select, textarea { font-size: 16px !important; }

/* Scrollbar Hiding */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Infinite Scroll Animation */
.animate-scroll {
    animation: scroll 20s linear infinite;
    white-space: nowrap;
    width: max-content;
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Modal Responsiveness --- */
.modal-img-container {
    min-height: 250px;
}
@media (min-width: 992px) {
    .modal-img-container { min-height: 100%; }
}

/* --- Media Queries for Responsive Typography --- */
@media (max-width: 768px) {
    .display-3, .display-5 {
        font-size: 2rem; /* Tame the huge fonts on mobile */
    }
    .hero-title {
        font-size: 2.25rem;
    }
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}
/* ===== HERO SECTION FIX ===== */
.hero-section-sm {
    min-height: 60vh;
    background: linear-gradient(rgba(10,37,64,0.8), rgba(10,37,64,0.7)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?q=80&w=1600&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 76px; /* Height of fixed navbar */
}

.hero-section-sm .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 37, 64, 0.8) 0%, rgba(10, 37, 64, 0.6) 100%);
    z-index: 1;
}

/* Fix for all sections to account for fixed navbar */
.section-padding {
    padding-top: 6rem; /* Increased from 4rem */
    padding-bottom: 4rem;
}

/* Specific adjustment for dashboard and other pages with top padding */
.pt-6 {
    padding-top: 8rem !important;
}

/* ===== BUTTON STYLING FIXES ===== */
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 62, 99, 0.2);
}

.btn-outline-primary:active {
    transform: translateY(0);
}

.btn-outline-primary.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Button group and dropdown fixes */
.btn-check:checked + .btn-outline-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-check:focus + .btn-outline-primary,
.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(21, 62, 99, 0.25);
}

/* ===== FORM STYLING ENHANCEMENTS ===== */
.form-control,
.form-select {
    border: 1px solid rgba(10, 37, 64, 0.1);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(21, 62, 99, 0.1);
    transform: translateY(-1px);
}

.form-control.bg-light:focus,
.form-select.bg-light:focus {
    background-color: white !important;
}

/* Form range styling */
.form-range:focus {
    box-shadow: 0 0 0 0.25rem rgba(21, 62, 99, 0.1);
}

.form-range::-webkit-slider-thumb {
    background-color: var(--primary);
    border: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.form-range::-moz-range-thumb {
    background-color: var(--primary);
    border: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Form check styling */
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(21, 62, 99, 0.25);
}

/* ===== IMAGE UPLOAD BOX ===== */
.image-upload-box {
    border: 2px dashed var(--primary);
    background: rgba(21, 62, 99, 0.05);
    transition: all 0.3s ease;
    min-height: 200px;
    cursor: pointer;
}

.image-upload-box:hover {
    border-color: var(--primary-dark);
    background: rgba(21, 62, 99, 0.1);
    transform: translateY(-3px);
}

.image-upload-box.border-dashed {
    border-style: dashed;
}

/* ===== TABLE STYLING ===== */
.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(10, 37, 64, 0.05);
    --bs-table-hover-bg: rgba(10, 37, 64, 0.1);
}

.table-hover tbody tr:hover {
    background-color: var(--bs-table-hover-bg);
    transform: translateX(5px);
    transition: all 0.3s ease;
}

.table thead th {
    border-bottom: 2px solid var(--primary);
    font-weight: 700;
    color: var(--primary-dark);
}

/* ===== DASHBOARD SPECIFIC STYLES ===== */
.step-number {
    width: 60px;
    height: 60px;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

/* Progress bar styling */
.progress {
    background-color: rgba(10, 37, 64, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: var(--gold-gradient);
    border-radius: 10px;
}

/* Alert styling */
.alert-primary {
    background-color: rgba(21, 62, 99, 0.1);
    border-color: rgba(21, 62, 99, 0.2);
    color: var(--primary-dark);
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.2);
    color: #055160;
}

/* ===== BREADCRUMB STYLING ===== */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--gold);
}

.breadcrumb-item.active {
    color: var(--primary-dark);
    font-weight: 600;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== CAROUSEL STYLING ===== */
.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 0;
}

.carousel-indicators .active {
    background-color: var(--gold);
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

/* ===== DROPDOWN STYLING ===== */
.dropdown-menu {
    border: 1px solid rgba(10, 37, 64, 0.1);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin: 0.125rem 0.5rem;
    width: auto;
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.dropdown-divider {
    border-color: rgba(10, 37, 64, 0.1);
}

/* ===== BADGE STYLING ===== */
.badge {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background-color: rgba(16, 185, 129, 0.2) !important;
    color: #065f46;
}

.badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #92400e;
}

.badge.bg-primary {
    background-color: rgba(21, 62, 99, 0.2) !important;
    color: var(--primary-dark);
}

/* ===== PAGINATION STYLING ===== */
.pagination .page-link {
    border: 0;
    color: var(--primary);
    transition: all 0.3s ease;
    background: transparent;
}

.pagination .page-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background: transparent;
}

/* ===== INPUT GROUP STYLING ===== */
.input-group-text {
    background-color: rgba(10, 37, 64, 0.1);
    border: 1px solid rgba(10, 37, 64, 0.1);
    color: var(--primary-dark);
}

.input-group .form-control:focus {
    z-index: 3;
}

/* ===== USER PROFILE DROPDOWN ===== */
.navbar .dropdown-toggle::after {
    margin-left: 0.5rem;
}

.navbar .dropdown-menu {
    min-width: 200px;
}

/* ===== STICKY SIDEBAR ===== */
.sticky-top {
    position: sticky;
    top: 100px; /* Account for navbar */
    z-index: 1;
}

/* ===== MEDIA QUERIES FOR RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
    .hero-section-sm {
        min-height: 40vh;
        margin-top: 70px;
    }
    
    .section-padding {
        padding-top: 5rem;
        padding-bottom: 3rem;
    }
    
    .pt-6 {
        padding-top: 7rem !important;
    }
    
    .sticky-top {
        position: static;
        top: auto;
    }
    
    /* Fix for mobile menu offcanvas */
    .offcanvas-end {
        width: 300px;
    }
}

@media (max-width: 576px) {
    .hero-section-sm {
        min-height: 35vh;
    }
    
    .display-6 {
        font-size: 2rem;
    }
    
    /* Fix for small screen form elements */
    .form-control,
    .form-select {
        font-size: 16px !important; /* Prevent iOS zoom */
    }
}

/* ===== ANIMATION FOR FORM VALIDATION ===== */
.was-validated .form-control:valid,
.was-validated .form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.was-validated .form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* ===== LOADING STATE FOR BUTTONS ===== */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-spinner 0.8s linear infinite;
}

@keyframes button-spinner {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 37, 64, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .section-padding {
        padding: 0 !important;
    }
    
    .glass-card {
        box-shadow: none !important;
        background: transparent !important;
        border: 1px solid #ddd !important;
    }
}