* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4F46E5;
    --primary-dark: #4338ca;
    --secondary: #EC4899;
    --accent: #06b6d4;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-colored: 0 10px 25px -5px var(--primary);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --nav-scroll-bg: rgba(255, 255, 255, 0.98);
    --footer-bg: #0f172a;
    --footer-text: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', sans-serif;
    --font-ar: 'Cairo', sans-serif;
}

.dark-mode {
    --primary: #6366f1;
    --primary-dark: #818cf8;
    --secondary: #f472b6;
    --dark: #f8fafc;
    --light: #0f172a;
    --gray: #94a3b8;
    --gray-light: #1e293b;
    --white: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
    --shadow-colored: 0 10px 25px -5px var(--primary);
    --nav-bg: rgba(15, 23, 42, 0.9);
    --nav-scroll-bg: rgba(15, 23, 42, 0.98);
    --footer-bg: #1e293b;
    --footer-text: #f8fafc;
}

[dir="rtl"] {
    font-family: var(--font-ar);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    margin-right: 2rem;
}

[dir="rtl"] .nav-controls {
    margin-right: auto;
    margin-left: 2rem;
}

.icon-btn {
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.icon-btn:hover {
    background: var(--gray-light);
    color: var(--primary);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Navigation */
/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    background: var(--nav-scroll-bg);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.logo {
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 50%;
    position: relative;
    box-shadow: 0px 1px 10px 2px var(--primary);
}

.profile {
    background-image: url(try.png);
    width: 100%;
    height: 100%;
    background-size: cover;
    position: relative;
    top: 6px;
    right: 6px;

}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    padding: 5px;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--dark);
    transition: var(--transition);
    border-radius: 3px;
}

/* Page Container */
.page {
    display: none;
    margin-top: 30px;
    min-height: 100vh;
    padding-top: 80px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Page */
.slideshow-container {
    position: relative;
    max-width: 1200px;
    margin: 2rem auto;
    height: calc(100vh - 140px);
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    animation: slideAnimation 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active {
    display: block;
}

@keyframes slideAnimation {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide #img-one {
    background-image: url('profile.png');
    height: 50%;
    width: 18%;
    background-size: cover;
    background-position: center;
    border-radius: 100px;
}

.slide #img-tow {
    background-image: url('NoTow.png');
    height: 80%;
    width: 30%;
    background-size: cover;
    border-right: 5px solid var(--white);
    border-bottom: 5px solid var(--white);
    border-radius: 8px;

}

.slide-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.slide-two {
    flex-direction: row;
    justify-content: space-around;
}

.contents {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 5px solid var(--white);
    border-top: 5px solid var(--white);
    padding: 0px 35px;
    height: 100%;
    border-radius: 8px;
}

.learn-more {
    background-color: var(--white);
    color: var(--gray);
    font-family: var(--font-ar);
    border: none;
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 30px auto;
    height: 60px;
    width: 170px;
    transition: all 1s ease;
}

.learn-more:hover {
    background-color: var(--gray);
    color: var(--white);
    border: 2px solid var(--white);
    transform: scale(1.1);
}

.slide-three {
    position: relative;
    overflow: hidden;
}

.icons-slide {
    position: absolute;
}

#icon-one {
    color: var(--white);
    position: absolute;
    top: 0px;
    right: -15px;
    font-size: 15rem;
    transform: rotate(236deg);
}

#icon-tow {
    color: var(--white);
    position: absolute;
    bottom: 0;
    left: -70px;
    z-index: 50;
    font-size: 20rem;
}

.slide-content h1 {
    color: var(--white);
    font-size: 4rem;
    font-weight: 800;
    font-family: var(--font-ar);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.slide-content p {
    color: var(--white);
    font-size: 1.5rem;
    max-width: 600px;
    opacity: 0.9;
    font-family: var(--font-ar);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.dot {
    height: 12px;
    width: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: var(--transition);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dot.active {
    background-color: white;
    transform: scale(1.4);
}

/* Work Page */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--gray-light);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.project-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
}
.image-work{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-size: 1.25rem;
    font-weight: 700;
}

.project-content p {
    position: relative;
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
}


/* .hidden {
  display: none;
} */


/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    animation: fadeIn 0.3s ease-in;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-content p{
    margin-top: 20px;

}
.modal-image{
    box-shadow: 0px 5px 2px  var(--dark);
    margin-bottom: 10px;
}
#modalImage{
    width: 100%;
    height: 50%;
    object-fit: cover;
    transition: transform 0.5s ease;
}   

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    background: var(--light);
    border-radius: 50%;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--dark);
    background: var(--gray-light);
    transform: rotate(90deg);
}

/* About Page */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 6rem;
    box-shadow: var(--shadow-colored);
}

.about-text h2 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-size: 2rem;
    font-weight: 700;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--gray);
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Contact Page */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    color: var(--dark);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-colored);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px var(--primary);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.contact-info p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.contact-info strong {
    color: var(--dark);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.25rem;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-colored);
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.4);
    z-index: 1500;
    cursor: pointer;
    transition: var(--transition);
    animation: pulse 2s infinite;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 35px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: 70%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 6rem 2rem;
        gap: 2rem;
        box-shadow: var(--shadow-2xl);
        transform: translateX(100%);
        opacity: 1;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .slideshow-container {
        height: 500px;
        border-radius: 0;
        margin: 0;
    }

    .slide-content h1 {
        font-size: 2.5rem;
    }

    /* Responsive Images & Content */
    .slide-content {
        padding: 2rem 1rem;
    }

    .slide #img-one {
        width: 40vw;
        max-width: 150px;
        height: auto;
        aspect-ratio: 1/1;
        margin-bottom: 2rem;
    }

    .slide #img-tow {
        width: 90%;
        max-width: 300px;
        height: auto;
        min-height: 200px;
        margin-bottom: 2rem;
    }

    .slide-two {
        flex-direction: column;
    }

    .contents {
        border-left: none;
        border-top: none;
        border-bottom: 3px solid white;
        padding: 2rem 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #icon-one {
        font-size: clamp(6rem, 20vw, 8rem);
        right: -10px;
        top: 10%;
    }

    #icon-tow {
        font-size: clamp(8rem, 25vw, 10rem);
        left: -20px;
        bottom: 5%;
    }

    .learn-more {
        width: 140px;
        height: 50px;
        font-size: 1.1rem;
        margin: 1.5rem auto;
    }

    .slide-content h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }

    .slide-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        height: 300px;
        font-size: 4rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.5rem;
    }

    [dir="rtl"] .nav-links {
        left: 0;
        right: auto;
        transform: translateX(-100%);
    }

    [dir="rtl"] .nav-links.active {
        transform: translateX(0);
    }

    [dir="rtl"] .whatsapp-float {
        left: 20px;
        right: auto;
    }
}

/* RTL Specific Overrides */
[dir="rtl"] .nav-links a::after {
    right: 0;
    left: auto;
}

[dir="rtl"] .close-modal {
    left: 1.5rem;
    right: auto;
}

[dir="rtl"] .whatsapp-float {
    left: 40px;
    right: auto;
}

[dir="rtl"] .project-card:hover {
    transform: translateY(-8px);
}


/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo p {
    color: var(--gray);
    font-size: 1.1rem;
}

.footer-links h3,
.footer-social h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--footer-text);
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

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

[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons 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(--footer-text);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: var(--gray);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}