/* Main CSS File for DevSouq */

/* =====================
   Unified Color Variables
   ===================== */
:root {
    --primary: #3c5f90;
    --primary-dark: #1e1d6b;
    --primary-color: #3c5f90;
    --secondary: #a3b8d8;
    --secondary-color: #a3b8d8;
    --success: #3edb8b;
    --success-color: #3edb8b;
    --danger: #ff6b6b;
    --danger-color: #ff6b6b;
    --warning: #ffd166;
    --warning-color: #ffd166;
    --info: #6ec1e4;
    --info-color: #6ec1e4;
    --accent: #ffd166;
    --background: #f4f7fa;
    --glass-bg: rgba(255,255,255,0.18);
    --glass-border: rgba(255,255,255,0.35);
    --glass-blur: 18px;
    --card-bg: rgba(255,255,255,0.38);
    --border: #e5e7eb;
    --border-color: #e5e7eb;
    --text: #222;
    --text-color: #222;
    --text-light: #666;
    --text-light-color: #666;
    --topbar-bg: linear-gradient(90deg, #3c5f90 20%, #1e1d6b 80%);
    --topbar-text: #fff;
}

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

html, body {
    height: 100%;
    background: var(--background);
    color: var(--text);
    font-family: 'Tajawal', 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    position: relative;
}

body {
    font-size: 14px;
    line-height: 1.5;
    direction: ltr;
}

body.rtl {
    direction: rtl;
    text-align: right;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style-position: inside;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    box-shadow: 0 4px 24px rgba(106,17,203,0.10);
    border-bottom: 2px solid #fff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 0 0 2.5em 2.5em;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: 0 8px 32px rgba(106,17,203,0.13);
    background-clip: padding-box;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo a {
    color: white;
    text-decoration: none;
}

.logo img {
    max-height: 40px;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 5px 0;
    position: relative;
    transition: all 0.3s ease;
}

.main-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-nav a:hover:after,
.main-nav a.active:after {
    transform: scaleX(1);
}

.rtl .main-nav li {
    margin-left: 0;
    margin-right: 20px;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        margin: 10px 0;
    }
    
    .mobile-nav-toggle {
        display: block;
    }

    /* تم إزالة position:fixed من القوائم المنسدلة لإصلاح مشكلة الظهور */
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        left: 0;
        right: auto;
        top: 100%;
        min-width: 180px;
        max-width: 95vw;
        margin-top: 8px;
        z-index: 1100;
        transform: none !important;
    }
    body.rtl .navbar-nav .dropdown-menu, html[dir="rtl"] .navbar-nav .dropdown-menu {
        right: 0;
        left: auto;
    }
}

/* Hero Section */
.hero {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
}

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

.hero-buttons .btn {
    min-width: 150px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: rgba(52, 152, 219, 0.95);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: background 0.3s, box-shadow 0.3s, color 0.3s;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
}

.btn:hover {
    background-color: rgba(44, 62, 80, 0.95);
    box-shadow: 0 4px 16px rgba(44,62,80,0.13);
}

.btn-primary {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.15);
    transition: background 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #2575fc 0%, #6a11cb 100%);
    box-shadow: 0 4px 16px rgba(67, 233, 123, 0.25);
}

.btn-secondary {
    background: linear-gradient(90deg, #ff6a88 0%, #ffb86c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(255,106,136,0.10);
    border-radius: 1.2em;
    position: relative;
    overflow: hidden;
}

.btn-secondary:after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: 0 0 16px 4px rgba(255,106,136,0.13);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 1.2em;
    pointer-events: none;
}

.btn-secondary:hover, .btn-secondary:focus {
    background: linear-gradient(90deg, #ffb86c 0%, #ff6a88 100%);
    box-shadow: 0 8px 32px rgba(255,106,136,0.18);
    transform: translateY(-2px) scale(1.04);
}

.btn-secondary:hover:after, .btn-secondary:focus:after {
    opacity: 1;
}
    .btn-outline-primary {
    background: linear-gradient(90deg, #ff6a88 0%, #ffb86c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(255,106,136,0.10);
    border-radius: 1.2em;
    position: relative;
    overflow: hidden;
}

.btn-outline-primary:after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: 0 0 16px 4px rgba(255,106,136,0.13);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 1.2em;
    pointer-events: none;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background: linear-gradient(90deg, #ffb86c 0%, #ff6a88 100%);
    box-shadow: 0 8px 32px rgba(255,106,136,0.18);
    transform: translateY(-2px) scale(1.04);
}

.btn-outline-primary:hover:after, .btn-outline-primary:focus:after {
    opacity: 1;
}


.btn-lg {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.15);
    transition: background 0.3s, box-shadow 0.3s;
}

.btn-lg:hover {
  background: linear-gradient(90deg, #2575fc 0%, #6a11cb 100%);
    box-shadow: 0 4px 16px rgba(67, 233, 123, 0.25);
}

.btn-outline-light {
    background: linear-gradient(90deg, #ff6a88 0%, #ffb86c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(255,106,136,0.10);
    border-radius: 1.2em;
    position: relative;
    overflow: hidden;
}

.btn-outline-light:after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: 0 0 16px 4px rgba(255,106,136,0.13);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 1.2em;
    pointer-events: none;
}

.btn-outline-light:hover, .btn-outline-light:focus {
    background: linear-gradient(90deg, #ffb86c 0%, #ff6a88 100%);
    box-shadow: 0 8px 32px rgba(255,106,136,0.18);
    transform: translateY(-2px) scale(1.04);
}

.btn-outline-light:hover:after, .btn-outline-light:focus:after {
    opacity: 1;
}

.btn-accent {
    background: linear-gradient(90deg, #e74c3c 0%, #f7971e 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(231,76,60,0.10);
}

.btn-accent:hover, .btn-accent:focus {
    background: linear-gradient(90deg, #f7971e 0%, #e74c3c 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(231,76,60,0.13);
    transform: translateY(-2px) scale(1.03);
}




.btn-warning {
    background: linear-gradient(90deg, #ff6a88 0%, #ffb86c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(255,106,136,0.10);
    border-radius: 1.2em;
    position: relative;
    overflow: hidden;
}

.btn-warning:after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: 0 0 16px 4px rgba(255,106,136,0.13);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 1.2em;
    pointer-events: none;
}

.btn-warning:hover, .btn-warning:focus {
    background: linear-gradient(90deg, #ffb86c 0%, #ff6a88 100%);
    box-shadow: 0 8px 32px rgba(255,106,136,0.18);
    transform: translateY(-2px) scale(1.04);
}

.btn-warning:hover:after, .btn-warning:focus:after {
    opacity: 1;
}
    .btn-outline-primary {
    background: linear-gradient(90deg, #ff6a88 0%, #ffb86c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(255,106,136,0.10);
    border-radius: 1.2em;
    position: relative;
    overflow: hidden;
}

.btn-danger {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.15);
    transition: background 0.3s, box-shadow 0.3s;
}

.btn-danger:hover {
  background: linear-gradient(90deg, #2575fc 0%, #6a11cb 100%);
    box-shadow: 0 4px 16px rgba(67, 233, 123, 0.25);
}
.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Section Styles */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-weight: 800;
    font-size: 2.1rem;
    color: #1e3c72;
    margin-bottom: 1.2rem;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #4fc3f7 0%, #1976d2 100%);
    border-radius: 2px;
    margin-top: 8px;
    margin-left: 0;
}

.rtl .section-title:after {
    left: auto;
    right: 0;
}

/* Cards */
.card, .project-card, .template-card, .book-card, .course-card, .tool-card, .category-card, .form-card {
    border-radius: 18px !important;
    box-shadow: 0 4px 24px rgba(44,62,80,0.10), 0 1.5px 6px rgba(44,62,80,0.04);
    transition: box-shadow 0.3s, transform 0.3s;
    border: none;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 32px 0 rgba(34, 58, 95, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #223a5f;
}

.card:hover, .project-card:hover, .template-card:hover, .book-card:hover, .course-card:hover, .tool-card:hover, .category-card:hover, .form-card:hover {
    box-shadow: 0 12px 32px rgba(44,62,80,0.16), 0 2px 8px rgba(44,62,80,0.08);
    transform: translateY(-4px) scale(1.02);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.card-description {
    color: var(--text-light);
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.card-price {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 18px;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    transition: box-shadow 0.2s, background 0.2s;
    box-shadow: 0 1px 4px rgba(44,62,80,0.04);
}

.form-control:focus {
    outline: none;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 0 0 2px rgba(52,152,219,0.18), 0 2px 8px rgba(44,62,80,0.10);
}

.form-text {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 5px;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.form-check-input {
    margin-right: 10px;
}

.rtl .form-check-input {
    margin-right: 0;
    margin-left: 10px;
}

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-left-color: var(--success-color);
    color: #27ae60;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-left-color: var(--warning-color);
    color: #f39c12;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    border-left-color: var(--danger-color);
    color: #e74c3c;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    border-left-color: var(--info-color);
    color: #3498db;
}

.rtl .alert {
    border-left: none;
    border-right: 4px solid transparent;
}

.rtl .alert-success {
    border-right-color: var(--success-color);
}

.rtl .alert-warning {
    border-right-color: var(--warning-color);
}

.rtl .alert-danger {
    border-right-color: var(--danger-color);
}

.rtl .alert-info {
    border-right-color: var(--info-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 30px 0;
}

.pagination li {
    margin: 0 5px;
}

.pagination a {
    display: block;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination li.active a {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* Footer */
.footer {
    background: rgba(44,62,80,0.92);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 -2px 12px rgba(44,62,80,0.08);
    padding: 40px 0 20px;
    border-radius: 0 0 22px 22px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-description {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-heading {
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--secondary-color);
}

.rtl .footer-heading:after {
    left: auto;
    right: 0;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Social Media Icons */
.social-icons {
    display: flex;
    gap: 10px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: background-color 0.3s ease;
}

.social-icon:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Category Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    background-color: var(--secondary-color);
    color: white;
}

.badge-primary {
    background: linear-gradient(90deg, #4fc3f7 0%, #1976d2 100%);
    color: #fff;
}

.badge-secondary {
    background: linear-gradient(90deg, #f7971e 0%, #ffd200 100%);
    color: #222;
}

.badge-accent {
    background: linear-gradient(90deg, #e74c3c 0%, #f7971e 100%);
    color: #fff;
}

.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
}

.badge-info {
    background-color: var(--info-color);
}

/* Rating Stars */
.stars {
    color: var(--warning-color);
    font-size: 14px;
}

/* Product Details Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.product-image {
    border-radius: 8px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: auto;
}

.product-info h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
}

.product-rating .stars {
    margin-right: 5px;
}

.rtl .product-rating .stars {
    margin-right: 0;
    margin-left: 5px;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.product-description {
    margin-bottom: 30px;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.product-tabs {
    margin-top: 40px;
}

.product-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.product-tabs-nav button {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-tabs-nav button.active {
    border-bottom-color: var(--secondary-color);
    color: var(--secondary-color);
}

.product-tab-content {
    display: none;
}

.product-tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
}

/* User Profile Page */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-info h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.profile-stats {
    margin-top: 10px;
    display: flex;
    gap: 15px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card-icon {
    font-size: 30px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
}

.stat-card-value {
    font-size: 24px;
    font-weight: bold;
}

.stat-card-label {
    color: var(--text-light);
    font-size: 14px;
}

.stat-card.primary .stat-card-icon {
    background-color: var(--primary-color);
}

.stat-card.secondary .stat-card-icon {
    background-color: var(--secondary-color);
}

.stat-card.success .stat-card-icon {
    background-color: var(--success-color);
}

.stat-card.warning .stat-card-icon {
    background-color: var(--warning-color);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.rtl .table th,
.rtl .table td {
    text-align: right;
}

.table th {
    background-color: #7292b2;
    font-weight: 600;
}

.table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: rgba(255,255,255,0.92);
    box-shadow: 0 8px 32px rgba(44,62,80,0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 28px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-light);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.rtl .text-right {
    text-align: left;
}

.mb-1 {
    margin-bottom: 5px;
}

.mb-2 {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mb-4 {
    margin-bottom: 20px;
}

.mb-5 {
    margin-bottom: 30px;
}

.mt-1 {
    margin-top: 5px;
}

.mt-2 {
    margin-top: 10px;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 20px;
}

.mt-5 {
    margin-top: 30px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}


/* Resume Page Styles */
.resume-page {
    background-color: #f8f9fa;
}

.resume-hero {
    background: linear-gradient(135deg, #1e5799, #207cca);
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.resume-hero:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,261.3C672,256,768,224,864,218.7C960,213,1056,235,1152,229.3C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
    background-size: cover;
}

.avatar-container {
    text-align: center;
    position: relative;
    z-index: 1;
}

.avatar-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.avatar-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 5px solid rgba(255, 255, 255, 0.3);
}

.avatar-placeholder i {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.6);
}

.hero-content {
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.hero-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 800px;
}

.hero-buttons .btn {
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 50px;
    font-weight: 500;
}

.contact-section {
    padding: 1.5rem 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.contact-item i {
    font-size: 1.2rem;
    margin-right: 15px;
    color: #1e5799;
    width: 30px;
    text-align: center;
}

.contact-item span {
    font-size: 1rem;
    color: #444;
}

.resume-main {
    padding: 3rem 0;
}

.resume-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: #1e5799;
}

.resume-item {
    margin-bottom: 2rem;
    position: relative;
    padding-left: 30px;
}

.resume-item:before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1e5799;
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(30, 87, 153, 0.2);
}

.resume-item:after {
    content: "";
    position: absolute;
    left: 7px;
    top: 26px;
    bottom: -20px;
    width: 2px;
    background: #e0e0e0;
}

.resume-item:last-child:after {
    display: none;
}

.item-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: #666;
}

.company, .degree {
    font-weight: 500;
    color: #1e5799;
}

.date {
    background: #f0f7ff;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.resume-content {
    line-height: 1.7;
    color: #555;
}

.subsection-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #444;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.course-list, .certificate-list {
    list-style: none;
    padding-left: 0;
}

.course-item, .certificate-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f5f5f5;
}

.course-item:last-child, .certificate-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.course-header, .certificate-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.3rem;
}

.course-name, .certificate-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.course-provider, .certificate-issuer {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.course-date, .certificate-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.course-description, .certificate-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.certificate-download {
    margin-top: 0.8rem;
}

.certificate-download .btn {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
}

.resume-side-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.skills-container {
    margin-top: 1rem;
}

.skill-item {
    margin-bottom: 1.2rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.skill-name {
    font-weight: 500;
    color: #333;
}

.skill-level {
    color: #1e5799;
    font-weight: 500;
}

.progress {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #1e5799, #2989d8);
}

.languages-container {
    margin-top: 1rem;
}

.language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.language-item:last-child {
    border-bottom: none;
}

.language-name {
    font-weight: 500;
    color: #333;
}

.language-level {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.resume-files {
    margin-top: 1rem;
}

.resume-file-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.resume-file-item:last-child {
    border-bottom: none;
}

.resume-file-item i {
    font-size: 1.8rem;
    color: #e74c3c;
    margin-right: 15px;
}

.file-info {
    flex: 1;
}

.file-info a {
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 0.2rem;
    transition: color 0.3s;
}

.file-info a:hover {
    color: #1e5799;
}

.file-info small {
    font-size: 0.8rem;
    color: #888;
}

.contact-info .contact-item {
    padding: 0.7rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.contact-info .contact-item:last-child {
    border-bottom: none;
}

.social-links {
    display: flex;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f7ff;
    color: #1e5799;
    margin-right: 10px;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-link:hover {
    background: #1e5799;
    color: white;
    transform: translateY(-3px);
}

.empty-section, .empty-subsection {
    text-align: center;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    color: #777;
}

.empty-section i, .empty-subsection i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.empty-section p, .empty-subsection p {
    margin: 0;
    font-size: 1.1rem;
}

/* RTL support */
[dir="rtl"] .section-title i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .resume-item {
    padding-left: 0;
    padding-right: 30px;
}

[dir="rtl"] .resume-item:before {
    left: auto;
    right: 0;
}

[dir="rtl"] .resume-item:after {
    left: auto;
    right: 7px;
}

[dir="rtl"] .contact-item i {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .social-links .social-link {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .resume-file-item i {
    margin-right: 0;
    margin-left: 15px;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .item-meta {
        flex-direction: column;
    }
    
    .date {
        margin-top: 0.3rem;
        align-self: flex-start;
    }
}

@media (max-width: 767px) {
    .resume-hero {
        padding: 2rem 0;
    }
    
    .avatar-container {
        margin-bottom: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .resume-section, .resume-side-section {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}


/* Site Intro Section Styles */
.site-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.site-intro .site-logo {
    border: 3px solid #0d6efd;
    border-radius: 50%;
    padding: 10px;
    display: inline-block;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.site-intro .site-name {
    font-weight: 700;
    color: #0d6efd;
    font-size: 1.8rem;
    margin-top: 15px;
}

.site-intro .intro-title {
    font-weight: 800;
    color: #212529;
    position: relative;
    padding-bottom: 15px;
}

.site-intro .intro-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: #0d6efd;
    border-radius: 2px;
}

.site-intro .intro-description p {
    font-size: 1.1rem;
    color: #495057;
    line-height: 1.8;
}

.site-intro .features-title {
    font-weight: 700;
    color: #212529;
    border-left: 4px solid #0d6efd;
    padding-left: 15px;
}

.site-intro .feature-list {
    list-style: none;
    padding: 0;
}

.site-intro .feature-list li {
    padding: 8px 0;
    font-size: 1.05rem;
    color: #495057;
}

.intro-cta .btn {
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.intro-cta .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .site-intro .site-logo {
        max-width: 120px;
    }
    
    .site-intro .site-name {
        font-size: 1.5rem;
    }
    
    .site-intro .intro-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 767px) {
    .site-intro .intro-content {
        text-align: center;
    }
    
    .site-intro .intro-title:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .site-intro .features-title {
        border-left: none;
        text-align: center;
        padding-left: 0;
    }
    
    .site-intro .feature-list {
        text-align: left;
        padding-left: 20px;
    }
    
    .intro-cta .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}
/* Site Intro Section Styles */
.site-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.site-intro:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Q75,50 0,100 Z" fill="rgba(13, 110, 253, 0.05)"/></svg>') no-repeat;
    background-size: cover;
    opacity: 0.7;
}

.site-intro .site-logo {
    border: 3px solid #0d6efd;
    border-radius: 50%;
    padding: 10px;
    display: inline-block;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.site-intro .site-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.site-intro .site-name {
    font-weight: 700;
    color: #0d6efd;
    font-size: 1.8rem;
    margin-top: 15px;
    position: relative;
    display: inline-block;
}

.site-intro .site-name:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0d6efd;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.site-intro .site-name:hover:after {
    transform: scaleX(1);
}

.site-intro .intro-title {
    font-weight: 800;
    color: #212529;
    position: relative;
    padding-bottom: 15px;
}

.site-intro .intro-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: #0d6efd;
    border-radius: 2px;
}

.site-intro .intro-description p {
    font-size: 1.1rem;
    color: #495057;
    line-height: 1.8;
}

.site-intro .features-title,
.site-intro .services-title {
    font-weight: 700;
    color: #212529;
    border-left: 4px solid #0d6efd;
    padding-left: 15px;
    margin-top: 25px;
}

.site-intro .feature-list {
    list-style: none;
    padding: 0;
}

.site-intro .feature-list li {
    padding: 8px 0;
    font-size: 1.05rem;
    color: #495057;
    position: relative;
    padding-left: 30px;
}

.site-intro .feature-list li i {
    position: absolute;
    left: 0;
    top: 10px;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
}

.service-card:hover h4 {
    color: white;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #0d6efd;
}

.service-card:hover .service-icon {
    color: white;
}

.service-card h4 {
    font-size: 1.1rem;
    margin: 0;
    color: #343a40;
}

.intro-cta .btn {
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.intro-cta .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

/* RTL support */
html[dir="rtl"] .site-intro .intro-title:after,
html[dir="rtl"] .site-intro .features-title,
html[dir="rtl"] .site-intro .services-title {
    border-left: none;
    border-right: 4px solid #0d6efd;
    padding-left: 0;
    padding-right: 15px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .site-intro .site-logo {
        max-width: 120px;
    }
    
    .site-intro .site-name {
        font-size: 1.5rem;
    }
    
    .site-intro .intro-title {
        font-size: 1.8rem;
    }
    
    .site-intro:before {
        width: 60%;
    }
}

@media (max-width: 767px) {
    .site-intro .intro-content {
        text-align: center;
    }
    
    .site-intro .intro-title:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .site-intro .features-title,
    .site-intro .services-title {
        border-left: none;
        text-align: center;
        padding-left: 0;
    }
    
    .site-intro .feature-list {
        text-align: left;
        padding-left: 20px;
    }
    
    .intro-cta .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .site-intro:before {
        width: 100%;
        opacity: 0.3;
    }
}

/* لمسات عصرية طفيفة */

/* تأثير ظل خفيف للبطاقات والأزرار */
.card, .btn, .form-control, .dropdown-menu, .navbar, .modal {
  box-shadow: 0 2px 12px rgba(44,62,80,0.07);
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.card:hover, .btn:hover, .dropdown-menu.show, .modal.show {
  box-shadow: 0 6px 24px rgba(44,62,80,0.13);
}

/* حواف دائرية أكثر */
.card, .btn, .form-control, .dropdown-menu, .modal {
  border-radius: 1rem !important;
}

/* تأثير hover للأزرار */
.btn {
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:hover, .btn:focus {
  filter: brightness(1.07);
  box-shadow: 0 4px 16px rgba(44,62,80,0.10);
}

/* تأثير hover للروابط */
a, .nav-link {
  transition: color 0.18s, text-decoration 0.18s;
}
a:hover, .nav-link:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

/* تحسين input وform */
.form-control {
  border: 1.5px solid #e0e6ed;
  padding: 0.7rem 1rem;
  font-size: 1.05rem;
  background: #f9fafd;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52,152,219,0.10);
}

/* تحسين القوائم المنسدلة */
.dropdown-menu {
  border: 1px solid #e0e6ed;
  padding: 0.5rem 0.2rem;
  animation: dropdownFadeIn 0.25s cubic-bezier(.4,0,.2,1);
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* تحسين navbar */
.navbar {
  box-shadow: 0 2px 8px rgba(44,62,80,0.06);
  border-radius: 0 0 1.2rem 1.2rem;
}

/* تباعد عصري */
.section, .main-content, .container, .footer, .header {
  padding-bottom: 1.5rem;
  padding-top: 1.5rem;
}

/* تحسين مظهر الشارات */
.badge {
  border-radius: 0.7em;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.45em 0.8em;
  font-size: 0.95em;
  box-shadow: 0 1px 4px rgba(44,62,80,0.07);
}

/* تحسين مظهر التولتيب */
.tooltip {
  border-radius: 0.6em;
  background: #222;
  color: #fff;
  padding: 0.5em 1em;
  font-size: 0.95em;
  box-shadow: 0 2px 8px rgba(44,62,80,0.13);
  opacity: 0.97;
}

/* 1. تأثيرات ظهور العناصر (Fade In/Up) */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.7s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: none;
  }
}

/* 2. تخصيص الـ scrollbar */
::-webkit-scrollbar {
  width: 8px;
  background: #f0f0f0;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: rgba(67, 233, 123, 0.25);
  border-radius: 8px;
  transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #1976d2 0%, #4fc3f7 100%);
}

/* 3. تأثير Ripple للأزرار */
.btn.ripple {
  position: relative;
  overflow: hidden;
}
.btn.ripple .ripple-effect {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.5s linear;
  background: rgba(44,62,80,0.18);
  pointer-events: none;
}
@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* 4. تحسين tooltips/popovers */
.tooltip, .popover {
  border-radius: 0.7em;
  background: #222;
  color: #fff;
  padding: 0.5em 1em;
  font-size: 0.95em;
  box-shadow: 0 2px 8px rgba(44,62,80,0.13);
  opacity: 0.97;
  animation: fadeInTooltip 0.22s cubic-bezier(.4,0,.2,1);
}
@keyframes fadeInTooltip {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 0.97; transform: none; }
}

/* 5. micro-interactions للأيقونات */
.icon-hover:hover {
  transform: scale(1.12) rotate(-3deg);
  transition: transform 0.18s;
}

/* 6. تأثير Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 37%, #f0f0f0 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.2s ease-in-out infinite;
  border-radius: 8px;
  min-height: 1em;
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* 7. تحسين الإشعارات (Notifications/Alerts) */
.alert {
  position: relative;
  animation: slideInAlert 0.5s cubic-bezier(.4,0,.2,1);
}
@keyframes slideInAlert {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: none; }
}
.alert .alert-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(44,62,80,0.07);
  color: #888;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
}
.alert .alert-close:hover {
  background: #e0e0e0;
  color: #e74c3c;
}

/* 8. تأثيرات subtle على الروابط النشطة */
.nav-link.active, .main-nav a.active {
  position: relative;
  background: rgba(52,152,219,0.08);
}
.nav-link.active:after, .main-nav a.active:after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 2px;
  animation: underlineActive 0.4s cubic-bezier(.4,0,.2,1);
}
@keyframes underlineActive {
  from { width: 0; opacity: 0; }
  to { width: 100%; opacity: 1; }
}

/* 9. زر العودة للأعلى */
#backToTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #3498db;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.13);
  z-index: 2000;
  cursor: pointer;
  transition: opacity 0.22s, transform 0.22s;
  opacity: 0.92;
}
#backToTop.show {
  display: flex;
  animation: fadeInBackToTop 0.3s cubic-bezier(.4,0,.2,1);
}
@keyframes fadeInBackToTop {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 0.92; transform: none; }
}

/* 10. تحسين modal (zoom-in) */
.modal {
  animation: modalZoomIn 0.32s cubic-bezier(.4,0,.2,1);
}
@keyframes modalZoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive for backToTop */
@media (max-width: 575px) {
  #backToTop {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* --- تحسين ألوان الأزرار --- */
.btn-primary {
       background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.15);
    transition: background 0.3s, box-shadow 0.3s;
}
.btn-primary:hover {
      background: linear-gradient(90deg, #2575fc 0%, #6a11cb 100%);
    box-shadow: 0 4px 16px rgba(67, 233, 123, 0.25);
}

.btn-secondary {
    background: linear-gradient(90deg, #ff6a88 0%, #ffb86c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(255,106,136,0.10);
    border-radius: 1.2em;
    position: relative;
    overflow: hidden;
}
.btn-secondary:after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: 0 0 16px 4px rgba(255,106,136,0.13);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 1.2em;
    pointer-events: none;
}
.btn-secondary:hover, .btn-secondary:focus {
    background: linear-gradient(90deg, #ffb86c 0%, #ff6a88 100%);
    box-shadow: 0 8px 32px rgba(255,106,136,0.18);
    transform: translateY(-2px) scale(1.04);
}
.btn-secondary:hover:after, .btn-secondary:focus:after {
    opacity: 1;
}

.btn-accent {
    background: linear-gradient(90deg, #e74c3c 0%, #f7971e 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(231,76,60,0.10);
}
.btn-accent:hover, .btn-accent:focus {
    background: linear-gradient(90deg, #f7971e 0%, #e74c3c 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(231,76,60,0.13);
    transform: translateY(-2px) scale(1.03);
}

/* --- تحسين البطاقات (Cards) --- */
.card, .project-card, .template-card, .book-card, .course-card, .tool-card, .category-card, .form-card {
    border-radius: 18px !important;
    box-shadow: 0 4px 24px rgba(44,62,80,0.10), 0 1.5px 6px rgba(44,62,80,0.04);
    transition: box-shadow 0.3s, transform 0.3s;
    border: none;
}
.card:hover, .project-card:hover, .template-card:hover, .book-card:hover, .course-card:hover, .tool-card:hover, .category-card:hover, .form-card:hover {
    box-shadow: 0 12px 32px rgba(44,62,80,0.16), 0 2px 8px rgba(44,62,80,0.08);
    transform: translateY(-4px) scale(1.02);
}

/* --- تحسين الخطوط --- */
body, .section-title, h1, h2, h3, h4, h5, .btn, .card-title {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.01em;
}

.section-title {
    font-weight: 800;
    font-size: 2.1rem;
    color: #1e3c72;
    margin-bottom: 1.2rem;
    position: relative;
}
.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #4fc3f7 0%, #1976d2 100%);
    border-radius: 2px;
    margin-top: 8px;
    margin-left: 0;
}

/* --- تحسين الروابط --- */
a {
    color: #1976d2;
    transition: color 0.2s;
}
a:hover {
    color: #e74c3c;
    text-decoration: underline;
}

/* --- تأثيرات عصرية على الصور --- */
img, .card-image img, .project-card-image img, .template-card-image img, .book-card-cover img, .course-card-image img {
    border-radius: 12px;
    transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover img, .project-card:hover .project-card-image img, .template-card:hover .template-card-image img, .book-card:hover .book-card-cover img, .course-card:hover .course-card-image img {
    box-shadow: 0 8px 32px rgba(44,62,80,0.18);
    transform: scale(1.04);
}

/* --- تحسين شريط التمرير --- */
::-webkit-scrollbar {
    width: 10px;
    background: #ecf0f1;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: rgba(67, 233, 123, 0.25);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #1976d2 0%, #4fc3f7 100%);
}

/* --- تحسينات طفيفة على عناصر الإدخال --- */
input, select, textarea, .form-control {
    border-radius: 0.7rem !important;
    border: 1.5px solid #dbeafe;
    background: #fafdff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus, .form-control:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 0 2px rgba(79,195,247,0.13);
}

/* --- تحسينات على البادجات --- */
.badge-primary {
    background: linear-gradient(90deg, #4fc3f7 0%, #1976d2 100%);
    color: #fff;
}
.badge-secondary {
    background: linear-gradient(90deg, #f7971e 0%, #ffd200 100%);
    color: #222;
}
.badge-accent {
    background: linear-gradient(90deg, #e74c3c 0%, #f7971e 100%);
    color: #fff;
}

/* --- تأثيرات انتقالية عامة --- */
*, *:before, *:after {
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.bg-dark{
      background: linear-gradient(90deg, #3c5f90 20%, #1e1d6b 80%);
    color: #ffffff;

}

/* إخفاء شريط البحث على الشاشات الصغيرة */
@media (max-width: 768px) {
.navbar-nav .dropdown-menu {
position:absolute;
}
}

.text-dark {
  color: #223a5f !important;
}
.text-light {
  color: #fff !important;
}
.modal-backdrop{
    background-color: none;
}
    .tool-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        border-radius: 10px;
        overflow: hidden;
    }

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

    .tool-card .card-img-top {
        height: 180px;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .tool-card:hover .card-img-top {
        transform: scale(1.05);
    }

    .tool-card-list {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        border-radius: 10px;
        overflow: hidden;
    }

    .tool-card-list:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    }

    .bg-info {
        background: linear-gradient(135deg, #1e5799, #207cca);
    }
    
    .pagination .page-item.active .page-link {
        background-color: #0d6efd;
        border-color: #0d6efd;
    }
    
    .pagination .page-link {
        color: #0d6efd;
    }
    
    .pagination .page-link:hover {
        background-color: #e9ecef;
    }
    
    .view-grid.active, .view-list.active {
        background-color: #0d6efd;
        color: white;
    }
    
    .badge {
        font-weight: 500;
    }
    
    .btn-success {
        background-color: #198754;
        border-color: #198754;
    }
    
    .btn-success:hover {
        background-color: #157347;
        border-color: #146c43;
    }
    
    /* Pagination styles */
    .pagination {
        margin-top: 30px;
    }
    
    .page-item .page-link {
        border-radius: 5px;
        margin: 0 3px;
        min-width: 38px;
        text-align: center;
    }
    
    .page-item.active .page-link {
        font-weight: bold;
    }
    
    .page-item.disabled .page-link {
        opacity: 0.6;
    }
    
    .page-link:focus {
        box-shadow: none;
    }
    
    /* View buttons */
    .view-buttons {
        margin-left: auto;
    }
    
    .view-buttons .btn {
        padding: 0.25rem 0.5rem;
    }

/* Glassmorphism background shapes */
body::before, body::after {
  content: '';
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(38px);
  opacity: 0.22;
}
body::before {
  width: 420px; height: 420px;
  left: -120px; top: -120px;
  background: linear-gradient(135deg, #1e1d6b 60%, #3c5f90 100%);
}
body::after {
  width: 340px; height: 340px;
  right: -100px; bottom: -100px;
  background: linear-gradient(135deg, #232f3e 40%, #1e1d6b 100%);
}

/* Subtle glass lines */
body::before, body::after, .glass-line {
  transition: background 0.4s;
}
.glass-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, rgba(60,95,144,0.08) 0%, rgba(30,29,107,0.18) 100%);
  opacity: 0.18;
  z-index: 1;
  pointer-events: none;
}

.topbar, .navbar, .admin-header, .footer, footer {
  background: var(--topbar-bg) !important;
  color: var(--topbar-text) !important;
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 2px 16px rgba(60,95,144,0.10);
  backdrop-filter: blur(var(--glass-blur));
  z-index: 10;
}

.card, .panel, .box, .content-box, .dashboard-card, .stat-box, .summary-box {
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 4px 32px rgba(60,95,144,0.13);
  border: 1.5px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: box-shadow 0.2s, border 0.2s;
  z-index: 1;
  position: relative;
}
.card:hover, .panel:hover, .box:hover, .content-box:hover, .dashboard-card:hover {
  box-shadow: 0 8px 40px rgba(60,95,144,0.22);
  border: 1.5px solid var(--primary);
}

/* Multi-color glass buttons - lighter, more vibrant */
.btn, button, input[type=submit] {
  border-radius: 8px;
  border: none;
  padding: 10px 28px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(60,95,144,0.10);
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  z-index: 2;
}
.btn-primary, .btn-main, .btn, button, input[type=submit] {
  background: linear-gradient(90deg, #5e7bbd 20%, #3c5f90 80%);
  color: #fff;
}
.btn-success {
  background: linear-gradient(90deg, #6ee7b7 20%, #3edb8b 80%);
  color: #fff;
}
.btn-danger {
  background: linear-gradient(90deg, #ffb3b3 20%, #ff6b6b 80%);
  color: #fff;
}
.btn-warning {
  background: linear-gradient(90deg, #ffe29a 20%, #ffd166 80%);
  color: #222;
}
.btn-info {
  background: linear-gradient(90deg, #b6e0fe 20%, #6ec1e4 80%);
  color: #222;
}
.btn-secondary {
  background: linear-gradient(90deg, #dbeafe 20%, #a3b8d8 80%);
  color: #222;
}
.btn:hover, button:hover, input[type=submit]:hover {
  filter: brightness(1.10) saturate(1.25);
  box-shadow: 0 4px 16px rgba(60,95,144,0.18);
  opacity: 0.97;
}

input, select, textarea {
  border-radius: 8px;
  border: 1.5px solid var(--glass-border);
  padding: 10px 14px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  transition: border 0.2s;
}
input:focus, select:focus, textarea:focus {
  border: 1.5px solid var(--primary);
  outline: none;
}

.table thead {
  background: var(--primary);
  color: #fff;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(60,95,144,0.08);
}

.sidebar, .admin-sidebar {
  background: var(--glass-bg);
  border-right: 1.5px solid var(--glass-border);
  box-shadow: 2px 0 16px rgba(60,95,144,0.09);
  backdrop-filter: blur(var(--glass-blur));
}

.nav-tabs .nav-link.active, .nav-pills .nav-link.active {
  background: var(--primary);
  color: #fff !important;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 8px rgba(60,95,144,0.10);
}

.nav-tabs .nav-link, .nav-pills .nav-link {
  color: var(--primary-dark);
  font-weight: 500;
}

.badge {
  border-radius: 10px;
  padding: 5px 14px;
  font-size: 1em;
  background: var(--glass-bg);
  box-shadow: 0 1px 4px rgba(60,95,144,0.08);
}

.copy-btn {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  border: none;
  padding: 6px 16px;
  font-size: 1em;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.2s;
  box-shadow: 0 1px 4px rgba(255,179,0,0.10);
}
.copy-btn:hover {
  background: #ff9800;
}

/* Glassmorphism for modals */
.modal-content {
  background: var(--glass-bg);
  border-radius: 18px;
  border: 1.5px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* Decorative glass overlays */
.glass-overlay {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 32px;
  background: linear-gradient(120deg, rgba(60,95,144,0.12) 40%, rgba(255,255,255,0.18) 100%);
  box-shadow: 0 8px 40px rgba(60,95,144,0.10);
  filter: blur(18px);
  opacity: 0.5;
}

/* Example usage: <div class="glass-overlay" style="top:40px;left:60px;width:200px;height:120px;"></div> */

/* --- إصلاح القوائم المنسدلة --- */
.dropdown-menu {
  z-index: 1050;
  min-width: 180px;
  max-width: 90vw;
  word-break: break-word;
  overflow-x: auto;
}
body.rtl .dropdown-menu {
  right: 0;
  left: auto;
  text-align: right;
  direction: rtl;
}

/* --- إصلاح القائمة الجانبية للشاشات الصغيرة --- */
.sidebar.open {
  left: 0 !important;
  right: auto !important;
  width: 260px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  z-index: 1200;
  transition: left 0.3s, right 0.3s;
}

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    right: auto;
    height: 100vh;
    width: 260px;
    z-index: 1200;
    background: var(--bs-light, #fff);
    transition: left 0.3s, right 0.3s;
  }
  .sidebar.open {
    left: 0;
  }
  body.rtl .sidebar {
    right: -260px;
    left: auto;
  }
  body.rtl .sidebar.open {
    right: 0;
    left: auto;
  }
}

.livechat-container {
    background-color: #f8f9fa;
    min-height: calc(100vh - 150px);
    padding: 30px 0;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.page-description {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.support-status {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-indicator.online .status-dot {
    background-color: #2ecc71;
}

.status-indicator.offline .status-dot {
    background-color: #e74c3c;
}

.status-text {
    font-weight: 600;
}

.working-hours {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.support-info-card, .recent-conversations-card, .faq-suggestions-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.card-header {
    background-color: #3498db;
    color: white;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 20px;
}

.support-option {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.support-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.option-icon {
    width: 50px;
    height: 50px;
    background-color: #f1f8ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.option-icon i {
    font-size: 1.5rem;
    color: #3498db;
}

.option-content {
    flex: 1;
}

.option-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.option-description {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.conversation-list {
    max-height: 300px;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #eee;
}

.conversation-item:hover {
    background-color: #f8f9fa;
    border-color: #3498db;
}

.conversation-item.closed {
    opacity: 0.7;
}

.conversation-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

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

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e0f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3498db;
    font-size: 1.2rem;
}

.conversation-content {
    flex: 1;
    position: relative;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.conversation-title {
    font-weight: 600;
    color: #2c3e50;
}

.conversation-time {
    font-size: 0.8rem;
    color: #95a5a6;
}

.conversation-preview {
    font-size: 0.9rem;
    color: #7f8c8d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-label {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #f1f2f6;
    color: #7f8c8d;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.status-label.closed {
    background: #ffefef;
    color: #e74c3c;
}

.faq-list .accordion-button {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 15px;
}

.faq-list .accordion-body {
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 15px 20px;
    color: #555;
}

.chat-widget {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.pre-chat-form {
    padding: 25px;
}

.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.form-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

.form-actions {
    margin-top: 20px;
    text-align: center;
}

.start-chat-btn {
    padding: 10px 25px;
    font-weight: 600;
}

.or-login {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.chat-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 15px 20px;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.operator-details {
    margin-left: 15px;
}

.operator-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.operator-status {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.action-btn {
    color: white;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: rgba(255,255,255,0.3);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafb;
    display: flex;
    flex-direction: column;
}

.chat-welcome {
    text-align: center;
    margin: auto;
    max-width: 500px;
    padding: 20px;
}

.welcome-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 20px;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.welcome-message {
    color: #7f8c8d;
    line-height: 1.6;
}

.message-item {
    margin-bottom: 15px;
    max-width: 80%;
    align-self: flex-start;
}

.message-item.user-message {
    align-self: flex-end;
}

.message-bubble {
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-message .message-bubble {
    background: #3498db;
    color: white;
    border-bottom-right-radius: 5px;
}

.operator-message .message-bubble {
    background: white;
    color: #2c3e50;
    border-bottom-left-radius: 5px;
    border: 1px solid #eee;
}

.system-message .message-content {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 10px 0;
}

.message-text {
    line-height: 1.5;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 5px;
    text-align: right;
}

.user-message .message-time {
    color: rgba(255,255,255,0.8);
}

.operator-message .message-time {
    color: #95a5a6;
}

.attachment-image {
    margin-bottom: 5px;
}

.attachment-image img {
    max-width: 250px;
    border-radius: 10px;
}

.attachment-file {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f1f8ff;
    border-radius: 8px;
}

.attachment-file i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #3498db;
}

.attachment-filename {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.chat-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    position: relative;
}

.input-group {
    display: flex;
}

.form-control {
    border-radius: 20px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.form-control:focus {
    box-shadow: none;
    border-color: #3498db;
}

.attachment-btn, .send-btn {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.send-btn {
    background: #3498db;
    border-color: #3498db;
}

.chat-typing {
    position: absolute;
    top: -35px;
    left: 15px;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    align-items: center;
}

.chat-typing.typing {
    display: flex;
}

.typing-dots {
    display: flex;
    margin-right: 8px;
}

.typing-dots .dot {
    width: 6px;
    height: 6px;
    background: #3498db;
    border-radius: 50%;
    margin: 0 2px;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dots .dot:nth-child(1) { animation-delay: 0s; }
.typing-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingAnimation {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

.typing-text {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.chat-feedback-form {
    padding: 25px;
}

.feedback-header {
    text-align: center;
    margin-bottom: 25px;
}

.feedback-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.feedback-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

.rating-stars {
    margin: 15px 0;
    text-align: center;
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #ddd;
    font-size: 1.8rem;
    padding: 0 3px;
    cursor: pointer;
    transition: color 0.3s;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #f1c40f;
}

.star-rating input:checked + label {
    color: #f1c40f;
}

.submit-feedback-btn {
    padding: 10px 25px;
    font-weight: 600;
}

.skip-btn {
    margin-left: 10px;
}

.chat-offline-message {
    text-align: center;
    padding: 40px 30px;
}

.offline-icon {
    font-size: 4rem;
    color: #95a5a6;
    margin-bottom: 20px;
}

.offline-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.offline-content {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.offline-actions .btn {
    margin: 0 8px;
    padding: 10px 25px;
}

@media (max-width: 992px) {
    .col-lg-4, .col-lg-8 {
        width: 100%;
    }
    
    .col-lg-4 {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        text-align: center;
    }
    
    .support-status {
        margin-top: 20px;
    }
    
    .chat-widget {
        height: auto;
        min-height: 500px;
    }
}

/* أنماط عامة */
.blog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--light-gray);
    height: 100%;
}

.blog-card:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-5px);
}

.blog-card .post-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.blog-card .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .post-image img {
    transform: scale(1.05);
}

.blog-card .post-content {
    padding: 1.5rem;
}

.blog-card .post-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.blog-card .post-title a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.blog-card .post-title a:hover {
    color: var(--primary);
}

.blog-card .post-meta {
    font-size: 0.9rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0.8rem;
}

.blog-card .post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card .post-excerpt {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-card .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}

.blog-card .post-tags a {
    display: inline-block;
    background: #f0f5ff;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
}

.blog-card .post-tags a:hover {
    background: var(--primary);
    color: white;
}

.blog-card .post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
}

/* الشريط الجانبي */
.blog-sidebar {
    position: sticky;
    top: 20px;
}

.blog-sidebar .widget {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--light-gray);
}

.blog-sidebar .widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary);
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-sidebar .widget-title i {
    color: var(--primary);
}

.blog-sidebar .category-list, 
.blog-sidebar .post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar .category-item, 
.blog-sidebar .post-item {
    margin-bottom: 0.7rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--light-gray);
}

.blog-sidebar .category-item:last-child, 
.blog-sidebar .post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.blog-sidebar .category-link {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    padding: 5px 0;
}

.blog-sidebar .category-link:hover, 
.blog-sidebar .category-link.active {
    color: var(--primary);
    font-weight: 600;
}

.blog-sidebar .category-link .badge {
    background: #f0f5ff;
    color: var(--primary);
}

.blog-sidebar .post-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.blog-sidebar .post-link:hover {
    color: var(--primary);
}

.blog-sidebar .post-link img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-sidebar .post-link .post-title {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

.blog-sidebar .tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-sidebar .tag-link {
    display: inline-block;
    background: #f0f5ff;
    color: var(--primary);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.95em;
    transition: var(--transition);
    text-decoration: none;
}

.blog-sidebar .tag-link.active, 
.blog-sidebar .tag-link:hover {
    background: var(--primary);
    color: #fff;
}

/* صفحة المنشور المفرد */
.blog-post-header {
    margin-bottom: 2.5rem;
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--light-gray);
}

.blog-post-header .post-featured-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.blog-post-header .post-featured-image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.blog-post-header .post-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 1rem;
}

.blog-post-header .post-meta {
    color: var(--gray);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.blog-post-header .post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-box {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f9faff;
    border-radius: var(--border-radius);
    border: 1px solid var(--light-gray);
}

.author-box img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1.5rem;
    border: 3px solid var(--primary);
}

.author-box .author-info {
    flex: 1;
}

.author-box .author-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

.author-box .author-bio {
    color: #555;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.author-box .author-stats {
    display: flex;
    gap: 20px;
}

.author-box .author-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
}

.blog-post-content {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.blog-post-content h2, 
.blog-post-content h3, 
.blog-post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.blog-post-content h2 {
    font-size: 1.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-gray);
}

.blog-post-content blockquote {
    border-left: 4px solid var(--primary);
    background: #f9faff;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
}

/* التعليقات */
.comments-section {
    margin-top: 3rem;
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--light-gray);
}

.comments-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.8rem;
    padding-bottom: 1.8rem;
    border-bottom: 1px solid var(--light-gray);
}

.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-avatar {
    flex-shrink: 0;
    margin-right: 1.2rem;
}

.comment-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-gray);
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
}

.comment-date {
    font-size: 0.9em;
    color: var(--gray);
}

.comment-text {
    line-height: 1.6;
    color: #444;
    margin-bottom: 0.8rem;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-actions .btn {
    padding: 3px 10px;
    font-size: 0.9rem;
}

.comment-replies {
    margin-left: 3rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--light-gray);
    margin-top: 1.5rem;
}

.comment-form-container {
    background: #f9faff;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
    border: 1px solid var(--light-gray);
}

.comment-form-container h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form-container .form-control {
    border-radius: var(--border-radius);
    padding: 12px 15px;
    border: 1px solid #ddd;
    transition: var(--transition);
}

.comment-form-container .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

/* أزرار إنشاء منشور جديد */
.create-post-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    z-index: 1000;
    transition: var(--transition);
    text-decoration: none;
}

.create-post-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
    color: white;
}

/* صفحة إنشاء منشور جديد */
.create-post-container {
    max-width: 900px;
    margin: 2rem auto;
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--light-gray);
}

.create-post-container h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

/* أنماط التجاوب */
@media (max-width: 992px) {
    .blog-card .post-image {
        height: 180px;
    }
    
    .blog-post-header .post-title {
        font-size: 1.8rem;
    }
    
    .author-box img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .blog-card .post-image {
        height: 160px;
    }
    
    .blog-post-header .post-featured-image img {
        max-height: 250px;
    }
    
    .blog-post-header .post-title {
        font-size: 1.6rem;
    }
    
    .blog-post-header .post-meta {
        font-size: 0.95rem;
        gap: 12px;
    }
    
    .comment-replies {
        margin-left: 1.5rem;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-box img {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .author-box .author-stats {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .blog-card .post-image {
        height: 140px;
    }
    
    .blog-post-header .post-featured-image img {
        max-height: 200px;
    }
    
    .comment-item {
        flex-direction: column;
    }
    
    .comment-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}