/* ===== مركز الإرادة للعلاج الطبيعي - ملف التصميم الرئيسي ===== */

/* استيراد الخطوط العربية */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

/* متغيرات الألوان */
:root {
    --primary-color: #0077b6;      /* أزرق طبي أساسي */
    --secondary-color: #48cae4;    /* أزرق فاتح */
    --accent-color: #00b4d8;       /* أزرق متوسط */
    --dark-color: #03045e;         /* أزرق داكن */
    --light-color: #caf0f8;        /* أزرق باهت */
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --shadow: rgba(0, 119, 182, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-light: linear-gradient(135deg, var(--light-color), var(--white));
}

/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: 'Tajawal', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    direction: rtl;
    text-align: right;
}

/* تصميم الحاويات */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* شريط التنقل */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 20px var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    width: 50px;
    height: 50px;
    margin-left: 10px;
    border-radius: 50%;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* قائمة الهاتف المحمول */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* قسم الترحيب */
.hero {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    animation: fadeInUp 1s ease 0.4s both;
}

.btn:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--shadow);
}

/* بطاقات الخدمات */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 119, 182, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px var(--shadow);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* تأثيرات الحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* تأثيرات التمرير */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* قسم عن المركز */
.about-section {
    background: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image {
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow);
}

/* معرض الصور */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 50px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
    transition: all 0.6s ease;
    opacity: 0;
    transform: translateY(50px) scale(0.8);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gallery-item.visible:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 50px var(--shadow);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 119, 182, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2rem;
    color: var(--white);
}

/* نموذج الاتصال */
.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

.form-control::placeholder {
    color: #999;
}

/* معلومات الاتصال */
.contact-info {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 40px;
    border-radius: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 1.5rem;
    margin-left: 15px;
    width: 40px;
    text-align: center;
}

.contact-item div h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-item div p {
    opacity: 0.9;
    margin: 0;
}

/* أزرار وسائل التواصل */
.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-btn.whatsapp {
    background: #25d366;
}

.social-btn.facebook {
    background: #1877f2;
}

.social-btn.telegram {
    background: #0088cc;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* التذييل */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 50px 0 20px;
    text-align: center;
}

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

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* بطاقات الفوائد */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.benefit-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.3s ease;
    border-right: 4px solid var(--primary-color);
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px var(--shadow);
}

.benefit-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.benefit-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* تصميم متجاوب للأجهزة المحمولة */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 20px var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .contact-form {
        padding: 25px;
    }

    .contact-info {
        padding: 25px;
    }
}

/* تصميم الخريطة */
.map-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow);
    transition: all 0.3s ease;
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px var(--shadow);
}

.map-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-primary);
    color: white;
    padding: 12px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(0, 119, 182, 0.3);
    z-index: 10;
}

.map-overlay i {
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* أزرار الخرائط */
.map-buttons .btn {
    transition: all 0.3s ease;
    border-radius: 25px;
    font-weight: 600;
    padding: 12px 20px;
}

.map-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 119, 182, 0.3);
}

/* معلومات الموقع */
.location-info {
    background: var(--light-color);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 119, 182, 0.1);
}

.location-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.location-info .address {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.location-info .coordinates {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* بطاقات معلومات الوصول */
.access-info {
    margin-top: 30px;
}

.access-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 119, 182, 0.1);
    height: 100%;
}

.access-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px var(--shadow);
}

.access-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.access-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.access-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* قسم المساعدة في الوصول */
.help-section {
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-top: 30px;
}

.help-section h4 {
    color: white;
    margin-bottom: 15px;
    font-weight: 600;
}

.help-section p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.help-section .btn {
    border-radius: 25px;
    font-weight: 600;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.help-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* تحسينات للهواتف المحمولة */
@media (max-width: 768px) {
    .map-container {
        height: 300px;
    }

    .map-overlay {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .location-info {
        padding: 20px;
    }

    .access-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .help-section {
        padding: 25px 20px;
    }

    .map-buttons .btn {
        margin-bottom: 10px;
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}

/* أيقونات مخصصة للخدمات */
.fa-joints::before {
    content: "\f5a1"; /* أيقونة المفاصل */
}

.fa-spine::before {
    content: "\f7e4"; /* أيقونة العمود الفقري */
}

/* تحسينات للأيقونات المتحركة */
.service-icon i {
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

.service-icon:hover i {
    animation-duration: 0.5s;
}

/* تأثيرات إضافية للأيقونات */
.animate__pulse {
    animation-name: pulse;
}

.animate__bounce {
    animation-name: bounce;
}

.animate__heartBeat {
    animation-name: heartBeat;
}

.animate__swing {
    animation-name: swing;
}

.animate__tada {
    animation-name: tada;
}

.animate__rotateIn {
    animation-name: rotateIn;
}

.animate__shakeX {
    animation-name: shakeX;
}

.animate__wobble {
    animation-name: wobble;
}

.animate__fadeInOut {
    animation-name: fadeInOut;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* تصميم زر الواتساب */
.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
}

.whatsapp-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn i {
    font-size: 1.3rem;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

.whatsapp-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.whatsapp-btn:hover::before {
    left: 100%;
}

/* تأثير النبض للأيقونة */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* تحسينات إضافية للزر */
.whatsapp-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.whatsapp-btn:disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* أيقونات التواصل العائمة */
.floating-contacts {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    direction: ltr;
}

.floating-btn {
    position: relative;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.floating-btn.show {
    opacity: 1;
    transform: translateX(0);
}

.floating-btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.floating-btn a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    color: white;
}

/* النص المخفي */
.btn-text {
    position: absolute;
    right: 70px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.floating-btn:hover .btn-text {
    opacity: 1;
    transform: translateX(0);
}

/* ألوان الأزرار المختلفة */
.whatsapp-1 a, .whatsapp-2 a {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.phone a {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.facebook a {
    background: linear-gradient(135deg, #1877f2, #166fe5);
}

.telegram a {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.main-btn a {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    animation: pulse-main 2s infinite;
}

/* تأثير النبض للزر الرئيسي */
@keyframes pulse-main {
    0% { box-shadow: 0 4px 12px rgba(0,123,255,0.3); }
    50% { box-shadow: 0 4px 20px rgba(0,123,255,0.6); }
    100% { box-shadow: 0 4px 12px rgba(0,123,255,0.3); }
}

/* حالة الإظهار والإخفاء */
.floating-contacts.active .floating-btn:not(.main-btn) {
    opacity: 1;
    transform: translateX(0);
}

.floating-contacts.active .floating-btn:nth-child(1) { transition-delay: 0.1s; }
.floating-contacts.active .floating-btn:nth-child(2) { transition-delay: 0.2s; }
.floating-contacts.active .floating-btn:nth-child(3) { transition-delay: 0.3s; }
.floating-contacts.active .floating-btn:nth-child(4) { transition-delay: 0.4s; }
.floating-contacts.active .floating-btn:nth-child(5) { transition-delay: 0.5s; }

/* الزر الرئيسي دائماً مرئي */
.main-btn {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

.main-btn i {
    transition: transform 0.3s ease;
}

.floating-contacts.active .main-btn i {
    transform: rotate(45deg);
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .floating-contacts {
        bottom: 15px;
        right: 15px;
    }

    .floating-btn a {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .btn-text {
        right: 60px;
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* تأثيرات إضافية */
.floating-btn a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.floating-btn a:hover::before {
    transform: scale(1);
}

/* تأثير الاهتزاز للواتساب */
.whatsapp-1 a, .whatsapp-2 a {
    animation: shake 3s infinite;
}

@keyframes shake {
    0%, 90%, 100% { transform: translateX(0); }
    95% { transform: translateX(-2px); }
    97% { transform: translateX(2px); }
}

/* تصميم صفحة الأقسام */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.department-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,123,255,0.1);
    position: relative;
    overflow: hidden;
}

.department-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.department-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,123,255,0.15);
}

.department-icon {
    text-align: center;
    margin-bottom: 20px;
}

.department-icon i {
    font-size: 3rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.department-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.department-subtitle {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 15px;
    font-style: italic;
}

.department-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.department-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.department-features li {
    padding: 8px 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.department-features li i {
    color: var(--success-color);
    margin-left: 10px;
    font-size: 0.9rem;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .departments-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }

    .department-card {
        padding: 20px;
    }

    .department-icon i {
        font-size: 2.5rem;
    }

    .department-card h3 {
        font-size: 1.1rem;
    }
}

/* تأثيرات إضافية للأيقونات */
.animate__flash {
    animation-name: flash;
}

.animate__rubberBand {
    animation-name: rubberBand;
}

@keyframes flash {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

@keyframes rubberBand {
    0% { transform: scale3d(1, 1, 1); }
    30% { transform: scale3d(1.25, 0.75, 1); }
    40% { transform: scale3d(0.75, 1.25, 1); }
    50% { transform: scale3d(1.15, 0.85, 1); }
    65% { transform: scale3d(0.95, 1.05, 1); }
    75% { transform: scale3d(1.05, 0.95, 1); }
    100% { transform: scale3d(1, 1, 1); }
}

/* تصميم بوت المحادثة */
.chat-icon {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1001;
    animation: chatPulse 2s infinite;
}

.chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.chat-icon.active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.chat-icon.notification {
    animation: chatBounce 1s infinite;
}

.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-window {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.chat-window.open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    border: 2px solid white;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chat-close:hover {
    background: rgba(255,255,255,0.2);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    animation: messageSlide 0.3s ease;
}

.bot-message .message-content {
    background: white;
    color: #1a1a1a;
    padding: 12px 15px;
    border-radius: 15px 15px 15px 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.bot-message .message-content::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: white;
    border-bottom-color: white;
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
    padding: 12px 15px;
    border-radius: 15px 15px 5px 15px;
    margin-right: 20px;
    margin-left: 40px;
}

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

.option-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.option-btn i {
    margin-left: 10px;
    font-size: 16px;
}

.back-btn {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
}

/* تنسيق المحتوى داخل الرسائل */
.message-content h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.message-content h5 {
    color: var(--secondary-color);
    margin: 15px 0 8px 0;
    font-size: 14px;
}

.message-content ul {
    margin: 10px 0;
    padding-right: 20px;
}

.message-content li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.departments-list .dept-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-right: 3px solid var(--primary-color);
}

.dept-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.contact-info .contact-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

.appointment-options .appointment-option {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.whatsapp-link, .phone-link {
    display: inline-block;
    background: #25d366;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;
    margin: 5px 5px 5px 0;
    font-size: 13px;
    transition: all 0.3s ease;
}

.phone-link {
    background: var(--primary-color);
}

.whatsapp-link:hover, .phone-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    color: white;
}

.appointment-note {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    border-right: 3px solid var(--primary-color);
}

/* تأثيرات الحركة */
@keyframes chatPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes chatBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

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

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 80px;
        left: 20px;
        right: 20px;
    }

    .chat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
