﻿/* =============================================
   responsive.css - تحسينات لجميع أحجام الشاشات
   ============================================= */

/* ===== تحسينات عامة للجوال ===== */
@media screen and (max-width: 992px) {
    /* تحويل الهيكل الرئيسي لجميع الصفحات */
    .main-grid,
    .centers-grid,
    .attractions-grid,
    .albums-grid,
    .governors-grid,
    .leaders-grid,
    .news-grid,
    .gallery-grid,
    .pdf-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* تحسين الهيدر */
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logo-area {
        flex-direction: column;
    }

    /* تحسين الـ sidebar في لوحة التحكم */
    .container {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .main-content {
        margin-right: 0;
        width: 100%;
    }

    /* تحسين شريط التنقل */
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* تحسين الجداول */
    .gridview,
    .centers-table,
    .governors-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ===== للشاشات المتوسطة (تابلت) ===== */
@media screen and (max-width: 768px) {
    /* تحويل جميع الـ grids لعمود واحد */
    .main-grid,
    .centers-grid,
    .attractions-grid,
    .albums-grid,
    .governors-grid,
    .leaders-grid,
    .gallery-grid,
    .pdf-grid,
    .stats-grid,
    .info-section,
    .filter-section,
    .search-box {
        grid-template-columns: 1fr !important;
    }

    /* تحسين شريط التنقل */
    .nav-links {
        flex-direction: column;
        width: 100%;
    }

        .nav-links li {
            width: 100%;
        }

            .nav-links li a {
                text-align: center;
                width: 100%;
                padding: 12px;
            }

    /* تحسين النماذج */
    .form-row,
    .row {
        grid-template-columns: 1fr !important;
    }

    .form-card {
        padding: 15px;
    }

    /* تحسين البطاقات */
    .news-card,
    .center-card,
    .attraction-card,
    .governor-card,
    .leader-item,
    .album-card {
        margin-bottom: 15px;
    }

    /* تحسين الصور */
    .news-img,
    .attraction-image img,
    .governor-img,
    .leader-img {
        width: 100%;
        height: auto;
    }

    /* تحسين الخطوط */
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    /* تحسين البطاقات في لوحة التحكم */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* تحسين الفلاتر */
    .filter-section {
        flex-direction: column;
        gap: 10px;
    }

    .filter-select,
    .search-input,
    .search-btn {
        width: 100%;
    }

    /* تحسين الفوتر */
    .qr-section {
        flex-direction: column;
        text-align: center;
    }

    /* تحسين الـ Breadcrumb */
    .breadcrumb {
        flex-wrap: wrap;
        font-size: 0.9rem;
    }
}

/* ===== للشاشات الصغيرة جداً (جوال) ===== */
@media screen and (max-width: 480px) {
    /* تصغير الخطوط */
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* تحسين الهيدر */
    .logo-text h1 {
        font-size: 1.3rem;
    }

    .logo-text p {
        font-size: 0.8rem;
    }

    .logo-circle {
        width: 60px;
        height: 60px;
    }

        .logo-circle img {
            width: 40px;
            height: 40px;
        }

    .date-box {
        font-size: 0.8rem;
        padding: 5px 10px;
        flex-wrap: wrap;
    }

    /* تحسين الإحصائيات */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-item {
        padding: 8px 0;
    }

    /* تحسين البطاقات */
    .news-card,
    .center-card,
    .attraction-card {
        padding: 10px;
    }

    .news-title {
        font-size: 1rem;
    }

    .news-meta {
        font-size: 0.75rem;
    }

    /* تحسين أزرار الإجراءات */
    .action-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

        .action-btn i {
            font-size: 0.9rem;
        }

    /* تحسين الجداول */
    .gridview th,
    .gridview td {
        padding: 6px 4px;
        font-size: 0.8rem;
    }

    /* تحسين الـ Pagination */
    .pagination a,
    .pagination span {
        padding: 3px 8px;
        margin: 0 2px;
        font-size: 0.8rem;
    }

    /* تحسين الـ Lightbox */
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    /* تحسين الـ Ticker */
    .ticker-label {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .ticker-item {
        font-size: 0.8rem;
        margin-left: 15px;
    }

    /* تحسين معلومات التواصل */
    .contact-info {
        padding: 15px;
    }

    .contact-item {
        font-size: 0.85rem;
    }

    .social-link {
        width: 35px;
        height: 35px;
    }
}

/* ===== تحسينات للشاشات الكبيرة جداً ===== */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1600px;
    }

    .news-grid,
    .centers-grid,
    .attractions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== تحسينات خاصة للخريطة ===== */
@media screen and (max-width: 768px) {
    .map-container,
    .attractions-map,
    .center-map,
    .contact-map {
        height: 300px;
    }
}

/* ===== تحسينات للصور ===== */
@media screen and (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
    }

    .slider-image {
        height: 250px;
    }
}

/* ===== تحسينات للأزرار ===== */
@media screen and (max-width: 768px) {
    .btn-add,
    .btn-save,
    .btn-back,
    .btn-logout,
    .download-btn {
        width: 100%;
        justify-content: center;
        margin: 5px 0;
    }

    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== تحسينات للشريط الجانبي في لوحة التحكم ===== */
@media screen and (max-width: 992px) {
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

        .sidebar-menu a {
            width: auto;
            min-width: 150px;
        }
}

/* ===== تحسينات للجداول في لوحة التحكم ===== */
@media screen and (max-width: 768px) {
    .gridview {
        font-size: 0.85rem;
    }

        .gridview .action-btn {
            width: 25px;
            height: 25px;
        }

            .gridview .action-btn i {
                font-size: 0.8rem;
            }
}

/* ===== تحسينات لصفحة تفاصيل المحافظ ===== */
@media screen and (max-width: 768px) {
    .profile-header {
        padding: 30px 20px;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .profile-name {
        font-size: 1.8rem;
    }

    .timeline-item {
        padding: 0 20px;
    }
}

/* ===== تحسينات لصفحة تفاصيل المركز ===== */
@media screen and (max-width: 768px) {
    .center-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .center-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
}

/* ===== تحسينات لصفحة المعارض ===== */
@media screen and (max-width: 768px) {
    .gallery-mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-mini-item {
        height: 100px;
    }
}

/* ===== تحسينات للـ Cards ===== */
@media screen and (max-width: 768px) {
    .card,
    .stat-card,
    .pdf-card,
    .sharek-card {
        padding: 15px;
    }

    .card-icon,
    .stat-icon,
    .pdf-icon {
        font-size: 1.5rem;
    }
}

/* ===== تحسينات للـ Modal ===== */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 15px;
    }
}
