:root {
    /* Brand Colors */
    --primary-color: #0B3C5D; /* Royal Blue */
    --primary-hover: #082d46;
    --accent-color: #D4AF37; /* Luxury Gold */
    --accent-hover: #b5952f;
    --bg-color: #F5F7FA;      /* Pure White/Light Grey */
    --text-color: #1E1E1E;    /* Dark Text */
    --text-muted: #6c757d;
    
    /* Typography */
    --font-family: 'Tajawal', 'Cairo', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Custom Utilities */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.bg-accent { background-color: var(--accent-color) !important; }

.btn-accent {
    background-color: var(--accent-color);
    color: white;
    border: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 0.8rem 0;
    transition: all 0.3s ease;
    z-index: 1050; /* Ensure high z-index */
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary-color) !important;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    outline: none !important;
    box-shadow: none !important;
}

.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(11, 60, 93, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 600;
    margin: 0 8px;
    padding: 10px 15px !important;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    border: 1px solid transparent;
}

.nav-link:hover, .nav-link.active {
    background-color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
    color: var(--primary-color) !important;
}

.nav-link i {
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.1);
}

.nav-link::after {
    display: none; /* Remove underline effect for cleaner look */
}

/* ==============================================
   Bottom Mobile Navigation — App-like
   ============================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 1040;
    padding: 6px 8px env(safe-area-inset-bottom, 10px);
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    height: 62px;
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 500;
    transition: color 0.2s;
    flex: 1;
    padding: 4px 2px;
    border-radius: 10px;
}
.bottom-nav-item i { font-size: 1.2rem; }
.bottom-nav-item.active {
    color: #0B3C5D;
    font-weight: 700;
}
.bottom-nav-item:active { transform: scale(0.95); }

/* Mobile Navbar Adjustments */
@media (max-width: 991.98px) {
    body { padding-bottom: 75px !important; }

    .bottom-nav { display: flex; }

    .navbar { padding: 0.4rem 0; }
    .navbar-brand img { height: 32px !important; }
    .navbar-toggler { padding: 2px; }
    .navbar-toggler-icon { width: 1.2em; height: 1.2em; }
    .navbar .btn-sm { font-size: 0.72rem; padding: 0.3rem 0.6rem; }

    .navbar-collapse {
        background: #fff; padding: 16px; border-radius: 16px;
        margin-top: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        max-height: 70vh; overflow-y: auto;
    }
    .navbar-nav { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
    .nav-link { margin: 3px 0; text-align: center; padding: 10px !important; border-radius: 10px; }
    .nav-link.active { background: #0B3C5D; color: #fff !important; border: none; }

    body { padding-top: 65px !important; }

    .hero-section { padding: 90px 0 45px !important; border-radius: 0 0 25px 25px !important; }
    .hero-title { font-size: 1.5rem !important; }
    .hero-subtitle { font-size: 0.85rem !important; margin-bottom: 1.2rem !important; }

    .search-card { padding: 0.9rem !important; border-radius: 12px !important; }

    .offer-card .card-img-top { height: 150px; }
    .offer-card .card-body { padding: 0.8rem !important; }
    .offer-card h5 { font-size: 0.85rem !important; }

    .bg-primary.py-5, .bg-primary.py-4 { padding: 1.2rem 0 !important; }
    .bg-primary h1 { font-size: 1.2rem !important; }

    .agency-hero { padding: 90px 0 45px !important; border-radius: 0 0 25px 25px !important; }
    .agency-hero h1 { font-size: 1.3rem !important; }

    footer { padding: 1.5rem 0 5rem !important; margin-top: 1.5rem !important; }
    .card-body.p-5, .card-body.p-4 { padding: 1rem !important; }
    .team-card { padding: 1rem !important; }
    table { font-size: 0.78rem; }
}

@media (max-width: 575px) {
    body { padding-top: 58px !important; padding-bottom: 70px !important; }
    .navbar { padding: 0.3rem 0; }
    .navbar-brand img { height: 28px !important; }
    .hero-section { padding: 75px 0 30px !important; border-radius: 0 0 20px 20px !important; }
    .hero-title { font-size: 1.25rem !important; }
    .hero-subtitle { font-size: 0.75rem !important; }
    .search-card { padding: 0.7rem !important; }
    .offer-card .card-img-top { height: 130px; }
    .agency-hero { padding: 75px 0 30px !important; }
    .bottom-nav { height: 56px; padding: 4px 4px 8px; }
    .bottom-nav-item { font-size: 0.6rem; }
    .bottom-nav-item i { font-size: 1.05rem; }
    footer { padding-bottom: 5rem !important; }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(11, 60, 93, 0.75), rgba(11, 60, 93, 0.55)), url('https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?ixlib=rb-4.0.3&auto=format&fit=crop&w=2021&q=80');
    background-size: cover;
    background-position: center;
    min-height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    color: white;
    text-align: center;
    border-radius: 0 0 50px 50px;
    padding-top: 160px;
    padding-bottom: 80px;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.35;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Smart Search Bar */
.search-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.8);
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 991.98px) {
    .search-card {
        padding: 1rem !important;
        border-radius: 14px !important;
        max-width: 100%;
        transform: none !important;
    }
}

/* Range Slider Styling */
.form-range {
    height: 6px;
    background: #e9ecef;
    border-radius: 5px;
}

.form-range::-webkit-slider-thumb {
    background: var(--accent-color);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent-hover);
}

.form-range::-moz-range-thumb {
    background: var(--accent-color);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-search-custom {
    background-color: var(--accent-color);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    transition: all 0.3s ease;
}

.btn-search-custom:hover {
    background-color: var(--accent-hover);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.form-label-custom {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
    text-align: right;
}

.form-control-custom, .form-select-custom {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    background-color: #fff;
    transition: all 0.3s;
}

.form-control-custom:focus, .form-select-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(11, 60, 93, 0.1);
}

/* Cards */
.offer-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
}

.offer-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.offer-card.featured {
    border: 2px solid var(--accent-color);
}

.offer-card.featured::before {
    content: 'موصى به';
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.card-img-top {
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
    text-align: right;
}

.card-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.agency-name {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-tag {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 1.4rem;
}

.rating {
    color: #FFC107;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}

footer h5 {
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--accent-color);
}

/* Price Box Styling */
.price-box {
    background-color: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--accent-color) !important;
    min-width: 120px;
    text-align: center;
    transition: all 0.3s ease;
}

.price-box:hover {
    background-color: rgba(212, 175, 55, 0.2);
    transform: scale(1.02);
}

/* Custom Details Button */
.btn-custom-details {
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.5px;
}

.btn-custom-details:hover {
    background-color: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(11, 60, 93, 0.3);
}


/* Agency Registration Page */
.agency-hero {
    background-color: var(--primary-color);
    background-image: linear-gradient(135deg, var(--primary-color) 0%, #052035 100%);
    padding: 180px 0 120px;
    border-radius: 0 0 50px 50px;
    color: white;
    position: relative;
    overflow: hidden;
}

.agency-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.1;
}

.bg-accent-light {
    background-color: rgba(212, 175, 55, 0.15);
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--accent-color);
}

.input-group-text {
    border-color: #eee;
}


/* New Registration Page Styles */
.register-card {
    background: white;
}

.register-header {
    background-image: url('https://images.unsplash.com/photo-1571003123894-1f0594d2b5d9?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
    height: 200px;
}

.register-header .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(11, 60, 93, 0.3), rgba(11, 60, 93, 0.8));
}

.register-tabs .btn-white {
    background-color: white;
    color: var(--primary-color);
}

.register-tabs .btn-transparent {
    background-color: transparent;
    color: #6c757d;
}

.input-group-text {
    background-color: #f8f9fa !important;
}

.form-control.bg-light {
    background-color: #f8f9fa !important;
}

.form-control:focus {
    box-shadow: none;
    background-color: white !important;
    border: 1px solid var(--accent-color) !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Typing Effect */
.typing-wrapper {
    display: inline-block;
}

.typing-effect {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-left: 3px solid #D4AF37; /* Gold cursor */
    width: 0;
    padding-left: 5px;
    animation: typing 4s steps(50, end) forwards, blink-caret 0.75s step-end infinite;
    vertical-align: bottom;
    max-width: 100%;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #D4AF37; }
}

/* Custom Search Inputs */
.form-control:focus, .form-select:focus {
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25) !important;
}

/* Remove default date icon if needed or style it */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.5) sepia(1) saturate(5) hue-rotate(7deg); /* Gold-ish color */
    cursor: pointer;
}

