/* ================= VARIABLES ================= */
:root {
    /* الحفاظ على المتغيرات القديمة */
    --primary-color: #0066cc;
    --secondary-color: #00a8ff;
    --accent-color: #ff6b6b;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --text-color: #333;

    /* إضافة متغيرات جديدة مع الحفاظ على التوافق */
    --primary: #0066cc;           /* متوافق مع القديم */
    --primary-dark: #0052a3;      /* جديد */
    --secondary: #ff6b35;         /* جديد */
    --dark: #2d3748;              /* متوافق مع القديم */
    --light: #f8f9fa;             /* متوافق مع القديم */
    --success: #28a745;           /* جديد */
    --danger: #dc3545;            /* جديد */
    --warning: #ffc107;           /* جديد */
    --info: #17a2b8;              /* جديد */

    /* متغيرات عامة */
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 15px 30px rgba(0,0,0,0.15);
    --box-shadow-light: 0 5px 15px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================= BODY ================= */
body {
    font-family: 'Cairo', 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================= TOP BAR ================= */
.top-bar {
    background-color: var(--dark-color);
    color: #fff;
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar .container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-switcher a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-switcher a.active,
.lang-switcher a:hover {
    background: var(--primary-color);
}

/* ================= NAVBAR ================= */
.navbar {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.logo span {
    color: var(--accent-color);
}

.logo-tagline {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
    margin: 0;
}

/* ================= NAVIGATION ================= */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -6px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
    width: 100%;
}

.nav-link:hover {
    background: rgba(0,102,204,0.1);
    color: var(--primary-color);
}

.nav-item.active .nav-link {
    color: var(--primary-color);
    background: rgba(0,102,204,0.05);
}

/* ================= DROPDOWN ================= */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background: rgba(0,102,204,0.05);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.dropdown-menu hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid #eee;
}

/* ================= BUTTONS ================= */
.login-btn {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 28px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.login-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.btn {
    padding: 10px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ================= HERO ================= */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 120px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/images/pattern.svg') center/cover;
    opacity: 0.1;
}

.hero h2 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.2rem;
    max-width: 720px;
    margin: 0 auto 30px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.cta-button {
    background: #fff;
    color: var(--primary-color);
    padding: 15px 45px;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    z-index: 1;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-6px);
    box-shadow: var(--box-shadow-hover);
}

/* ================= PAGE CONTENT ================= */
.page-content {
    flex: 1;
    width: 100%;
}

/* ================= SECTIONS ================= */
.services,
.features {
    padding: 80px 20px;
    background: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 55px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-title p {
    color: #666;
    max-width: 700px;
    margin: 15px auto 0;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ================= SERVICES ================= */
.services-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.service-card p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

/* ================= FEATURES ================= */
.features {
    background-color: #f0f7ff;
}

.features-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 35px;
}

.feature-item {
    background: #fff;
    padding: 35px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    transform: rotateY(180deg);
}

.feature-item h3 {
    margin-bottom: 12px;
    color: var(--dark-color);
    font-size: 1.3rem;
}

/* ================= STATS ================= */
.stats-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--dark), var(--dark-color));
    color: white;
}

.stats-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ================= CALL TO ACTION ================= */
.cta-section {
    padding: 100px 20px;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('assets/images/cta-bg.jpg') center/cover;
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-section p {
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* ================= FOOTER ================= */
.footer {
    background: linear-gradient(135deg, #1a202c, var(--dark-color));
    color: #fff;
    padding: 70px 0 20px;
    margin-top: auto;
}

.footer-top {
    padding-bottom: 50px;
}

.footer-grid {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 50px;
    width: auto;
}

.footer-desc {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    color: #ddd;
}

.footer-contact i {
    color: var(--primary-color);
    margin-top: 3px;
    min-width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 25px 0;
}

.footer-bottom-content {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-payments {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-payments i {
    font-size: 1.8rem;
    color: #ccc;
    transition: var(--transition);
}

.footer-payments i:hover {
    color: white;
}

/* ================= BACK TO TOP ================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--box-shadow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* ================= MOBILE MENU TOGGLE ================= */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 25px;
    position: relative;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--dark-color);
    position: absolute;
    left: 0;
    transition: var(--transition);
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 11px;
}

.menu-toggle span:nth-child(3) {
    bottom: 0;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 11px;
}

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }

    .features-grid,
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .footer-bottom-content {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .contact-info {
        justify-content: center;
    }

    .top-bar-right {
        flex-direction: column;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-container {
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 20px;
        transition: 0.3s;
        box-shadow: var(--box-shadow-hover);
        z-index: 999;
        align-items: stretch;
        gap: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-item {
        margin: 0;
    }

    .nav-link {
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 5px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,0.02);
        margin: 10px 0;
        padding: 0;
        width: 100%;
    }

    .dropdown-menu a {
        padding-left: 40px;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 20px;
    }

    .hero {
        padding: 80px 20px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 12px 30px;
    }

    .services-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ================= ANIMATIONS ================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ================= PAGE LOADER ================= */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s, visibility 0.3s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0,102,204,0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================= CUSTOM SCROLLBAR ================= */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ================= RTL SUPPORT ================= */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .nav-link::after {
    left: auto;
    right: 0;
}

body.rtl .dropdown-menu {
    left: auto;
    right: 0;
}

body.rtl .footer-links a:hover {
    transform: translateX(-5px);
}

body.rtl .footer-contact p {
    text-align: right;
}

body.rtl .dropdown-menu a {
    border-left: none;
    border-right: 3px solid transparent;
}

body.rtl .dropdown-menu a:hover {
    border-right-color: var(--primary-color);
}

/* ================= PRINT STYLES ================= */
@media print {
    .top-bar,
    .navbar,
    .footer,
    .back-to-top {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black !important;
        text-decoration: underline;
    }
}

.btn-group, .btn-group-vertical {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    flex-direction: row-reverse;
}

/* تنسيقات إضافية */
.priority-high { background-color: #dc3545 !important; }
.priority-medium { background-color: #ffc107 !important; color: #000 !important; }
.priority-low { background-color: #0dcaf0 !important; }

.status-open { background-color: #198754 !important; }
.status-closed { background-color: #6c757d !important; }
.status-pending { background-color: #ffc107 !important; color: #000 !important; }

.card:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

<style>
     /* تنسيقات إضافية للخدمات */
 .service-option {
     padding: 10px;
     margin-bottom: 5px;
     border-radius: 5px;
     border: 1px solid #dee2e6;
     cursor: pointer;
     transition: all 0.3s ease;
 }

.service-option:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
}

.service-option.selected {
    background-color: #e7f1ff;
    border-color: #0d6efd;
    border-left: 4px solid #0d6efd;
}

.service-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.service-type-badge {
    background-color: #6c757d;
    color: white;
}

.service-days-badge {
    background-color: #198754;
    color: white;
}

.optgroup-label {
    font-weight: bold;
    color: #495057;
    background-color: #f8f9fa;
    padding: 5px 10px;
}

/* تحسين مظهر الـ select */
.form-select option {
    padding: 10px;
    border-bottom: 1px solid #f1f1f1;
}

.form-select option:last-child {
    border-bottom: none;
}

.form-select optgroup {
    font-weight: bold;
    color: #495057;
    background-color: #f8f9fa;
}
</style>