/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Sticky Logo Container */
.logo-container {
    position: sticky;
    top: 0;
    background-color: #f5f7fa;
    padding: 20px 0;
    text-align: center;
    z-index: 100;
    border-bottom: 1px solid #e1e8ed;
    margin-bottom: 20px;
}

.logo {
    font-family: 'Cairo', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    position: fixed;
    right: 20px;
    top: 20px;
    background: #2c3e50;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    z-index: 1001;
}

.menu-toggle:hover {
    background-color: #34495e;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: #2c3e50;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
    margin: 0 10px;
    border-radius: 8px;
}

.nav-link:hover {
    background-color: #34495e;
    transform: translateX(-5px);
}

.nav-link.active {
    background-color: #3498db;
    color: white;
}

.nav-link .icon {
    margin-left: 12px;
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.nav-link .text {
    font-size: 16px;
    font-weight: 500;
}

/* Main Content */
.main-content {
    margin-right: 250px;
    padding: 0 30px 30px 30px;
    min-height: 100vh;
    transition: margin-right 0.3s ease;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.main-content h2 {
    font-size: 32px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.main-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

/* Sample Content Cards */
.sample-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.card p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    text-align: right;
}

/* Overlay for Mobile */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .menu-toggle {
        display: flex;
    }
    
    /* Hide sidebar by default on mobile */
    .sidebar {
        transform: translateX(100%);
        width: 280px;
        top: 0;
    }
    
    /* Show sidebar when active */
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Adjust main content for mobile */
    .main-content {
        margin-right: 0;
        padding: 0 20px 20px 20px;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Adjust logo for mobile */
    .logo {
        font-size: 26px;
    }
    
    .logo-container {
        padding: 15px 0;
    }
    
    /* Adjust cards for mobile */
    .sample-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .main-content h2 {
        font-size: 26px;
    }
    
    .main-content p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 22px;
    }
    
    .logo-container {
        padding: 12px 0;
    }
    
    .sidebar {
        width: 100%;
        max-width: 300px;
        height: 100vh;
    }
    
    .main-content {
        padding: 0 15px 15px 15px;
    }
    
    .main-content h2 {
        font-size: 22px;
    }
    
    .main-content p {
        font-size: 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    .card h3 {
        font-size: 18px;
    }
    
    .card p {
        font-size: 14px;
    }
    
    .nav-link {
        padding: 12px 15px;
    }
    
    .nav-link .text {
        font-size: 15px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #2c3e50;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

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

/* Focus styles for accessibility */
.nav-link:focus,
.menu-toggle:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Animation for content loading */
.main-content {
    animation: fadeIn 0.5s ease-in;
}

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

