/*==============================================================================
  موقع فرع وزارة الصحة بالمنطقة الشرقية
  ملف الأنماط الرئيسي
  Developer: Mohammad Shaheir
==============================================================================*/

/* متغيرات CSS */
:root {
    --primary: #016647;
    --primary-dark: #014d35;
    --primary-light: #028a5c;
    --secondary: #a48f62;
    --secondary-light: #c4af82;
    --dark: #1a1a1a;
    --gray-900: #212529;
    --gray-700: #495057;
    --gray-500: #6c757d;
    --gray-300: #dee2e6;
    --gray-100: #f8f9fa;
    --white: #ffffff;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    --transition: all 0.3s ease;
    --font-ar: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}

/* إعادة تعيين */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ar);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-900);
    background: var(--gray-100);
    direction: rtl;
    text-align: right;
}

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

a:hover {
    color: var(--primary-dark);
}

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

/* الحاوية */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/*==============================================================================
  الهيدر
==============================================================================*/
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-dark);
    padding: 8px 0;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

.header-top a {
    color: rgba(255,255,255,0.9);
}

.header-top a:hover {
    color: var(--white);
}

.header-main {
    padding: 15px 0;
}

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

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

.logo img {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.logo-text span {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

/* القائمة */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.nav-menu a {
    display: block;
    padding: 10px 18px;
    color: var(--white);
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.15);
    color: var(--white);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
}

/*==============================================================================
  الهيرو
==============================================================================*/
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #013326 100%);
    padding: 80px 0;
    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 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>') repeat;
    background-size: 100px 100px;
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(100px) translateY(100px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.hero h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--secondary);
    display: block;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/*==============================================================================
  الأزرار
==============================================================================*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

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

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

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

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

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 18px;
}

/*==============================================================================
  الأقسام
==============================================================================*/
.section {
    padding: 80px 0;
}

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

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

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

.section-subtitle {
    font-size: 18px;
    color: var(--gray-500);
}

/*==============================================================================
  البطاقات
==============================================================================*/
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

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

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

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.card-text {
    color: var(--gray-500);
    margin-bottom: 15px;
    line-height: 1.7;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--gray-500);
}

/*==============================================================================
  الخدمات
==============================================================================*/
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    border-bottom-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.service-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.service-desc {
    color: var(--gray-500);
    line-height: 1.7;
}

/*==============================================================================
  الأخبار
==============================================================================*/
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.news-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-content {
    padding: 25px;
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 10px;
}

.news-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
    line-height: 1.5;
}

.news-excerpt {
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 15px;
}

/*==============================================================================
  الفوتر
==============================================================================*/
.footer {
    background: var(--gray-900);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo img {
    height: 50px;
    margin-bottom: 20px;
}

.footer-desc {
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

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

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

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

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

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-contact i {
    color: var(--primary-light);
    width: 20px;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/*==============================================================================
  النماذج
==============================================================================*/
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-ar);
    font-size: 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    transition: var(--transition);
    direction: rtl;
}

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

.form-control::placeholder {
    color: var(--gray-500);
}

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

select.form-control {
    cursor: pointer;
}

/*==============================================================================
  التنبيهات
==============================================================================*/
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-right: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: var(--success);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: var(--warning);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: var(--info);
}

/*==============================================================================
  الجداول
==============================================================================*/
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid var(--gray-300);
}

.table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.table tbody tr:hover {
    background: var(--gray-100);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/*==============================================================================
  الصفحة الداخلية
==============================================================================*/
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 0;
    text-align: center;
    color: var(--white);
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    opacity: 0.9;
}

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

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

/*==============================================================================
  المرفقات
==============================================================================*/
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
}

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

.badge-secondary {
    background: var(--gray-500);
    color: var(--white);
}

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

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

/*==============================================================================
  التجاوب
==============================================================================*/
@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        background: var(--primary-dark);
        padding: 15px;
        border-radius: var(--radius);
        margin-top: 15px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .stat-number {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero h2 {
        font-size: 26px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/*==============================================================================
  الأنيميشن
==============================================================================*/
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-right {
    animation: slideRight 0.6s ease forwards;
}
