@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Tajawal:wght@300;400;500;700;900&display=swap');

/* ==========================================================================
   نظام التصميم الفاخر (Luxury Design System Tokens)
   ========================================================================== */
:root {
    /* لوحة الألوان الأساسية - الوضع الفاتح */
    --primary: #0F4C81;          /* الأزرق الطبي الملكي */
    --primary-light: #1D609B;
    --primary-rgb: 15, 76, 129;
    --secondary: #4DB6AC;        /* التركواز العصري */
    --secondary-hover: #3b9b91;
    --accent: #D4AF37;           /* لمسات ذهبية فاخرة */
    --accent-hover: #bfa030;
    --accent-rgb: 212, 175, 55;
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    
    --border: #E2E8F0;
    --border-focus: #4DB6AC;
    
    /* الظلال والتأثيرات */
    --shadow-sm: 0 2px 4px rgba(15, 76, 129, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 76, 129, 0.08), 0 8px 10px -6px rgba(15, 76, 129, 0.08);
    --shadow-lg: 0 20px 35px -10px rgba(15, 76, 129, 0.12), 0 10px 20px -8px rgba(15, 76, 129, 0.12);
    --shadow-gold: 0 10px 20px rgba(212, 175, 55, 0.15);
    
    /* الإعدادات الهيكلية */
    --font-title: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   الوضع الداكن (Dark Mode Theme)
   ========================================================================== */
body.dark-mode {
    --bg-primary: #0B0F19;
    --bg-secondary: #111827;
    --bg-tertiary: #1F2937;
    
    --text-primary: #F8FAFC;
    --text-secondary: #E2E8F0;
    --text-muted: #94A3B8;
    
    --border: #1F2937;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.4);
    
    --primary: #1D609B;
    --primary-light: #2A79BE;
    --secondary: #66c2b9;
    
    --border-focus: #66c2b9;
}

/* ==========================================================================
   العناصر العامة وتصفير الأنماط (Reset & Base Styles)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    direction: rtl;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 16px;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* شاشة التحميل */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader {
    width: 80px;
    height: 80px;
    position: relative;
}
.loader-circle {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 6px solid var(--primary);
    border-radius: 50%;
    animation: loader-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--primary) transparent transparent transparent;
}
.loader-circle:nth-child(1) { animation-delay: -0.45s; }
.loader-circle:nth-child(2) { animation-delay: -0.3s; }
.loader-circle:nth-child(3) { animation-delay: -0.15s; }

@keyframes loader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* شريط التقدم العلوي */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to left, var(--secondary), var(--primary));
    width: 0%;
    z-index: 10001;
    transition: width 0.1s ease;
}

/* التنسيقات العامة للروابط والعناوين */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
}

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

/* ==========================================================================
   المكونات المشتركة والواجهات (Common Layout Components)
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-badge {
    display: inline-block;
    padding: 6px 18px;
    background-color: rgba(77, 182, 172, 0.1);
    color: var(--secondary);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    border: 1px solid rgba(77, 182, 172, 0.2);
}

.section-title {
    font-size: 36px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
}

.section-desc {
    color: var(--text-muted);
    font-size: 18px;
}

/* أزرار فاخرة */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    gap: 10px;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #e5be49);
    color: #000000;
    font-weight: 700;
    box-shadow: var(--shadow-gold);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(212, 175, 55, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateY(-3px);
}

.btn-outline-white {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

.btn-outline-white:hover {
    background-color: #ffffff;
    color: var(--primary);
    transform: translateY(-3px);
}

/* ==========================================================================
   رأس الصفحة والقائمة الضخمة (Header & Mega Menu)
   ========================================================================== */
.top-bar {
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-contact-info {
    display: flex;
    gap: 25px;
}

.top-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-social-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-social-link:hover {
    color: var(--accent);
}

.main-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1000;
    transition: var(--transition);
}

.main-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    color: var(--primary);
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.logo-text span {
    font-size: 12px;
    color: var(--secondary);
    display: block;
    font-weight: 600;
}

/* القائمة الرئيسية */
.main-nav {
    display: flex;
    align-items: center;
}

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

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 12px 18px;
    font-family: var(--font-title);
    font-weight: 600;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
}

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

/* القائمة الضخمة (Mega Menu) */
.has-mega-menu {
    position: static;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--primary);
    padding: 40px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition);
    z-index: 999;
}

.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.mega-menu-col h4 {
    font-size: 16px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--primary);
}

.mega-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mega-menu-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.mega-menu-links a:hover {
    color: var(--secondary);
    padding-right: 5px;
}

.mega-menu-featured {
    background-color: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
}

.mega-menu-featured h5 {
    font-size: 15px;
    margin-bottom: 8px;
}

.mega-menu-featured p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* أزرار الهيدر الإضافية */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    background-color: var(--bg-secondary);
    color: var(--secondary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* ==========================================================================
   قسم الـ Hero (الصفحة الرئيسية)
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.05), rgba(77, 182, 172, 0.05)), var(--bg-primary);
    padding: 120px 0;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background-color: rgba(15, 76, 129, 0.1);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 25px;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    background: linear-gradient(to left, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 550px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.hero-feature-item i {
    color: var(--secondary);
    font-size: 18px;
}

.hero-image-wrapper {
    position: relative;
}

.hero-image-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 8px solid var(--bg-primary);
}

.hero-image-container img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.hero-image-container:hover img {
    transform: scale(1.05);
}

.hero-badge-overlay {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--bg-primary);
    padding: 20px 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border);
    animation: float 4s ease-in-out infinite;
}

.hero-badge-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(77, 182, 172, 0.1);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.hero-badge-text h4 {
    font-size: 18px;
    color: var(--primary);
}

.hero-badge-text p {
    font-size: 12px;
    color: var(--text-muted);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==========================================================================
   قسم الإحصائيات (Stats Section)
   ========================================================================== */
.stats {
    background-color: var(--primary);
    color: #ffffff;
    padding: 60px 0;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 10px;
}

.stat-icon {
    font-size: 36px;
    color: var(--secondary);
    margin-bottom: 15px;
    opacity: 0.9;
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    font-family: var(--font-title);
    margin-bottom: 5px;
    color: #ffffff;
}

.stat-title {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ==========================================================================
   قسم نبذة عن الطبيب (About / Bio Section)
   ========================================================================== */
.about-section {
    background-color: var(--bg-primary);
}

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

.about-image {
    position: relative;
}

.about-image-inner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 8px solid var(--bg-secondary);
}

.about-image img {
    width: 100%;
    height: 550px;
    object-fit: cover;
}

.about-experience-badge {
    position: absolute;
    top: 30px;
    left: -20px;
    background-color: var(--accent);
    color: #000000;
    padding: 15px 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-gold);
    text-align: center;
    font-family: var(--font-title);
}

.about-experience-badge span {
    font-size: 32px;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.about-experience-badge label {
    font-size: 13px;
    font-weight: 700;
}

.about-content h3 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 20px;
}

.about-bio {
    font-size: 17px;
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.about-detail-item {
    display: flex;
    gap: 12px;
}

.about-detail-icon {
    color: var(--secondary);
    font-size: 20px;
    margin-top: 4px;
}

.about-detail-text h5 {
    font-size: 16px;
    margin-bottom: 5px;
}

.about-detail-text p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================================================
   قسم الخدمات (Services Section)
   ========================================================================== */
.services-section {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(77, 182, 172, 0.3);
}

.service-card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.service-card:hover .service-card-img img {
    transform: scale(1.08);
}

.service-card-icon {
    position: absolute;
    bottom: -25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background-color: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 4px solid var(--bg-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.service-card-content {
    padding: 35px 25px 25px 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-card-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.service-card-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.service-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 15px;
    font-size: 13px;
    color: var(--text-secondary);
}

.service-card-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.service-card-more {
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.service-card-more:hover {
    color: var(--secondary);
}

/* ==========================================================================
   لماذا نحن (Why Choose Us Section)
   ========================================================================== */
.why-section {
    background-color: var(--bg-primary);
}

.why-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.why-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.why-feature-card {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.why-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.why-card-icon {
    font-size: 32px;
    color: var(--secondary);
    margin-bottom: 15px;
}

.why-feature-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.why-feature-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.why-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.why-image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}

/* ==========================================================================
   قسم قبل وبعد (Before & After Slider)
   ========================================================================== */
.ba-section {
    background-color: var(--bg-secondary);
}

.ba-slider-container {
    max-width: 750px;
    margin: 0 auto;
}

.ba-slider {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 6px solid var(--bg-primary);
    user-select: none;
}

.ba-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ba-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-before {
    z-index: 1;
}

.ba-after {
    z-index: 2;
    width: 50%; /* القيمة الافتراضية للمنزلق */
    overflow: hidden;
}

/* تعديل عرض صورة الـ After لتناسب الحاوية بالكامل حتى مع اقتطاعها */
.ba-after img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* نفس قيمة الـ ba-after width */
    width: 4px;
    background-color: var(--accent);
    z-index: 3;
    cursor: ew-resize;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.ba-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background-color: var(--accent);
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.ba-label {
    position: absolute;
    bottom: 20px;
    background-color: rgba(15, 76, 129, 0.85);
    color: #ffffff;
    padding: 5px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    z-index: 4;
}

.ba-label-before {
    right: 20px;
}

.ba-label-after {
    left: 20px;
}

/* ==========================================================================
   معرض الصور (Gallery Section - Masonry & Lightbox)
   ========================================================================== */
.gallery-section {
    background-color: var(--bg-primary);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 22px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-family: var(--font-title);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.gallery-grid {
    column-count: 3;
    column-gap: 25px;
}

.gallery-item {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 25px;
    break-inside: avoid;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    display: block;
    height: auto;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 76, 129, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    padding: 20px;
    text-align: center;
    color: #ffffff;
}

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

.gallery-overlay i {
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 12px;
    transform: translateY(15px);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay i {
    transform: translateY(0);
}

.gallery-overlay h4 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 5px;
}

.gallery-overlay p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 5px solid #ffffff;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    left: -45px;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--accent);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: var(--primary);
    color: #ffffff;
}

.lightbox-prev {
    right: -80px;
}

.lightbox-next {
    left: -80px;
}

.lightbox-caption {
    position: absolute;
    bottom: -45px;
    width: 100%;
    text-align: center;
    color: #ffffff;
    font-family: var(--font-title);
    font-size: 16px;
}

/* ==========================================================================
   آراء المرضى (Testimonials Section)
   ========================================================================== */
.testimonials-section {
    background-color: var(--bg-secondary);
}

.testimonials-slider {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 20px;
}

.testimonial-card {
    background-color: var(--bg-primary);
    padding: 50px 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
    text-align: center;
}

.testimonial-quote-icon {
    font-size: 48px;
    color: rgba(77, 182, 172, 0.15);
    position: absolute;
    top: 30px;
    right: 40px;
}

.testimonial-stars {
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 18px;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary);
}

.testimonial-author-info h4 {
    font-size: 16px;
    color: var(--primary);
    text-align: right;
}

.testimonial-author-info span {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    text-align: right;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.testimonial-dot.active {
    background-color: var(--primary);
    width: 25px;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   المدونة (Blog Section)
   ========================================================================== */
.blog-section {
    background-color: var(--bg-primary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(15, 76, 129, 0.2);
}

.blog-card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.blog-card:hover .blog-card-img img {
    transform: scale(1.08);
}

.blog-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary);
    color: #ffffff;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    z-index: 10;
}

.blog-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

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

.blog-card-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card-content h3 a:hover {
    color: var(--primary);
}

.blog-card-content p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card-more {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card-more:hover {
    color: var(--secondary);
}

/* ==========================================================================
   الأسئلة الشائعة (FAQ Accordion Section)
   ========================================================================== */
.faq-section {
    background-color: var(--bg-secondary);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(77, 182, 172, 0.4);
}

.faq-question {
    padding: 22px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-question h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.faq-icon {
    width: 32px;
    height: 32px;
    background-color: var(--bg-secondary);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 12px;
}

.faq-item.active .faq-icon {
    background-color: var(--primary);
    color: #ffffff;
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer-inner {
    padding: 0 30px 25px 30px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    border-top: 1px solid transparent;
}

.faq-item.active .faq-answer-inner {
    border-color: var(--border);
}

/* ==========================================================================
   اتصل بنا وحجز موعد (Contact Section)
   ========================================================================== */
.contact-section {
    background-color: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-info-title h3 {
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 12px;
}

.contact-info-title p {
    color: var(--text-muted);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-method-card {
    display: flex;
    gap: 20px;
    background-color: var(--bg-secondary);
    padding: 25px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.contact-method-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(15, 76, 129, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-method-text h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.contact-method-text p {
    font-size: 14px;
    color: var(--text-muted);
}

.contact-hours-card {
    background-color: var(--primary);
    color: #ffffff;
    padding: 30px;
    border-radius: var(--radius-md);
}

.contact-hours-card h4 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
}

.contact-hours-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}

.contact-hours-item {
    display: flex;
    justify-content: space-between;
}

.contact-hours-item span:first-child {
    font-weight: 700;
}

/* نموذج الحجز */
.booking-form-card {
    background-color: var(--bg-secondary);
    padding: 50px 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.booking-form-card h3 {
    font-size: 26px;
    margin-bottom: 10px;
    color: var(--primary);
}

.booking-form-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 35px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.form-control {
    padding: 14px 18px;
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(77, 182, 172, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   الفوتر (Footer)
   ========================================================================== */
.main-footer {
    background-color: #0B0F19;
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 0 0;
    border-top: 5px solid var(--primary);
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col-about h3 {
    color: #ffffff;
    font-size: 22px;
    margin-bottom: 20px;
}

.footer-col-about p {
    line-height: 1.8;
    margin-bottom: 25px;
}

.footer-social-links {
    display: flex;
    gap: 12px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.footer-social-link:hover {
    background-color: var(--secondary);
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-col h4 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2.5px;
    background-color: var(--secondary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-right: 5px;
}

.footer-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
}

.footer-contact-item i {
    color: var(--secondary);
    font-size: 16px;
    margin-top: 4px;
}

.footer-contact-item p {
    margin: 0;
}

.footer-bottom {
    background-color: #070A11;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

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

/* ==========================================================================
   مكونات منبثقة وعائمة (Popup Booking, Back to Top, Floating Buttons)
   ========================================================================== */
/* زر العودة للأعلى */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary);
    transform: translateY(-5px);
}

/* الأزرار العائمة (واتساب واتصال) */
.floating-actions {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.floating-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.floating-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.floating-whatsapp {
    background-color: #25D366;
}

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

/* أداة تلميح (Tooltip) للأزرار العائمة */
.floating-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 70px;
    background-color: #1e293b;
    color: #ffffff;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    font-weight: 600;
}

body.dark-mode .floating-btn::before {
    background-color: #f1f5f9;
    color: #0f172a;
}

.floating-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* نافذة الحجز المنبثقة (Booking Popup) */
.booking-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.85);
    z-index: 10002;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.booking-popup-wrapper.active {
    opacity: 1;
    visibility: visible;
}

.booking-popup-card {
    background-color: var(--bg-primary);
    width: 90%;
    max-width: 650px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: popupScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popupScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.booking-popup-close {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-popup-close:hover {
    color: var(--primary);
    background-color: var(--border);
}

.booking-popup-content {
    padding: 40px;
}

.booking-popup-content h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--primary);
}

.booking-popup-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* رسالة نجاح الحجز (Toast) */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--primary);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10003;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-right: 5px solid var(--secondary);
}

.toast-notification.active {
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   الأنيميشن والحركات العامة عند التمرير (Scroll Animations)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   صفحة الخطأ 404 (404 Page Styles)
   ========================================================================== */
.error-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.05), rgba(77, 182, 172, 0.05)), var(--bg-primary);
}

.error-container {
    max-width: 600px;
    padding: 40px;
}

.error-code {
    font-size: 120px;
    font-weight: 900;
    font-family: var(--font-title);
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 20px;
}

.error-container h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.error-container p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 35px;
}

.error-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ==========================================================================
   صفحة تفاصيل الخدمة وقراءة المقال
   ========================================================================== */
.page-hero {
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.85), rgba(77, 182, 172, 0.85)), url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    color: #ffffff;
    text-align: center;
}

.page-hero h1 {
    color: #ffffff;
    font-size: 38px;
    margin-bottom: 15px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
}

.details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.details-content {
    background-color: var(--bg-primary);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.details-content img {
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.details-content h2 {
    font-size: 26px;
    margin-bottom: 20px;
    color: var(--primary);
}

.details-content p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.details-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--bg-primary);
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.sidebar-widget h4 {
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    color: var(--primary);
}

.widget-services-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.widget-services-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
}

.widget-services-list a:hover, .widget-services-list li.active a {
    background-color: var(--primary);
    color: #ffffff;
}

.widget-contact-info {
    text-align: center;
    background-color: var(--primary) !important;
    color: #ffffff;
}

.widget-contact-info h4 {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.widget-contact-info i {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 15px;
}
