@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Marhey&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

html, body {
    overflow-x: hidden; 
    max-width: 100vw; 
}


*{
    font-family: 'Poppins', sans-seri;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;

}
header {
    background-color: antiquewhite;
    width: 100%;
    position: fixed;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 200px;
}
.logo {
    text-decoration: none;
    color: #3a6cf4;
    
    font-weight: 700;
    font-size: 1.8em;
}
.navigation a {
    color: #3a6cf4;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    padding-left: 30px;
}
.navigation a:hover {
    color: blueviolet;   
}

section {
    padding: 100px 200px;    
}


.main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: black;
    padding: 100px 200px;
    min-height: 100vh;
    position: relative;
    padding-top: 100px;
}

/* Profile Photo */
.profile-container {
    display: flex;
    justify-content: flex-end; 
    flex: 1;
}

.profile-img {
    width: 180px; 
    height: 180px;
    border-radius: 50%; 
    object-fit: cover; 
    border: 4px solid white; 
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2); 
}

/* Modal*/
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease-in-out;
}

/* Image Inside Modal */
.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
    transform: scale(0.8);
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

/* Close Modal */
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}



/* when open (zoom in image full Screen)*/
.modal.show {
    display: flex;
    opacity: 1;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* disappearing image slowly*/
.modal.hide .modal-content {
    transform: scale(0.3) translate(220%, -20%);
    opacity: 0;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
}



.main h2 {
    color: white;
    font-size: 1.4em;
    font-weight: 500;
    margin-top: 5px;
}

.main h2 span {
    display: inline-block;
    margin-top: 10px;
    color: #4e9eff;
    font-size: 3em;
    font-weight: 600;
}

.main h3 {
    color: #fff;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 10px;
    margin-bottom: 30px;
}

.main-btn {
    color: #fff;
    background-color: rgb(70, 109, 251);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    display: inline-block;
    padding: 0.9375em 2.1875em;
    letter-spacing: 1px;
    border-radius: 15px;
    margin-bottom: 40px;
    transition: 0.7s ease;
}
.main-btn:hover {
    background-color: #0a49f6;
    transform: scale(1.1);

}

.social-icons a {
    color:#fff;
    font-size: 1.7em;
    padding-right: 30px;
}

.title {
    display: flex;
    justify-content: center;
    color: #3a6cf4;
    font-size: 2.2em;
    font-weight: 800;
    margin-bottom: 30px;

}

.content {
    display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;

}

.card {
    background-color: #fff;
    width: 21.25em;
    box-shadow: 0 5px 25px rgba(1 1 1 / 15%);
    border-radius: 10px;
    padding: 25px;
    margin: 15px;
    transition: 0.7s ease;

}

.card:hover {
    transform: scale(1.1);
}

.icon {
    color: #3a6cf4;
    font-size: 8em;
    text-align: center;
}

.info {
    text-align: center;
}

.info h3 {
    color: #3a6cf4;
    font-size: 1.2em;
    font-weight: 700;
    margin: 10px;

}
.projects {
    background-color: rgb(17, 15, 15);

}

.projects .content {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px; 
}

.projects .project-card {
    width: calc(50% - 20px); 
    max-width: 400px; 
    min-height: 14em;
    background-color: #fff;
    border: 1px solid #fff;
    overflow: hidden;
    border-radius: 10px;
    margin: 10px;
    transition: 0.7s ease;
}


.project-card:hover {
    transform: scale(1.1);
}

.project-card:hover .project-image{
    opacity: 0.9;
}

.project-image img {
    width: 100%;  
    height: 200px;  
    object-fit: cover;  
    border-radius: 10px;
}


.project-info {
    padding: 1em;
}

.project-category {
    font-size: 0.8em;
    color: #000;

}

.project-title {
    display: flex;
    justify-content: space-between;
    
    font-weight:800;
    margin-top: 10px;
}

.project-title span {
    display: inline-block; 
    white-space: normal; 
}


.more-details {
    text-decoration: none;
    color: #3a6cf4;

}

.more-details:hover {
    color: #601cfc;
}

.contact .icon {
    font-size: 4.5em;
}

.contact .info h3 {
    color: #000;
}

.contact .info p {
    font-size: 1.5em;
}

.footer {
    background-color: #000016;
    color: #fff;
    padding: 2em;
    display: flex;
    justify-content: space-between;
}

.footer-title {
    font-size: 1.3em;
    font-weight: 600;
}

.footer-title span {
    font-size: 12;
    color: #3a6cf4;
}

.footer .social-icons a{
    color: #fff;
    font-size: 1.3em;
    padding: 0 12px 0 0;
   
}

/* Project Details Modal*/
#projectModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease-in-out;
}

#projectModal .modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 80%;  
    max-width: 900px; 
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); 
}

/* Zoom in on the image inside Modal */
#modalImage {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: auto;
    width: 100%; 
    height: auto;
    border-radius: 8px;
}


/* Description of Projects */
#imageDescription {
    width: 100%; /* جعل الوصف يأخذ عرض النافذة */
    text-align: center; /* توسيط النص */
    margin-top: 10px; /* إضافة مسافة بين الصورة والوصف */
    font-size: 18px;
    font-weight: 500;
    margin-top: 15px;
    padding: 10px;
    background-color: #f4f4f4;
    border-radius: 8px;
}


#imageModal .close {
    color: white;
    transition: color 0.3s ease-in-out;
}

#imageModal .close:hover {
    color: red;
}


.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.prev:hover, .next:hover {
    background: rgba(0, 0, 0, 0.9);
}

#projectModal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3000; /* رفع قيمة z-index */
    background: rgba(0, 0, 0, 0.5); /* خلفية خفيفة حتى يكون واضحًا */
    padding: 5px 10px;
    border-radius: 5px;
    display: block !important; /* تأكيد أنه غير مخفي */
    transition: color 0.3s ease-in-out;
}


#projectModal .close:hover {
    color: red; 
}

/* Display the fullscreen Btn in Basic Mode */
#fullscreenBtn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
    z-index: 1500;
}

#fullscreenBtn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* In Full Screen close btn always appearing */
.fullscreen-active .close {
    display: block !important;
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1600;  
}

.fullscreen-active #modalImage {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain;
    background-color: black;
}

.fullscreen-active .modal-content {
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
    border-radius: 0; /* إزالة الحواف */
    padding: 0;
}

.fullscreen-active .image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Make the Image Inside Modal */
#modalImage {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: auto;
    border-radius: 10px;
}

/*Full Screen Image Without Extension*/
.fullscreen-image {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
}



.image-container {
    width: 100%;
    text-align: center;
    position: relative;
    display: inline-block;
}

/* Next and Prev Buttons */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.prev:hover, .next:hover {
    background: rgba(0, 0, 0, 0.9);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* All page media screen */

@media (max-width:1023px) {
    header{
        padding: 12px 20px;
    }
    
    .navigation a{
        padding-left: 10px;
    }
    .title {
        font-size: 1.8em;
    }
    .section{
        padding: 80px 20px;
    }
    .main-content h2 {
        font-size: 1em;
    }
    .main-content h3 {
        font-size: 1.6em;
    }
    .contact {
        flex-direction: column;
        align-items: center;
    }
    .project-card {
        display: flex;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .project-image {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .project-info {
        width: 100%;
        text-align: center !important;
    }
    
    
}


@media (max-width:641px) {
    body{
        font-size: 12px;
    }
    .main-content h2 {
        font-size: 0.8em;
    }
    .main-content h3 {
        font-size: 1.4em;
    }
}

@media (max-width:300px) {
    body {
        font-size: 10px;
    }
}



@media (max-width: 600px) {
    .main {
        flex-direction: column; 
        text-align: center; 
        padding: 50px 20px; 
    }
    .navigation {
        display: flex;
        gap: 15px; /* تقليل المسافات بين العناصر */
        flex-wrap: wrap;
        justify-content: center; /* توسيط العناصر */
    }

    .navigation a {
        font-size: 0.9em; /* تصغير حجم الخط */
        padding: 5px; /* تقليل المسافة الداخلية */
    }
    .logo {
        font-size: 1.2em; /* تصغير حجم الشعار */
    }
    .profile-container {
        order: 3; 
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px; 
    }
    
    .main-btn {
        margin-bottom: 20px; 
    }

    .profile-img {
        width: 120px; 
        height: 120px;
    }
    .projects {
        width: 100%; 
        padding: 50px 10px; 
        display: flex;
        flex-direction: column;
        align-items: center;
        background-color: rgb(17, 15, 15); 
    }

    .projects .content {
        width: 100%; 
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    /* Projects Cards */
    .projects .project-card {
        width: 90%; 
        max-width: 400px;
        min-width: 300px;
        height: auto;
        padding: 15px;
        border-radius: 10px;
        background-color: #fff;
        display: flex !important;
        flex-direction: column !important; /* يضمن أن النص سيظل تحت الصورة */
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important; 
    }

    .project-image img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }

    .project-title {
        display: flex;
        justify-content: space-between; /* يجعل العناصر على نفس الخط */
        align-items: center; /* يضمن أن العناصر في نفس الارتفاع */
        gap: 10px; /* يضيف مسافة بين "Business Programs" و "More details" */
    }

    .project-title span {
        font-size: 16px; /* حجم النص */
        font-weight: bold;
        vertical-align: middle; /* يجعل النص متناسقًا رأسيًا */
    }

    .more-details {
        font-size: 14px;
        text-decoration: none;
        display: inline-block;
    }
    
    .modal .close, 
    #projectModal .close {
        font-size: 30px;
        top: 10px; 
        right: 15px; 
    }

    /* full screen btn in small screens */
    #fullscreenBtn {
        font-size: 16px; 
        bottom: -5px;
        right: 15px; 
        padding: 5px 10px; 
        z-index: 1500; 
    }

    /* project view in small screens */
    .modal-content {
        max-width: 90%; 
        max-height: 90vh; 
    }

    #modalImage {
        width: 100% !important;   /* جعل الصورة تمتد لتملأ الحاوية */
        height: auto !important;  /* الحفاظ على النسبة الأصلية */
        object-fit: contain !important;  /* ضمان عدم تشويه الصورة */
        display: block;
        margin: 0 auto;
    }
    

    .fullscreen-active #modalImage {
        width: 100vw !important;
        height: 100vh !important;
        object-fit: cover !important; /* الحفاظ على تناسب الصورة */
        background-color: transparent;
    }
    
    .fullscreen-active .modal-content {
        width: auto !important;
        height: auto !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .image-container {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: transparent !important; /* ✅ إزالة الخلفية السوداء من الحاوية */
    }
    #projectModal .modal-content {
        width: 100% !important;  /* تكبير النافذة لتكون أعرض */
        max-width: unset !important;  /* إزالة الحد الأقصى للعرض */
        padding: 20px;
        
    }
    
}


@media (max-width: 600px) {
    .cards {
        width: 100%; 
        padding: 20px; 
    }

    .content {
        display: flex;
        flex-direction: column; 
        align-items: center; /*  center all content */
    }

    .card {
        width: 90%; 
        max-width: 350px; 
        padding: 15px; 
        text-align: center; 
    }

    .icon {
        font-size: 3em; /* Small Icons    */
    }

    .info h3 {
        font-size: 1.2em; /* make the titles big   */
    }

    .info p {
        font-size: 0.9em; /* small text's for small screens    */
    }
    .social-icons {
        order: 2; /*  Make the Icons Come after   Explore My Work */
        display: flex;
        justify-content: center;
        gap: 15px; /* Space between Icons    */
        margin-top: 10px; /* تقليل المسافة بينها وبين الزر */
    }

    .social-icons a {
        font-size: 1.8em; /* Social Media Icons   */
    }

    .footer {
        flex-direction: row; /* إبقاء العناصر بجوار بعض */
        justify-content: center; /* توسيط المحتوى بالكامل */
        text-align: center;
    }

    .footer-title {
        display: flex;
        align-items: center; /* محاذاة النص والأيقونات أفقياً */
        flex-direction: row; /* إبقاء الاسم والأيقونات بجانب بعض */
    }

    .footer-title span {
        margin-right: 15px; /* ✅ مسافة صغيرة بين الاسم والأيقونات */
    }

    .footer .social-icons {
        margin-bottom: 5px;
        display: flex;
        align-items: center;
        gap: 10px; /* ضبط المسافة بين الأيقونات */
    }
}

