:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #343a40;
    --border-color: #dee2e6;
    --text-color: #212529;
    --body-bg: #f0f2f5;
    --card-bg: #ffffff;
    --sidebar-width: 280px;
    --left-sidebar-width: 260px;
    --navbar-height: 60px;
    --border-radius: 8px;
    --font-family: "Cairo", sans-serif;
    --scrollbar-width: 10px;
    --scrollbar-track-bg: #fff;
    --scrollbar-thumb-bg: #007bff;
    --scrollbar-thumb-hover-bg: #0056b3;
    --scrollbar-border-radius: 5px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}
/* اجعل العنصر الأب قابلاً لوضع الشارة فوقه */
.nav-icon.notification-icon,
.nav-item {
    position: relative; /* هذا هو الجزء الأهم */
}

/* تصميم الشارة نفسها (الدائرة الحمراء) */
.notification-badge {
   position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3b30;
    color: white;
    font-family: sans-serif;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 31%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* شارة بدون أرقام (نقطة حمراء فقط) */
.notification-badge.dot {
    width: 10px;
    height: 10px;
    font-size: 0; /* لإخفاء أي نص بداخلها */
    top: 0;
    right: -7px;
}
.bi-list + .notification-badge.dot{
        width: 10px;
    height: 10px;
    font-size: 0;
    top: 25px;
    right: auto;
    left: -11px;
}
a,
button,
.follow-btn {
    font-family: var(--font-family);
}
a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}
body::-webkit-scrollbar,
div::-webkit-scrollbar,
main::-webkit-scrollbar,
aside::-webkit-scrollbar,
section::-webkit-scrollbar,
.custom-scrollable-element::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

body::-webkit-scrollbar-track,
div::-webkit-scrollbar-track,
main::-webkit-scrollbar-track,
aside::-webkit-scrollbar-track,
section::-webkit-scrollbar-track,
.custom-scrollable-element::-webkit-scrollbar-track {
    background: var(--scrollbar-track-bg);
    border-radius: var(--scrollbar-border-radius);
}

body::-webkit-scrollbar-thumb,
div::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb,
aside::-webkit-scrollbar-thumb,
section::-webkit-scrollbar-thumb,
.custom-scrollable-element::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-bg);
    border-radius: var(--scrollbar-border-radius);
    border: 2px solid var(--scrollbar-track-bg);
}

body::-webkit-scrollbar-thumb:hover,
div::-webkit-scrollbar-thumb:hover,
main::-webkit-scrollbar-thumb:hover,
aside::-webkit-scrollbar-thumb:hover,
section::-webkit-scrollbar-thumb:hover,
.custom-scrollable-element::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover-bg);
}

body::-webkit-scrollbar-button,
div::-webkit-scrollbar-button,
main::-webkit-scrollbar-button,
aside::-webkit-scrollbar-button,
section::-webkit-scrollbar-button,
.custom-scrollable-element::-webkit-scrollbar-button {
    display: none;
}

/* App Download Modal */
.app-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.app-overlay.active {
    display: block;
    opacity: 1;
}

.app-download-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: var(--card-bg);
    padding: 30px 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-align: center;
    width: 90%;
    max-width: 450px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.app-download-modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-color);
}

.modal-app-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    border-radius: 12px;
    object-fit: contain;
}

.app-download-modal h2 {
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.app-download-modal p {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 0.9em;
}

.app-store-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.app-store-btn img {
    height: 45px;
    transition: transform 0.2s ease;
}
.app-store-btn:hover img {
    transform: scale(1.05);
}

/* Main Layout */
.main-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-navbar {
    height: var(--navbar-height);
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo img {
    height: 30px;
    object-fit: contain;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--light-gray);
    border-radius: 20px;
    padding: 5px 15px;
    margin-right: 30px;
    flex-grow: 1;
    max-width: 400px;
}

.search-bar i {
    color: var(--secondary-color);
    margin-left: 8px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px;
    width: 100%;
    font-family: var(--font-family);
}

.nav-icons {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.nav-icon {
    color: var(--secondary-color);
    font-size: 1.2em;
    margin: 0 10px;
    position: relative;
    transition: color 0.2s ease;
}
.nav-icon:hover {
    color: var(--primary-color);
}

.notification-icon .notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: red;
    color: white;
    font-size: 0.6em;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-user img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.nav-user:hover img {
    border-color: var(--primary-color);
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex-grow: 1;
}

/* Right Sidebar */
.right-sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    padding: 20px 0;
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    position: fixed;
    top: var(--navbar-height);
    right: 0;
    bottom: 0;
    transition: transform 0.3s ease-in-out;
}

.right-sidebar nav ul li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    font-size: 0.95em;
    color: var(--secondary-color);
    transition: background-color 0.2s ease, color 0.2s ease;
    border-right: 3px solid transparent;
}

.right-sidebar nav ul li a i {
    margin-left: 15px;
    width: 20px;
    text-align: center;
    font-size: 1.1em;
}

.right-sidebar nav ul li.active a,
.right-sidebar nav ul li a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
    border-right-color: var(--primary-color);
}

.right-sidebar nav ul li.separator {
    padding: 15px 20px 5px;
    font-size: 0.8em;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
}

.right-sidebar .badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: auto;
}

/* Center Content */
.center-content {
    flex-grow: 1;
    padding: 20px;
    margin-right: var(--sidebar-width);
    margin-left: var(--left-sidebar-width);
        width: 100%;
}

/* Stories */
.stories {
    display: flex;
    gap: 10px;
    padding-bottom: 20px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.stories::-webkit-scrollbar {
    display: none;
}
.stories {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.story-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.story-item:hover {
    transform: translateY(-3px);
}

.story-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    overflow: hidden;
    background-color: var(--light-gray);
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-item.add-story .story-avatar {
    border-color: var(--secondary-color);
}
.story-item.add-story .story-avatar i {
    font-size: 1.5em;
    color: var(--secondary-color);
}

.story-name {
    font-size: 0.8em;
    text-align: center;
    color: var(--secondary-color);
    white-space: normal;
    max-width: 100%;
}

/* Discover Section */
.discover-section {
    margin-bottom: 9px;
}
.discover-section h3 {
    font-size: 1.2em;
    color: var(--dark-gray);
}
.discover-section h3 i {
    margin-left: 8px;
    color: var(--primary-color);
}

.discover-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}
.discover-grid::-webkit-scrollbar {
    height: 6px;
}
.discover-grid::-webkit-scrollbar-thumb {
    background-color: var(--medium-gray);
    border-radius: 3px;
}

.discover-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    min-width: 220px;
    height: 140px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.discover-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.discover-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.discover-card:hover img {
    transform: scale(1.1);
}

.discover-card-title {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    color: white;
    padding: 10px;
    font-size: 0.95em;
    font-weight: 600;
    text-align: right;
}

/* Discover Now Section */
.discover-now-section {
    margin-bottom: 30px;
}
.discover-now-section h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    color: var(--dark-gray);
}
.discover-now-section h3 i {
    margin-left: 8px;
    color: var(--primary-color);
}

.discover-now-grid {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}
.discover-now-grid::-webkit-scrollbar {
    height: 6px;
}
.discover-now-grid::-webkit-scrollbar-thumb {
    background-color: var(--medium-gray);
    border-radius: 3px;
}

.discover-now-card {
    min-width: 180px;
    height: 240px;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.discover-now-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.discover-now-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.discover-now-card:hover img {
    transform: scale(1.1);
}
.discover-now-title {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 12px 10px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    color: white;
    font-size: 0.9em;
    font-weight: 600;
    text-align: right;
}

/* Feed */
.feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    /* CSS Animation will be handled by JS Intersection Observer for better control */
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.post-user-info {
    display: flex;
    align-items: center;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 10px;
}

.post-username {
    font-weight: 600;
    display: block;
    font-size: 0.95em;
}

.post-time {
    font-size: 0.8em;
    color: var(--secondary-color);
}

.post-actions-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.follow-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 2px 5px;
    border-radius: var(--border-radius);
    font-size: 0.75em;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.follow-btn:hover {
    background-color: #0056b3;
}
.follow-btn.followed {
    background-color: var(--medium-gray);
    color: var(--dark-gray);
}

.post-options-trigger {
    color: var(--secondary-color);
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
}
.post-content h3{    padding: 0 15px 15px 15px;
}
.post-content p {
    padding: 0 15px 15px 15px;
    margin-bottom: 10px;
    font-size: 0.95em;
    line-height: 1.7;
}

.post-content img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;

    display: block;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid var(--border-color);
}

.post-engagement,
.post-save {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}
.action-btn:hover {
    color: var(--primary-color);
}
.action-btn i {
    margin-left: 5px;
}
.action-btn .count {
    font-size: 0.85em;
    color: var(--secondary-color);
    margin-right: 3px;
}
.action-btn .fas.liked,
.action-btn i.liked {
    color: #e91e63;
}
.action-btn .fas.saved,
.action-btn i.saved {
    color: var(--primary-color);
}
.action-btn.comment-btn.active i {
    color: var(--primary-color);
}

/* Comment Section */
.comment-section {
    padding: 10px 15px;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-gray);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}
.comment-section.active {
    max-height: 200px; /* Adjust as needed */
    padding: 10px 15px;
}
.comment-section.hidden {
    padding-top: 0;
    padding-bottom: 0;
}

.comment-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    margin-bottom: 8px;
    resize: vertical;
    min-height: 40px;
}

.submit-comment-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.submit-comment-btn:hover {
    background-color: #0056b3;
}

/* Dropdown Menu Styles */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    background-color: var(--card-bg);
    min-width: 200px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    z-index: 101;
    padding: 8px 0;
    margin-top: 5px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.top-navbar .nav-icons .dropdown-container .dropdown-menu {
    left: 0;
    right: auto;
}
.post-actions-container .dropdown-container .dropdown-menu {
    left: 0;
    right: auto;
}

.dropdown-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    font-size: 0.9em;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}
.dropdown-divider {
    height: 1px;
    margin: 8px 0;
    overflow: hidden;
    background-color: var(--border-color);
}

.notifications-panel {
    width: 320px;
}
.notifications-panel .dropdown-header,
.notifications-panel .dropdown-footer {
    padding: 10px 15px;
    font-weight: 600;
}
.notifications-panel .dropdown-footer {
    text-align: center;
    border-top: 1px solid var(--border-color);
}
.notifications-panel .dropdown-footer a {
    color: var(--primary-color);
    font-size: 0.85em;
}
.notification-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
}
.notification-item img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}
.notification-item div {
    flex-grow: 1;
    font-size: 0.85em;
}
.notification-item small {
    display: block;
    color: var(--secondary-color);
    font-size: 0.9em;
    margin-top: 2px;
}

.post-options-menu {
    min-width: 160px;
}
.report-item:hover {
    background-color: #ffebee;
    color: #d32f2f;
}
.block-item:hover {
    background-color: #fce4ec;
    color: #c2185b;
}

/* Left Sidebar (Chat/Contacts) */
.left-sidebar {
    width: var(--left-sidebar-width);
    background-color: var(--card-bg);
    padding: 20px;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
}

.left-sidebar h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.contact-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 8px 5px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.contact-item:hover {
    background-color: var(--light-gray);
}

.contact-item img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 10px;
}

.contact-item span {
    font-size: 0.9em;
}

.contact-item .status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: auto;
    border: 1px solid white;
}
.status.online {
    background-color: #4caf50;
}
.status.offline {
    background-color: #9e9e9e;
}
.status.away {
    background-color: #ffc107;
}

.chat-composer {
    display: flex;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
.my-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 10px;
}
.chat-composer input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 12px;
    font-family: var(--font-family);
    outline: none;
    margin-left: 8px;
}
.chat-composer button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.3em;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .center-content {
        margin-right: var(--sidebar-width);
        margin-left: 0;
    }
    .left-sidebar {
        transform: translateX(100%); /* RTL */
    }
}

@media (max-width: 992px) {
    .center-content {
        margin-right: 0;
        margin-left: 0;
    }
    .right-sidebar {
        transform: translateX(-100%); /* RTL */
        display: none;
    }
    .left-sidebar {
        display: none;
    }
    .search-bar {
        display: none;
    }
    .top-navbar .nav-icons .dropdown-container .dropdown-menu {
        left: -3px;
    }
}
.stories{    padding-top: 60px;}
@media (max-width: 768px) {
    :root {
        --sidebar-width: 240px;
        --left-sidebar-width: 220px;
    }
    .stories,
    .discover-grid,
    .discover-now-grid {
        padding-right: 10px;
        padding-left: 10px;
    }
    .story-item {
        width: 70px;
    }
    .story-avatar {
        width: 50px;
        height: 50px;
    }
    .post-footer {
        align-items: flex-start;
        gap: 10px;
    }
    .post-save {
        margin-right: auto;
    }

    .top-navbar .logo {
        margin-left: auto;
    }
    .top-navbar .nav-icons {
        margin-right: 0;
    }

    .discover-now-card {
        min-width: 150px;
        height: 200px;
    }
    .top-navbar .nav-icons .dropdown-container .dropdown-menu {
        right: -15px;
    }
    .notifications-panel {
        width: 280px;
    }
}

@media (max-width: 576px) {
    .top-navbar {
        padding: 0 10px;
    }
    .nav-icon {
        margin: 0 5px;
        font-size: 1em;
    }
    .nav-user img {
        width: 30px;
        height: 30px;
    }
    .center-content {
        padding: 0;
    }

    .action-btn {
        font-size: 1em;
    }
    .action-btn .count {
        display: none;
    }

    .app-download-modal {
        padding: 20px;
    }
    .app-store-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .app-store-btn img {
        height: 40px;
    }
}
/* --- Breadcrumb Navigation Styles --- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap; /* للسماح بالالتفاف على شاشات صغيرة جدًا إذا لزم الأمر */
    padding: 0.75rem 1rem; /* يمكنك تعديل الـ padding حسب رغبتك */
    margin-bottom: 1rem; /* مسافة سفلية */
    list-style: none;

    border-radius: var(--border-radius, 0.25rem); /* تطابق مع زوايا موقعك */
    font-size: 0.9em; /* حجم خط مناسب */
}

.breadcrumb-item {
    display: flex; /* لمحاذاة الفاصل بشكل جيد */
    align-items: center; /* محاذاة عمودية للمحتوى */
}

/* فاصل بين عناصر الـ breadcrumb (مهم لـ RTL) */
.breadcrumb-item + .breadcrumb-item::before {
    /*
       في RTL، الفاصل يكون على يمين العنصر.
       في LTR، الفاصل يكون على يسار العنصر (ستحتاج لعكس margin إذا غيرت اتجاه الموقع).
       استخدام أيقونة Font Awesome كسهم لـ RTL:
    */
    content: "\f053"; /* Font Awesome left arrow icon (fas fa-chevron-left) */
    font-family: "Font Awesome 5 Free"; /* Or 6 Free depending on your version */
    font-weight: 900; /* Required for solid icons */
    float: right; /* لـ RTL، الفاصل يكون على يمين العنصر السابق */
    padding-left: 0.5rem; /* مسافة قبل الفاصل */
    padding-right: 0.5rem; /* مسافة بعد الفاصل */
    color: var(--secondary-color, #6c757d); /* لون الفاصل */
    /*
       بديل باستخدام نص عادي كسهم:
       content: "<";
       أو
       content: "/";
    */
}

/* روابط الـ breadcrumb */
.breadcrumb-item a {
    color: var(--primary-color, #007bff); /* لون الرابط الأساسي */
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.breadcrumb-item a:hover {
    color: darken(var(--primary-color, #007bff), 10%); /* لون أغمق عند المرور */
}

/* العنصر النشط (آخر عنصر في الـ breadcrumb) */
.breadcrumb-item.active {
    color: var(--secondary-color, #6c757d); /* لون أغمق للعنصر النشط */
    font-weight: 600; /* تمييز العنصر النشط */
}

/* تعديلات للتجاوب إذا لزم الأمر */
@media (max-width: 576px) {
    .breadcrumb {
        padding: 0.5rem 0.75rem;
        font-size: 0.85em;
    }
    .breadcrumb-item + .breadcrumb-item::before {
        padding-left: 0.3rem;
        padding-right: 0.3rem;
    }
}
/* =========================================== */
/*      قواعد الهاتف المحمول (Mobile First)    */
/* =========================================== */

/* إخفاء هيدر سطح المكتب */
.top-navbar {
    display: none;
}

/* هيدر الهاتف العلوي */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    display: flex;
    justify-content: space-around; /* توزيع متساوي */
    align-items: center;
    padding: 10px 0; /* padding عمودي فقط */
    height: 50px; /* تحديد ارتفاع ثابت */
    z-index: 1000;
    direction: ltr;
}
.mobile-header .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-header .nav-icon i {
    font-size: 24px;
    color: #4a4a4a; /* لون رمادي داكن للأيقونات */
}


/* شريط التصفح السفلي */
.mobile-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff; /* يمكن تغييره إلى لون أفتح قليلاً مثل #f9f9f9 */
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    /* إزالة الظل والحدود لإعطاء مظهر أنظف */
    z-index: 1000;
    direction: ltr;
}

.mobile-footer-nav .nav-item {
    color: #707070; /* لون الأيقونات غير النشطة */
    font-size: 28px;
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative; /* ضروري لنقطة الإشعار */
}

/* الأيقونة النشطة - ممتلئة وزرقاء */
.mobile-footer-nav .nav-item.active i {
    color: #007bff; /* اللون الأزرق المميز */
}


/* صورة المستخدم الشخصية في الشريط السفلي */
.mobile-footer-nav .user-avatar-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    object-fit: cover;
}
/* نقطة الإشعار الحمراء على صورة المستخدم */
.mobile-footer-nav .notification-dot-user {
    position: absolute;
    bottom: -2px; /* أسفل الصورة */
    right: -2px;  /* يمين الصورة */
    width: 10px;
    height: 10px;
    background-color: #ff3b30; /* أحمر */
    border-radius: 50%;
    border: 2px solid #fff; /* حدود بيضاء لعزلها عن الصورة */
}


/* زر البث المباشر بتصميمه الدائري */
.mobile-footer-nav .live-btn {
    background: #e4e6eb; /* لون رمادي فاتح للخلفية */
    color: #1c1e21; /* لون النص الداكن */
    border-radius: 25px; /* حواف دائرية بالكامل */
    padding: 8px 15px; /* مسافات داخلية متوازنة */
    display: flex;
    align-items: center;
    gap: 6px; /* مسافة بين الأيقونة والنص */
    font-weight: 600; /* خط أعرض قليلاً */
}
.mobile-footer-nav .live-btn i {
    font-size: 20px; /* حجم أصغر لأيقونة الكاميرا */
}
.mobile-footer-nav .live-btn span {
    font-size: 1rem; /* حجم نص "Live" */
}


/* زر الإضافة العائم - يبقى كما هو لأنه كان دقيقاً */
.floating-action-btn {
    display: none; /* نلغيه لأنه غير موجود في التصميم الجديد */
}


/* ============================================================ */
/*   قواعد شاشات سطح المكتب (عرض أكبر من أو يساوي 769px)    */
/* ============================================================ */
@media (min-width: 769px) {
    /* إظهار هيدر سطح المكتب */
    .top-navbar {
        display: flex;
    }

    /* إخفاء كل عناصر الهاتف */
    .mobile-header,
    .mobile-footer-nav {
        display: none !important;
    }
}
/* ============================================== */
/*   تأثيرات HOVER و ACTIVE للأيقونات   */
/* ============================================== */

/* ١. قاعدة عامة لجميع الروابط (الأيقونات) في الهيدر والفوتر */
/* هذه القاعدة ستجعل كل التغييرات ناعمة */
.mobile-header .nav-icon,
.mobile-header .nav-icon-svg,
.mobile-footer-nav .nav-item {
    transition: transform 0.15s ease-out, opacity 0.2s ease-in-out;
    -webkit-tap-highlight-color: transparent; /* لمنع ظهور مربع أزرق عند اللمس على الهواتف */
}


/* ٢. تأثير الـ Hover (عند تمرير الماوس) */
/* نطبق التأثير فقط على العناصر غير النشطة (not.active) */
.mobile-header .nav-icon:not(.active):hover,
.mobile-header .nav-icon-svg:not(.active):hover,
.mobile-footer-nav .nav-item:not(.active):hover {
    opacity: 0.7; /* جعل الأيقونة شفافة قليلاً */
}


/* ٣. تأثير الـ Active (أثناء النقر) */
/* نطبقه على كل الأيقونات */
.mobile-header .nav-icon:active,
.mobile-header .nav-icon-svg:active,
.mobile-footer-nav .nav-item:active {
    transform: scale(0.90); /* تصغير حجم الأيقونة إلى 90% لتعطي إحساس بالضغط */
    transition: transform 0.1s ease-in; /* جعل عملية التصغير سريعة وفورية */
}


/* ========================================================= */
/*   (هذا الكود لتذكيرك بهيكل العناصر للتأكد من تطابق الكلاسات)   */
/* ========================================================= */

/* تصميم هيدر الهاتف العلوي */
.mobile-header {
    /* ... (نفس الخصائص السابقة) ... */
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: #fff; display: flex;
    justify-content: space-around; align-items: center;
    padding: 10px 0; height: 50px; z-index: 1000;
}
.mobile-header .nav-icon i,
.mobile-header .nav-icon-svg svg {
    font-size: 24px;
    width: 26px; /* توحيد حجم SVG */
    color: #4a4a4a;
}
.mobile-header .nav-icon-svg svg path {
    fill: #007bff;
}


/* شريط التصفح السفلي */
.mobile-footer-nav {
    /* ... (نفس الخصائص السابقة) ... */
    position: fixed; bottom: 0; left: 0; width: 100%;
    background-color: #fff; display: flex;
    justify-content: space-around; align-items: center;
    height: 60px; z-index: 1000;
}
.mobile-footer-nav .nav-item {
    color: #707070; font-size: 28px;
    display: flex; align-items: center;
    text-decoration: none; position: relative;
}
/* الأيقونة النشطة */
.mobile-footer-nav .nav-item.active {
    opacity: 1; /* التأكد من أن الأيقونة النشطة غير شفافة */
}
.mobile-footer-nav .nav-item.active i {
    color: #007bff;
}
/* ===================================================== */
/*   Modal (Popup Window) System - Design & Animation    */
/* ===================================================== */

/* الخلفية السوداء الشفافة */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1010; /* فوق كل شيء */
    
    display: flex; /* لمركزية محتوى النافذة */
    justify-content: center;
    
    /* الإخفاء الافتراضي والتحريك */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* حاوية المحتوى الرئيسية للنافذة */
/* ========================================================= */
/*   Modal Animation - (Slide From Top)                      */
/* ========================================================= */

/* حاوية المحتوى الرئيسية للنافذة */
.modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px; /* يمكنك تعديل هذا حسب رغبتك */

    /* [الخطوة 1: الوضعية والتصميم] */
    margin-top: 0;         /* إزالة الهامش العلوي التلقائي */
    margin-bottom: auto;   /* يدفع النافذة للأعلى (عكس margin-top) */
    
    /* تغيير حواف الـ radius لتناسب الفتح من الأعلى */
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    border-top-left-radius: 0;   /* إزالة الحواف العلوية */
    border-top-right-radius: 0;
    
    box-shadow: 0 5px 30px rgba(0,0,0,0.15); /* عكس اتجاه الظل */
    
    /* [الخطوة 2: التحريك (Animation)] */
    /* transform: translateY(-100%);  <-- إزاحة المحتوى بالكامل للأعلى */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* .modal-overlay.active .modal-content {
    transform: translateY(0); 
} */

/* تعديل بسيط على نافذة البحث لتتكيف */
.search-modal-content {
    height: auto; /* السماح للمحتوى بتحديد الارتفاع */
    border-radius: 0 0 20px 20px; /* جعلها متناسقة */
    max-width: 600px; /* عرض أكبر قليلاً للبحث على سطح المكتب */
    margin: 0 auto; /* للتأكد من أنها في المنتصف أفقياً */
}

/* -- تصميم نافذة الخدمات (Services Modal) -- */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}
.modal-header .header-actions { display: flex; gap: 15px; }
.modal-close-btn, .modal-header .header-actions a {
    font-size: 24px;
    color: #333;
    background: none; border: none; cursor: pointer;
}

.modal-body {
    padding: 20px;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 أعمدة */
    gap: 20px;
}
.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
}
.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: 600; /* لخط كلمة TAXI */
    transition: background-color 0.2s;
}
.service-item:hover .service-icon {
    background-color: #e4e6eb;
}
.service-item span {
    font-size: 0.8rem;
    font-weight: 500;
}


/* -- تصميم نافذة البحث (Search Modal) -- */
.search-modal-content {
    max-width: 100%; /* اجعل نافذة البحث تأخذ كامل العرض */
    border-radius: 0;
    margin-top: 0;
    height: 100vh;
}
.search-modal-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
    padding: 10px 15px;
}
.search-modal-input-wrapper i { font-size: 22px; color: #888; }
#modal-search-input {
    flex-grow: 1;
    border: none;
    background: none;
    font-size: 1.1rem;
    padding: 10px 0;
}
#modal-search-input:focus { outline: none; }
/* =================================== */
/* ====== Action Sheet Modal CSS ===== */
/* =================================== */

.action-sheet-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}
.action-sheet-content {
    width: 100%;
    max-width: 100%;
    margin-top: auto;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding-bottom: env(safe-area-inset-bottom, 20px); /* مساحة آمنة للآيفون */
}
.drag-handle {
    width: 40px; height: 4px; background: #ccc;
    border-radius: 2px; margin: 10px auto;
}
.share-to-users-section, .action-grid {
    padding: 10px 15px;
}
.share-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;}
.share-header h4 { font-size: 1rem; font-weight: 700; margin: 0; }
.share-header a { font-size: 0.9rem; font-weight: 600; text-decoration: none; color: #007bff; }
.users-scroller { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; /* Hide scrollbar... */ }
.user-share-item { text-align: center; text-decoration: none; color: #333; }
.user-share-item img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; margin-bottom: 5px; }
.user-share-item span { font-size: 0.75rem; font-weight: 500; }
.action-grid { display: flex; overflow-x: auto; padding-bottom: 10px; }
.action-grid.internal-actions { flex-wrap: wrap; /* السماح بتعدد الصفوف */ }
.action-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: #333; text-align: center; min-width: 80px; }
.action-item .action-icon { width: 50px; height: 50px; border-radius: 50%; background: #f0f2f5; display: flex; justify-content: center; align-items: center; font-size: 22px; color: #111; }
.action-item span { font-size: 0.75rem; font-weight: 500; }
.action-item.colorful .whatsapp { background-color: #25D366; color: white;}
.action-item.colorful .telegram { background-color: #0088cc; color: white;}
.action-item.colorful .snapchat { background-color: #FFFC00; color: black;}
.action-item.colorful .copy-link { background-color: #007bff; color: white;}
.action-item.colorful .repost { background-color: #ff9800; color: white;}
.action-divider { border: none; height: 6px; background-color: #f0f2f5; margin: 10px 0;}
.action-item.action-delete { cursor: pointer; } /* Make the delete anchor look clickable */


.mini-cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 15px;

}
.mini-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}
.mini-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
}
.mini-cart-item .item-details h4 {
    font-size: 0.9em;
    margin-bottom: 3px;
}
.mini-cart-item .item-details p {
    font-size: 0.8em;
    color: var(--secondary-color);
}
.mini-cart-item .item-quantity input {
    width: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.mini-cart-item .remove-from-cart-btn {
    margin-right: auto;
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.1em;
}

/* حاوية عناصر السلة (مع شريط تمرير) */
.mini-cart-items {
    flex-grow: 1;
    overflow-y: auto; /* إضافة شريط تمرير تلقائي إذا زادت العناصر */
    padding: 15px 20px;
}


/* تصميم كل عنصر داخل السلة */
.mini-cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.mini-cart-item:last-child {
    border-bottom: none;
}
.mini-cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 15px; /* مسافة لليسار لأننا في وضع RTL */
}
.mini-cart-item .item-details {
    flex-grow: 1;
}
.mini-cart-item .item-details h4 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 5px;
    color: #222;
}
.mini-cart-item .item-details p {
    font-size: 0.9rem;
    color: #777;
    margin: 0;
}
.mini-cart-item .item-quantity input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    margin: 0 10px;
}
.close-mini-cart-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    padding: 5px;
}

.mini-cart-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px;
    max-width: 90%;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
    display: flex
;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1050;
    direction: rtl;
}
.mini-cart-sidebar.active {
    transform: translateX(0);
}
.mini-cart-sidebar.active {
    left: 0;
}
.mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9e9e9;
  position: relative;
}
.mini-cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}
.mini-cart-header h3 i {
    margin-left: 8px;
}
.mini-cart-sidebar .close-mini-cart-btn{
    position: relative;
    top: 5px !important;

}
.mini-cart-sidebar h3 {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}
.mini-cart-sidebar.active {
    padding-top: 0 !important;
}
/* ============================================== */
/* ===   Styling for Side Modal (Wallet)    === */
/* ============================================== */

/* -- الخصائص العامة للموديل -- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.modal-overlay.active {
    opacity: 1; visibility: visible;
    transition: opacity 0.3s ease;
}
.modal.side-modal {
    position: fixed;
    top: 0;
    right: 0; /* يبدأ من اليمين (للمواقع العربية) */
    width: 400px; /* عرض مناسب */
    max-width: 90%;
    height: 100%;
    background-color: #f7f9fc; /* خلفية رمادية فاتحة جداً */
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    
    transform: translateX(100%); /* إخفاء الموديل خارج الشاشة إلى اليمين */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.modal.side-modal.active {
    transform: translateX(0); /* تحريك الموديل ليظهر */
}

/* -- تنسيقات محتوى الموديل -- */
.side-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    border-bottom: 1px solid #e9e9e9;
}
.side-modal .modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}
.side-modal .close-modal-btn {
    background: none; border: none; font-size: 24px; cursor: pointer; color: #888;
}

.side-modal .modal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}


/* -- كارت الرصيد -- */
.wallet-balance-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}
.wallet-balance-card small {
    font-size: 0.9rem;
}
.wallet-balance-card .balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 5px 0 15px;
}
.wallet-balance-card .balance-amount .currency {
    font-size: 1.2rem;
    font-weight: 500;
}
.balance-actions {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}
.btn-wallet-action {
    background: none; border: none;
    cursor: pointer; color: #555;
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; font-weight: 500; font-size: 0.8rem;
}
.btn-wallet-action i {
    font-size: 20px;
}


/* -- قائمة المعاملات -- */
.wallet-transactions h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}
.transaction-item {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.transaction-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: #fff; margin-left: 12px; /* For RTL */
}
.transaction-item.incoming .transaction-icon { background-color: #28a745; }
.transaction-item.outgoing .transaction-icon { background-color: #dc3545; }
.transaction-details {
    flex-grow: 1;
}
.transaction-details .desc {
    display: block;
    font-weight: 500;
}
.transaction-details .date {
    font-size: 0.8rem; 
}
.transaction-amount {
    font-weight: 600;
}
.transaction-item.incoming .transaction-amount { color: #28a745; }
.transaction-item.outgoing .transaction-amount { color: #dc3545; }
.fa-heart.fas.liked{
        color: red;
}