/* =================================================== */
/* ============ تحسينات الاستجابة الشاملة ============ */
/* =================================================== */

/* شاشات كبيرة (أكثر من 1200px) - الإعدادات الحالية تعمل */

/* أجهزة الكمبيوتر المحمولة (1024px - 1200px) */
@media (max-width: 1200px) {
    .start-here {
        margin-left: 500px;
        font-size: 36px;
    }

    .person-image {
        width: 500px;
        height: 550px;
    }

    .main-title {
        font-size: 2.5rem;
    }
}

/* أجهزة لوحية أفقية (768px - 1024px) */
@media (max-width: 1024px) {
    .sliding-system {
        height: 80vh;
        min-height: 600px;
    }

    .start-here {
        margin-left: 300px;
        font-size: 32px;
        margin-top: -50px;
    }

    .person-image {
        width: 400px;
        height: 450px;
        margin-right: -50px;
    }

    .main-title {
        font-size: 2.2rem;
        margin-top: -40px;
    }

    .description {
        font-size: 1.1rem;
    }

    .announcements-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .why-choose-content {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* أجهزة لوحية عمودية (576px - 768px) */
@media (max-width: 768px) {
    .sliding-system {
        height: 70vh;
        min-height: 500px;
    }

    /* إعادة تنظيم نظام الانزلاق للشاشات الصغيرة */
    .white-section.right,
    .black-section.right {
        clip-path: none;
        width: 100%;
        height: 40%;
        position: relative;
    }

    .white-section.left,
    .black-section.left {
        clip-path: none;
        width: 100%;
        height: 60%;
        position: relative;
    }

    .white-section.right .white-content,
    .white-section.left .white-content {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        text-align: center;
        padding: 20px;
    }

    #slid1 {
        height: 213px;


    }

    #slid2 {
        height: 183px;
    }

    #slid2-2 {
        height: 230px;
    }

    #slid3 {
        height: 207px;
    }

    #services {
        margin-top: -40%;
    }

    .black-section.left .black-top-content,
    .black-section.right .black-top-content {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        text-align: center;
        padding: 20px;
        max-width: 100%;
    }

    #ww {
        top: -300px;
    }

    .black-section.left p {
        font-size: 8px;
        text-align: left;
    }

    .slide-controls {
        width: 0;
        height: 0;
        overflow: hidden;
    }

    .scroll-down {
        width: 0;
        height: 0;
        overflow: hidden;

    }

    .description-salid2 {
        margin-top: -10px;
        line-height: 10px;
        font-size: 8px;
        text-align: left;
    }

    .black-section.right p {
        margin-left: -10px;
        margin-top: -26px;
        line-height: 18px;
        font-size: 12px;
        text-align: left;
    }

    .start-here,
    .titleslid2,
    .start-here-slaid3 {
        margin: 20px auto;
        font-size: 28px;
        text-align: center;
    }

    .person-image,
    #imageslaid2,
    .image-slaid3 {
        margin-left: 20%;
        margin-top: -15%;
        width: 300px;
        height: 320px;
        /* margin: 0 auto; */
        display: block;
    }

    .main-title,
    .main-title-slaid2,
    .main-title-slaid3 {
        font-size: 1.8rem;
        text-align: center;
        margin: 20px auto;
    }

    .description,
    .description-salid2 {
        font-size: 1rem;
        text-align: center;
        margin: 20px auto;
    }

    .black-bottom-content {
        position: relative;
        bottom: auto;
        text-align: center;
        margin: 20px auto;
    }

    .buttons {
        margin: 20px auto;
        justify-content: center;
        height: auto;
    }

    #apply-slaid1,
    .apply-btn-slaid2,
    .apply-btn-slaid3 {
        margin: 10px auto;
        max-width: 280px;
    }

    /* تحسينات قسم الخدمات */
    #container-section2 {
        margin: 0 auto;
        padding: 0 20px;
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* تحسينات قسم Why Choose Us */
    .why-choose-us .section-title {
        text-align: center;
    }

    .why-choose-us .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .stats-container {

        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 20px;
    }

    /* تحسينات الكاروسيل 3D */
    .announcements-container-3d {
        height: 350px;
        margin-right: 0;
    }

    .carousel {
        width: 220px;
        height: 300px;
    }

    .announcement-card-3d {
        width: 200px;
        height: 280px;
    }

    .carousel-nav-btn {
        width: 40px;
        height: 40px;
    }

    .prev-btn-3d {
        left: -20px;
    }

    .next-btn-3d {
        right: -20px;
    }

    /* تحسينات قسم العملية */
    .process-row {
        flex-direction: column;
        gap: 40px;
    }

    .top-row {
        margin-bottom: 60px;
    }

    .bottom-row {
        margin-top: 60px;
    }

    .process-item {
        width: 100%;
        max-width: 300px;
    }

    .zigzag-line {
        display: none;
    }

    /* تحسينات قسم التخصصات */
    .specializations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .spec-card {
        width: 100%;
        height: auto;
        min-height: 200px;
    }

    .spec-content h3 {
        margin: 10px 0;
        text-align: center;
    }
}

/* الهواتف الصغيرة (480px - 576px) */
@media (max-width: 576px) {
    .sliding-system {
        height: 60vh;
        min-height: 400px;
    }

    .start-here,
    .titleslid2,
    .start-here-slaid3 {
        font-size: 24px;
    }

    .person-image,
    #imageslaid2,
    .image-slaid3 {
        width: 250px;
        height: 270px;
    }

    .main-title,
    .main-title-slaid2,
    .main-title-slaid3 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* تحسينات إضافية للكاروسيل */
    .announcements-container-3d {
        height: 300px;
    }

    .carousel {
        width: 180px;
        height: 250px;
    }

    .announcement-card-3d {
        width: 200px;
        height: 290px;
    }

    .carousel-nav-btn {
        display: none;
    }

    /* تحسينات قسم التخصصات */
    .specializations-grid {
        grid-template-columns: 1fr;
    }

    .stats-container {
        /* grid-template-columns: 1fr; */
        gap: 15px;
    }

    .stat-item {
        text-align: center;
    }
}

/* الهواتف الصغيرة جداً (أقل من 480px) */
@media (max-width: 480px) {
    .sliding-system {
        height: 50vh;
        min-height: 350px;
    }

    .start-here,
    .titleslid2,
    .start-here-slaid3 {
        font-size: 20px;
        margin-top: 10px;
    }

    .person-image,
    #imageslaid2,
    .image-slaid3 {
        width: 200px;
        height: 220px;
    }

    .main-title,
    .main-title-slaid2,
    .main-title-slaid3 {
        font-size: 1.3rem;
    }

    .description {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    #apply-slaid1,
    .apply-btn-slaid2,
    .apply-btn-slaid3 {
        padding: 12px 25px;
        font-size: 1rem;
        max-width: 250px;
    }

    /* تحسينات إضافية */
    .services-section {
        padding: 60px 0;
    }

    .working-process-section,
    .specializations-section {
        padding: 60px 0;
    }

    .specializations-cta {
        padding: 25px 15px;
    }

    .cta-button-spec {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* =================================================== */
/* ============ تحسينات اللمس والتفاعل ============ */
/* =================================================== */

/* تحسينات للأجهزة التي تدعم اللمس */
@media (hover: none) and (pointer: coarse) {

    .apply-btn:hover,
    .spec-card:hover,
    .process-item:hover .process-circle {
        transform: none;
    }

    .apply-btn:active,
    .spec-card:active,
    .process-item:active .process-circle {
        transform: scale(0.95);
    }

    /* زيادة مساحة النقر للأزرار على الجوال */
    .apply-btn,
    .carousel-nav-btn,
    .cta-button,
    .cta-button-spec {
        min-height: 44px;
        min-width: 44px;
    }

    .slide-dots .dot,
    .carousel-dot {
        width: 16px;
        height: 16px;
    }
}

/* تحسينات للأجهزة التي لا تدعم اللمس */
@media (hover: hover) and (pointer: fine) {

    .apply-btn:hover,
    .spec-card:hover,
    .process-item:hover .process-circle {
        transform: scale(1.05);
    }
}

/* =================================================== */
/* ============ تحسينات الأداء ============ */
/* =================================================== */

/* تقليل مدة الانتقالات على الأجهزة البطيئة */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* تحسينات للشاشات العريضة */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
        margin: 0 auto;
    }
}

/* زر القائمة للجوال (مخفي على الشاشات الكبيرة) */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: #1e3c72;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}