:root {
    --bg: #FAFBFC;
    --fg: #1E293B;
    --muted: #64748B;
    --accent: #D99A1B;
    --primary: #03256C;
    --card: #FFFFFF;
    --border: #E2E8F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Page */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #03256C;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D99A1B;
}

/* Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
}

/* ============================================ */
/* SIDEBAR SCROLLING - WORKS ON ALL DASHBOARD PAGES */
/* ============================================ */
.sidebar {
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.sidebar-closed {
    transform: translateX(-100%);
}

@media (min-width: 1024px) {
    .sidebar-closed {
        transform: translateX(0);
    }
}

/* Webkit browsers (Chrome, Safari, Edge) */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: #021A4A;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #D99A1B;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #C88714;
}

/* Firefox scrollbar styling */
.sidebar {
    scrollbar-color: #D99A1B #021A4A;
}

/* ============================================ */
/* SCROLL TO TOP BUTTON */
/* ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, #021A4A 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(3, 37, 108, 0.3);
    border: none;
    font-size: 1.25rem;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, var(--accent) 0%, #C88714 100%);
    box-shadow: 0 8px 25px rgba(217, 154, 27, 0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* ============================================ */
/* MODAL & OVERLAY STYLES */
/* ============================================ */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

/* Scroll within modal */
.modal-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* ============================================ */
/* MULTI-STEP FORM STYLES */
/* ============================================ */
.step {
    display: none;
    animation: fadeIn 0.35s ease-in-out;
}

.step.active-step {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-circle {
    transition: all 0.3s ease;
    cursor: default;
}

.step-circle.active {
    background-color: #D99A1B;
    border-color: #D99A1B;
    color: white;
    transform: scale(1.05);
}

.step-circle.completed {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.step-line {
    transition: background-color 0.3s ease;
}

.step-line.completed {
    background-color: #10b981;
}

/* ============================================ */
/* FORM ELEMENTS STYLES */
/* ============================================ */
.form-container {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: var(--card);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 154, 27, 0.2);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #D99A1B;
    box-shadow: 0 0 0 2px rgba(217, 154, 27, 0.2);
    outline: none;
}

/* File Upload Label */
.file-upload-label {
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-label:hover {
    background-color: #fef3c7;
    border-color: #D99A1B;
}

/* ============================================ */
/* BACKGROUND PATTERNS */
/* ============================================ */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D99A1B' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.pattern-bg {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2303256C' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================ */
/* HERO & BACKGROUNDS */
/* ============================================ */
.hero-bg {
    background: linear-gradient(135deg, #03256C 0%, #021A4A 50%, #010D26 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(217, 154, 27, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(217, 154, 27, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.grid-pattern {
    background-image: linear-gradient(rgba(217, 154, 27, 0.05) 1px, transparent 1px),
                        linear-gradient(90deg, rgba(217, 154, 27, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.float-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ============================================ */
/* REVEAL ANIMATION */
/* ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

.reveal-delay-5 {
    transition-delay: 0.5s;
}

/* ============================================ */
/* COMPONENT CARDS */
/* ============================================ */
.property-card {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 24px rgba(3, 37, 108, 0.08);
    border: 1px solid var(--border);
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(3, 37, 108, 0.15);
}

.property-card:hover .property-image {
    transform: scale(1.05);
}

.property-image {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card {
    background: var(--card);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border);
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(217, 154, 27, 0.1), 0 10px 30px rgba(3, 37, 108, 0.1);
    transform: translateY(-4px);
}

.category-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #F5F5F5 0%, #EBEBEB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    color: var(--primary);
}

.category-card:hover .category-icon {
    background: var(--primary);
    color: white;
}

/* ============================================ */
/* SEARCH BOX & TABS */
/* ============================================ */
.search-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.search-tab {
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    color: var(--muted);
}

.search-tab.active {
    color: var(--primary);
}

.search-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

/* ============================================ */
/* BUTTONS */
/* ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #C88714 100%);
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(217, 154, 27, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217, 154, 27, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

/* ============================================ */
/* STAT NUMBER */
/* ============================================ */
.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    background: linear-gradient(135deg, white 0%, #CBD5E1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================ */
/* NAVIGATION LINKS */
/* ============================================ */
.nav-link {
    position: relative;
    color: var(--primary);
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================ */
/* BADGES */
/* ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-new {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.badge-featured {
    background: linear-gradient(135deg, var(--accent) 0%, #C88714 100%);
    color: white;
}

.badge-premium {
    background: linear-gradient(135deg, var(--primary) 0%, #021A4A 100%);
    color: white;
}

/* ============================================ */
/* SCROLL PROGRESS & PAGE LOADER */
/* ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 1000;
    transition: width 0.1s linear;
}

.page-loader {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ============================================ */
/* MOBILE MENU */
/* ============================================ */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, #021A4A 100%);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* ============================================ */
/* FOOTER SOCIAL ICONS */
/* ============================================ */
.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #D99A1B;
    transition: all 0.3s ease;
}

.footer-social-icon:hover {
    background-color: #D99A1B;
    color: white;
}

/* ============================================ */
/* WHATSAPP CHAT WIDGET */
/* ============================================ */
.whatsapp-chat {
    position: fixed;
    bottom: 50px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.whatsapp-button {
    background-color: #25D366;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    border: none;
    color: white;
    font-size: 32px;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-tooltip {
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: #1e293b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    font-weight: 500;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-chat:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Pre-chat Message Box */
.whatsapp-prechat {
    position: fixed;
    bottom: 180px;
    right: 30px;
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 998;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

.whatsapp-prechat.open {
    transform: scale(1);
    opacity: 1;
}

.whatsapp-prechat-header {
    background: #075E54;
    color: white;
    padding: 15px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-prechat-header i {
    font-size: 24px;
}

.whatsapp-prechat-header h4 {
    font-weight: 600;
    margin: 0;
    font-size: 16px;
}

.whatsapp-prechat-header p {
    font-size: 11px;
    opacity: 0.8;
    margin: 2px 0 0;
}

.whatsapp-prechat-body {
    padding: 15px;
}

.message-templates {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.template-message {
    padding: 10px 12px;
    background: #f0f2f5;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1e293b;
}

.template-message:hover {
    background: #e4e6e9;
    transform: translateX(5px);
}

.template-message i {
    color: #25D366;
    margin-right: 8px;
    font-size: 12px;
}

.custom-message {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.custom-message input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 12px;
    outline: none;
}

.custom-message input:focus {
    border-color: #25D366;
}

.custom-message button {
    background: #25D366;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-message button:hover {
    background: #128C7E;
}

.close-prechat {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-prechat:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .whatsapp-chat {
        bottom: 80px;
        right: 20px;
    }
    .whatsapp-button {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    .whatsapp-prechat {
        width: 300px;
        right: 20px;
        bottom: 150px;
    }
}

/* ============================================ */
/* RESPONSIVE STYLES */
/* ============================================ */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    .category-card {
        padding: 1.5rem;
    }
    .category-icon {
        width: 48px;
        height: 48px;
    }
    .category-icon i {
        font-size: 1.5rem;
    }
}

/* ============================================ */
/* REDUCED MOTION PREFERENCE */
/* ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================ */
/* STATS CARD HOVER EFFECT */
/* ============================================ */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ============================================ */
/* TOAST NOTIFICATION */
/* ============================================ */
.toast-notification {
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}