/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    /* Brand Colors */
    --brand-blue: #0B2949;
    --brand-blue-light: #143C64;
    --accent-blue: #007bff;

    /* Matte Functional Colors */
    --bg-main: #dee5ef;
    /* Deeper matte navy-grey */
    --bg-card: #f1f5f9;
    /* Subtly navy-tinted card background */
    /* Not pure white, slightly tinted */
    --bg-inset: #dae1e7;

    /* Text Colors (Matte balance) */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-on-accent: #ffffff;

    /* Legacy compatibility */
    --gold: var(--brand-blue);
    --gold-hover: var(--brand-blue-light);
    --deep-navy: var(--bg-main);
    --medium-blue: var(--bg-inset);
    --white: var(--text-primary);
    --text-grey: var(--text-secondary);
    --dark-light: var(--bg-card);

    /* Animation Tokens */
    --transition-smooth: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll Progress */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 10000;
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-blue), var(--accent-blue));
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 15px var(--accent-blue);
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 99999;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cursor-dot {
    display: none;
}

.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 99999;
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cursor-outline i {
    font-size: 30px;
    color: var(--brand-blue);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transform: rotate(-45deg);
    transition: all 0.3s ease;
}


body.cursor-hover .cursor-outline {
    transform: translate(-50%, -50%) scale(1.2);
}

body.cursor-hover .cursor-outline i {
    color: var(--accent-blue);
    transform: rotate(0deg);
}


@media (max-width: 991px) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: transparent;
    position: relative;
    color: var(--text-primary);
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    cursor: none;
    padding-top: 100px;
    /* Increased for safe navbar clearance */
}

/* Modern Abstract Background */
.bg-modern-abstract {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #ebf2fa 100%);
}

.blob-c {
    position: absolute;
    filter: blur(80px);
    opacity: 0.8;
    animation: blob-float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: linear-gradient(135deg, rgba(11, 41, 73, 0.25) 0%, rgba(0, 123, 255, 0.2) 100%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: linear-gradient(135deg, rgba(20, 60, 100, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%);
    animation-delay: -5s;
    animation-duration: 25s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: linear-gradient(135deg, rgba(180, 200, 230, 0.2) 0%, rgba(255, 255, 255, 0.8) 100%);
    animation-delay: -10s;
    animation-duration: 30s;
    opacity: 0.4;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(11, 41, 73, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 41, 73, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

@keyframes blob-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

/* On homepage, we don't want the padding-top so the hero is full-screen behind transparent nav */
body.home-page {
    padding-top: 0;
}




/* Enhanced Glassmorphism */
.glass-blue {
    background: rgba(11, 41, 73, 0.4);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.glass-fx {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(11, 41, 73, 0.15);
    border-color: var(--accent-blue);
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--brand-blue);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Focus Ring Enhancement */
:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25) !important;
}


h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Tajawal', sans-serif;
    /* Unified font for Arabic consistency */
    font-weight: 700;
    color: var(--brand-blue);
}

.text-gold {
    color: var(--white) !important;
    font-weight: 800;
}

/* Make emphatic text bold white */
.bg-gold {
    background-color: var(--white) !important;
}

.bg-deep-navy {
    background-color: var(--deep-navy) !important;
}

.bg-medium-blue {
    background-color: var(--medium-blue) !important;
}

.bg-dark-light {
    background-color: var(--dark-light) !important;
}

.bg-black {
    background-color: #000000 !important;
}

.glass-blue {
    background: rgba(11, 41, 73, 0.4);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-gold {
    background-color: var(--brand-blue);
    color: #ffffff;
    border-radius: 4px;
    padding: 12px 35px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
    border: none;
}

.btn-gold:hover {
    background-color: var(--brand-blue-light);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 41, 73, 0.2);
}

.btn-outline-gold {
    border: 2px solid var(--brand-blue);
    color: var(--brand-blue);
    border-radius: 4px;
    padding: 10px 33px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    background-color: var(--brand-blue);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    background-color: rgba(222, 229, 239, 0.98);
    /* Solid-ish background from the start */
    border-bottom: 1px solid rgba(11, 41, 73, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    /* Added shadow for initial state */
    transition: all 0.3s ease;
    min-height: 80px;
    /* Ensure enough height for the larger logo */
}

.navbar .nav-link {
    font-size: 1.15rem;
    /* Increased font size */
    font-weight: 600;
    /* Bolder font */
    color: var(--brand-blue) !important;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-fast);
}

.navbar-brand img {
    height: 80px;
    /* Target logo height */
    width: auto;
    transition: var(--transition-smooth);
}

.navbar.transparent {
    background-color: transparent;
    border-bottom: none;
    box-shadow: none;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--brand-blue) !important;
}

/* Cards */
.card-custom {
    background-color: var(--bg-card);
    border: 1px solid rgba(11, 41, 73, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.card-custom:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(11, 41, 73, 0.08);
    border-color: var(--accent-blue);
}

.glass-fx {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-custom:hover .card-img-top {
    transform: scale(1.05);
}

/* Forms */
.form-control,
.form-select {
    background-color: #ffffff;
    border: 1px solid rgba(11, 41, 73, 0.1);
    color: #0B2949;
    padding: 12px;
    border-radius: 4px;
}

.form-control::placeholder {
    color: rgba(11, 41, 73, 0.4);
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: var(--accent-blue);
    color: #0B2949;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.1);
}

.form-select option {
    background-color: #ffffff;
    color: #0B2949;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background-position: center;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(222, 229, 239, 0.3), rgba(11, 41, 73, 0.85));
    /* Deep navy gradient transition */
}

/* Post-Navbar/Footer Styles */
.footer-custom {
    background-color: var(--brand-blue);
    /* Dark Navy grounding */
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 5rem 0 3rem;
}

.footer-custom h3,
.footer-custom h5 {
    color: #ffffff !important;
}

.footer-custom .text-white-50,
.footer-custom p {
    color: rgba(255, 255, 255, 0.6) !important;
}

.footer-custom a {
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s ease;
}

.footer-custom a:hover {
    color: var(--accent-blue) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes slowRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-fade-up {
    opacity: 0;
    will-change: transform, opacity;
    /* Hint browsers for optimization */
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* Background Shapes for Anime.js */
.bg-shape {
    position: fixed;
    z-index: -1;
    opacity: 0.05;
    filter: blur(2px);
    pointer-events: none;
    transition: opacity 0.5s ease;
}


/* Contrast & Utilities */
.bg-accent-blue {
    background-color: var(--accent-blue) !important;
}

.text-accent-blue {
    color: var(--accent-blue) !important;
}

.bg-brand-blue {
    background-color: var(--brand-blue) !important;
}

.text-brand-blue {
    color: var(--brand-blue) !important;
}

/* Global Matte Overrides */
.bg-white {
    background-color: var(--bg-card) !important;
}

.text-white {
    color: var(--bg-card) !important;
}

/* If intended as a high-contrast text on dark, this might need care */
.section-matte {
    background-color: var(--bg-main);
}

.section-padding {
    padding: 80px 0;
}

/* New Homepage Sections */
.stats-section {
    background-color: var(--brand-blue);
    padding: 60px 0;
}

.stat-item h2 {
    font-size: 3rem;
    font-weight: 800;
}

.testimonial-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(11, 41, 73, 0.1);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(11, 41, 73, 0.03);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
}

.quote-icon {
    font-size: 2rem;
    color: var(--accent-blue);
    opacity: 0.3;
}

.card-shadow {
    box-shadow: 0 10px 30px rgba(11, 41, 73, 0.05);
}



/* Ensure container-fluid or rows don't cause overflow in RTL */



/* About Page Extras */
.img-wrapper {
    position: relative;
    padding: 20px;
}

.experience-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--bg-card);
    padding: 20px 30px;
    border-radius: 20px;
    border: 1px solid rgba(0, 123, 255, 0.1);
    backdrop-filter: blur(10px);
}

.icon-box-lg,
.icon-box-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 41, 73, 0.08);
    /* Deeper branding blue */
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.icon-box-lg {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.icon-box-sm {
    width: 45px;
    height: 45px;
}

.icon-box-lg i {
    color: var(--brand-blue) !important;
    font-size: 2rem !important;
}

.icon-box-sm i {
    color: var(--brand-blue) !important;
    font-size: 1.25rem !important;
}

.glass-card:hover .icon-box-lg {
    background: var(--accent-blue);
    transform: rotateY(360deg);
}

.glass-card:hover .icon-box-lg i {
    color: white !important;
}

/* Neighborhood Redesign */
.neighborhood-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 350px;
    border: none;
    transition: var(--transition-smooth);
}

.neighborhood-card img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.neighborhood-card:hover img {
    transform: scale(1.1);
}

.neighborhood-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 41, 73, 0.9) 0%, rgba(11, 41, 73, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 1;
    transition: var(--transition-smooth);
}

.neighborhood-content {
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.neighborhood-card:hover .neighborhood-content {
    transform: translateY(0);
}

.neighborhood-card .btn-glass-sm {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-top: 15px;
    opacity: 0;
}

.neighborhood-card:hover .btn-glass-sm {
    opacity: 1;
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.neighborhood-card .btn-glass-sm i {
    transition: transform 0.3s ease;
}

.neighborhood-card:hover .btn-glass-sm i {
    transform: translateX(-5px);
}