/* Main Styles */
:root {
    --color-primary: #006699;
    /* main */
    --color-secondary: #FBC154;
    /* secondary */
    --color-background: #f8f8f8;
    /* page background */
    --color-white: #ffffff;
    --color-text: #252525;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
}

/* Required field labels - red indicator */
.form-label.required {
    color: #dc3545;
}
.form-label.required::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

/* Property Cards */
.property-card {
    transition: transform 0.3s;
    margin-bottom: 20px;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-image {
    height: 200px;
    object-fit: cover;
}

/* Dashboard */
#sidebarToggle {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.overlay-active {
    display: block;
    opacity: 1;
}

.dashboard-sidebar {
    background-color: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 20px;
    height: 100%;
    min-height: calc(100vh - 76px);
    position: relative;
    transition: transform 0.3s ease;
    z-index: 1050;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-text);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: color 0.3s ease;
}

.sidebar-close-btn:hover {
    color: var(--color-primary);
}

.dashboard-content {
    padding: 20px;
}

/* Mobile Responsive - Slide Menu */
@media (max-width: 767.98px) {
    #sidebarToggle {
        display: inline-block;
    }

    .sidebar-close-btn {
        display: block;
    }

    .dashboard-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 80%;
        height: 100vh;
        min-height: 100vh;
        z-index: 1050;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .dashboard-sidebar.sidebar-open {
        right: 0;
        transform: translateX(0);
    }

    .col-md-3 {
        padding: 0;
    }

    .col-md-9 {
        width: 100%;
        max-width: 100%;
    }
}

/* Tablet and Desktop - Always visible */
@media (min-width: 768px) {
    .dashboard-sidebar {
        position: relative;
        transform: translateX(0);
    }

    #sidebarToggle {
        display: none;
    }

    .sidebar-overlay {
        display: none !important;
    }
}

/* Forms */
.form-label {
    font-weight: bold;
}

/* Arabic Text Alignment */
.text-right {
    text-align: right;
}

.btn-success {
    color: #f8f8f8 !important;
}

/* Custom Buttons */
.btn-success-arabic {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-success-arabic:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Override common Bootstrap color hooks to match the site theme */
.btn-primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    /* fallback darker shade if browser doesn't support color functions */
    filter: brightness(0.95);
}

/* Navbar and footer adjustments when using .bg-dark */
.navbar,
.bg-dark {
    background-color: var(--color-primary) !important;
    color: var(--color-white) !important;
}

.navbar .nav-link,
.navbar .navbar-brand,
.bg-dark a {
    color: var(--color-white) !important;
}

/* Footer specific fix */
footer.bg-dark {
    background-color: var(--color-primary) !important;
}

/* Hero Section */
.hero-section {

    background-size: cover;
    background-position: center;
    color: var(--color-primary);
    text-align: center;
}

/* Uniform .btn size site-wide */
.btn,
.btn.btn-sm,
.btn.btn-lg {
    min-height: 38px;
    padding: 0.375rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Radio Button Groups */

.btn-group {
    direction: rtl;
    width: 100%;
    gap: 5px;
}

.btn-group .btn {
    flex: 1 1 auto;
    min-width: 5.5rem;
    white-space: nowrap;
    border-radius: 4px !important;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-group .btn-check:checked+.btn {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-group .btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Property Details */
.property-details-image {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
}

/* Accent elements */
.badge-accent {
    background-color: var(--color-secondary);
    color: var(--color-text);
}

/* Simple utility to ensure links using primary color */
.text-primary-custom {
    color: var(--color-primary) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #006699;
}

a {
    text-decoration: none;
}

.copy-details-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-details-btn:hover {
    background-color: #0056b3;
    color: #fff;
}

/* SEO and Performance Improvements */

/* Lazy loading for images */
img {
    loading: lazy;
}

/* Better typography for SEO */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Structured data styling (invisible but helps with SEO) */
.schema-org {
    display: none;
}

/* Improve readability */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Better focus states for accessibility (SEO bonus) */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 153, 0.25);
    outline: none;
}

/* Optimize for Core Web Vitals */
.property-card img {
    aspect-ratio: 16/9;
    width: 100%;
    height: auto;
}

/* Print styles for better SEO */
@media print {

    .navbar,
    .btn,
    .sidebar,
    .footer-actions {
        display: none !important;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
}