
:root {
    --background-color-light: #f0f2f5;
    --text-color-light: #1c1e21;
    --primary-color-light: #ff6b6b;
    --secondary-color-light: #d4d4d4;
    --nav-background-light: rgba(255, 255, 255, 0.8);
    --sidebar-background-light: rgba(255, 255, 255, 0.95);
    --skill-bar-light: #ccc;
    --skill-text-light: #666;
    --card-background-light: #ffffff;
    --timeline-line-light: #d4d4d4;

    --background-color-dark: #121212;
    --text-color-dark: #e0e0e0;
    --primary-color-dark: #ff8c8c;
    --secondary-color-dark: #333333;
    --nav-background-dark: rgba(30, 30, 30, 0.8);
    --sidebar-background-dark: rgba(30, 30, 30, 0.95);
    --skill-bar-dark: #555;
    --skill-text-dark: #aaa;
    --card-background-dark: #1e1e1e;
    --timeline-line-dark: #555555;

    --typewriter-cursor-color: #000;
    --typewriter-cursor-color-dark: #e0e0e0;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color-light);
    color: var(--text-color-light);
    transition: background-color 0.5s, color 0.5s;
    overflow-x: hidden;
    position: relative;
}

/* Dark mode styles */
body.dark-mode {
    background-color: var(--background-color-dark);
    color: var(--text-color-dark);
}
body.dark-mode .nav-bar {
    background-color: var(--nav-background-dark);
}
body.dark-mode .nav-logo {
    color: var(--text-color-dark);
}
body.dark-mode .nav-link, body.dark-mode .mode-toggle-button, body.dark-mode .menu-toggle-button {
    color: var(--text-color-dark);
}
body.dark-mode .profile-name,body.dark-mode .typewriter-container, body.dark-mode .about-me-title, body.dark-mode .about-me-text, body.dark-mode .skill-name, body.dark-mode .stats-number, body.dark-mode .stats-text, body.dark-mode .timeline-date, body.dark-mode .timeline-title, body.dark-mode .timeline-company, body.dark-mode .timeline-description, body.dark-mode .testimonial-name, body.dark-mode .testimonial-position, body.dark-mode .contact-title, body.dark-mode .contact-subtitle, body.dark-mode .contact-text, body.dark-mode .footer-text, body.dark-mode .experience-title, body.dark-mode .services-title, body.dark-mode .works-title, body.dark-mode .testimonials-title, body.dark-mode .work-card-overlay-text {
    color: var(--text-color-dark);
}
body.dark-mode .social-icon, body.dark-mode .sidebar-close{
    color: var(--text-color-dark);
}

/**/
/* body.dark-mode .work-card-overlay-text {
            color: var(--text-color-dark);
        } */
/**/
body.dark-mode .social-icon:hover {
    color: var(--primary-color-dark);
}
body.dark-mode .hire-button, body.dark-mode .download-cv-button, body.dark-mode .scroll-top-button, body.dark-mode .contact-button {
    background-color: var(--primary-color-dark);
    color: #ffffff;
}
body.dark-mode .social-icon-wrapper {
    background-color: transparent;
}
body.dark-mode .typewriter-cursor {
    background-color: var(--typewriter-cursor-color-dark);
}
body.dark-mode .sidebar {
    background-color: var(--sidebar-background-dark);
}
body.dark-mode .sidebar-link {
    color: var(--text-color-dark);
}
body.dark-mode .skill-bar {
    background-color: var(--skill-bar-dark);
}
body.dark-mode .skill-percentage-text {
    color: var(--skill-text-dark);
}
body.dark-mode .stats-icon {
     color: var(--primary-color-dark);
}
body.dark-mode .modal-content {
    background-color: var(--background-color-dark);
    color: var(--text-color-dark);
}
body.dark-mode .timeline-container, body.dark-mode .service-card, body.dark-mode .work-card, body.dark-mode .testimonial-card, body.dark-mode .contact-form, body.dark-mode .contact-input, body.dark-mode .contact-textarea {
    background-color: var(--card-background-dark);
}
body.dark-mode .timeline-container::before {
    background-color: var(--timeline-line-dark);
}
body.dark-mode .timeline-icon-wrapper {
    background-color: var(--card-background-dark);
}
body.dark-mode .service-card.blue { background-color: #4a5d96; }
body.dark-mode .service-card.yellow { background-color: #a48200; }
body.dark-mode .service-card.pink { background-color: #8f3d3d; }
body.dark-mode .custom-service-text { color: var(--text-color-dark); }
body.dark-mode .contact-link { color: var(--primary-color-dark); }
body.dark-mode .work-card-overlay { background-color: rgba(30, 30, 30, 0.7); }
body.dark-mode .view-all-button {
     background-color: var(--primary-color-dark);
    color: #ffffff;
}
body.dark-mode .testimonial-card .testimonial-dots .dot {
    background-color: var(--secondary-color-dark);
}
body.dark-mode .testimonial-card .testimonial-dots .dot.active {
    background-color: var(--primary-color-dark);
}
body.dark-mode .contact-input, body.dark-mode .contact-textarea {
    color: var(--text-color-dark);
    border: 1px solid var(--secondary-color-dark);
}
body.dark-mode .contact-input::placeholder, body.dark-mode .contact-textarea::placeholder {
    color: #888;
}

 /* أنماط أساسية للأيقونات SVG */
 .svg-icon {
    width: 1em;
    height: 1em;
    transition: filter 0.3s ease;
}

/* ألوان الأيقونات في الوضع النهاري */
body:not(.dark-mode) .svg-icon {
    filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

/* ألوان الأيقونات في الوضع الليلي */
body.dark-mode .svg-icon {
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

 /* أنماط أساسية للأيقونات SVG */
 .stats-icon {
    width: 2em;
    height: 2em;
    transition: filter 0.3s ease;
}

/* ألوان الأيقونات في الوضع النهاري */
body:not(.dark-mode) .stats-icon {
    filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

/* ألوان الأيقونات في الوضع الليلي */
body.dark-mode .stats-icon {
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

/**/
/* ألوان الأيقونات في الوضع النهاري */
/* body:not(.dark-mode) .world-map-bg {
    filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
} */

/* ألوان الأيقونات في الوضع الليلي */
 body.dark-mode .world-map-bg {
    filter: invert(0.5) sepia(0.5) hue-rotate(180deg) saturate(1) brightness(100%);
    /* filter: invert(0.5) sepia(0.5) saturate(0%) hue-rotate(200deg); */
} 
/**/

/* Navbar styles */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--nav-background-light);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color-light);
    /**/
    text-decoration: none;
    /* تغيير المؤشر الى يد */
    cursor: pointer;
    /* اضافه انتقال سلس */
    transition: transform 0.3s ease;
}
/**/
.nav-logo:hover {
    transform: scale(1.05); /* تكبير بسيط */
    text-decoration: none;
    color: var(--primary-color-light);  
}
.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-link {
    text-decoration: none;
    color: var(--text-color-light);
    font-weight: 500;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--primary-color-light);
    transform: scale(1.05);
}
.nav-actions {
    display: flex;
    align-items: center;
    margin: 0 2.2rem 0 0;
    gap: 1rem;
}
.mode-toggle-button, .menu-toggle-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-toggle-button {
    margin-right: 10px;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-color: var(--sidebar-background-light);
    backdrop-filter: blur(10px);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transform: translateX(100%); /* Initially hidden */
    transition: transform 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}
.sidebar.open {
    transform: translateX(0);
}
.sidebar-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color-light);
    cursor: pointer;
    align-self: flex-end;
    margin-bottom: 2rem;
}
.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.sidebar-link {
    text-decoration: none;
    font-size: 1.5rem;
    color: var(--text-color-light);
    transition: color 0.3s;
}
.sidebar-link:hover {
    color: var(--primary-color-light);
    transform: scale(1.05);
}

/* Hero section styles */
.hero-section {
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 2rem;
    box-sizing: border-box;
    z-index: 1; /* Ensure hero section is above squares */
}

.profile-pic-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 2;
}
.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-name {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-color-light);
    position: relative;
    z-index: 2;
}
.typewriter-container {
    height: 2rem;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-color-light);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}
.typewriter-text {
    display: inline-block;
}
.typewriter-cursor {
    display: inline-block;
    background-color: var(--typewriter-cursor-color);
    width: 2px;
    height: 1.25rem;
    margin-left: 5px;
    animation: blink-caret 0.75s step-end infinite;
}
@keyframes blink-caret {
    from, to { visibility: hidden; }
    50% { visibility: visible; }
}
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}
.social-icon {
    font-size: 2rem;
    color: var(--text-color-light);
    transition: color 0.3s;
    text-decoration: none;
}
.social-icon:hover {
    color: var(--primary-color-light);
}
.hire-button {
    padding: 0.75rem 2rem;
    background-color: var(--primary-color-light);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    z-index: 2;
}
.hire-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Animated background squares */
.squares-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0; /* Ensures squares are in the background */
}
.square {
    position: absolute;
    bottom: -150px;
    animation: moveUp 30s linear infinite; /* Increased duration for slower movement */
}
@keyframes moveUp {
    from {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    to {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 1;
    }
}

/* About Me section styles */
.about-me-section {
    z-index: 20;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.about-me-title, .experience-title, .services-title, .works-title, .testimonials-title, .contact-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-color-light);
}
.about-me-text {
    font-size: 1rem;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.about-me-icon {
    width: 1.3rem;
    height: 1.3rem;
}
.download-cv-button {
    padding: 0.75rem 2rem;
    background-color: var(--primary-color-light);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 2rem;
}
.download-cv-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Skills and Stats sections */
.skills-and-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 800px;
    text-align: left;
}

@media (min-width: 768px) {
    .skills-and-stats {
        grid-template-columns: 1fr 1fr;
    }
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.skill-header {
    display: flex;
    justify-content: space-between;
}
.skill-name {
    font-weight: bold;
}
.skill-percentage-text {
    font-size: 0.9rem;
    color: var(--skill-text-light);
}
.skill-bar {
    background-color: var(--skill-bar-light);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}
.skill-progress {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-in-out;
}
#progress-backend { background-color: #3b82f6; }
#progress-frontend { background-color: #eab308; }
#progress-mobile { background-color: #ef4444; }
#progress-uiux { background-color: #22c55e; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    text-align: left;
}
.stats-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stats-content {
    display: flex;
    flex-direction: column;
}
.stats-number {
    font-size: 1.5rem;
    font-weight: bold;
}
.stats-text {
    font-size: 0.9rem;
    color: var(--skill-text-light);
}

/* Experience and Education Section */
.experience-section {
    z-index: 30;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* background-color: var(--background-color-light); */
}

.timeline-container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    background-color: var(--card-background-light);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.timeline-container::before {
    content: '';
    position: absolute;
    left: 50px; /* Adjust for mobile */
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--timeline-line-light);
    z-index: 1;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    position: relative;
}
.timeline-icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    background-color: var(--card-background-light);
    border-radius: 50%;
    margin-right: 1.5rem;
}
.timeline-icon {
    width: 2rem;
    height: 2rem;
    font-size: 1.5rem;
    margin-left: auto;
    /* color: var(--primary-color-light); */
}
.timeline-content {
    flex: 1;
    text-align: left;
}
.timeline-date {
    font-size: 0.9rem;
    color: var(--skill-text-light);
    margin-bottom: 0.5rem;
}
.timeline-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}
.timeline-company {
    font-style: italic;
    color: var(--skill-text-light);
    margin-bottom: 1rem;
}
.timeline-description {
    font-size: 0.9rem;
    line-height: 1.5;
}
/* Delete   */
@media (min-width: 768px) {
     /* .timeline-container::before {
        left: 50%;
    }
     .timeline-icon-wrapper {
        margin-right: 1.5rem;
     } */
     .timeline-icon {
        
        margin-right: 1.1rem;
        
     }
}

/* Services section styles */
.services-section {
    z-index: 40;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.services-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .services-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
.service-card {
    padding: 2rem;
    border-radius: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s;
}
.service-card:hover {
    transform: translateY(-10px);
}
.service-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}
.service-icon {
    width: 2.5em;
    height: 2.5em;
    font-size: 2.5rem;
}
.service-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.service-description {
    font-size: 0.9rem;
    line-height: 1.6;
}
.service-card.blue { background-color: #6a82ff; }
.service-card.yellow { background-color: #ffc107; }
.service-card.pink { background-color: #ff6b6b; }
.custom-service-text {
    font-size: 1rem;
    color: var(--text-color-light);
}
.custom-service-text.dark-mode {
    color: var(--text-color-dark);
}
.contact-link {
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color-light);
}

/* Recent Works Section */
.works-section {
    z-index: 50;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* background-color: var(--background-color-light); */
}
.works-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1100px;
}
@media (min-width: 768px) {
    .works-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .works-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
.work-card {
    background-color: var(--card-background-light);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
}
.work-card:hover {
    transform: translateY(-10px);
}
.work-card-image {
    width: 100%;
    height: auto;
    display: block;
}
#work-card-image{
    background-color: #f3f3f3;
}
body.dark-mode #work-card-image{
    background-color: var(--card-background-dark);
}
.work-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.work-card:hover .work-card-overlay {
    opacity: 1;
}
.work-card-overlay-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color-light);
    margin-bottom: 1rem;
}
.work-card-tag {
    background-color: var(--primary-color-light);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
}
.view-all-button {
    padding: 0.75rem 2rem;
    background-color: var(--primary-color-light);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-top: 2rem;
}

/* Testimonials Section */
.testimonials-section {
    z-index: 5;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* background-color: var(--background-color-light); */
}
.testimonials-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.testimonial-card {
    background-color: var(--card-background-light);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}
.testimonial-image-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 0 5px var(--primary-color-light);
}
.testimonial-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.testimonial-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}
.testimonial-position {
    font-size: 1rem;
    color: var(--skill-text-light);
    margin-bottom: 1.5rem;
}
.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    
}
.testimonial-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.testimonial-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--secondary-color-light);
    cursor: pointer;
}
.testimonial-dots .dot.active {
    background-color: var(--primary-color-light);
}

/* Contact Section */
.contact-section {
    /* z-index: 10; */
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}
.contact-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
.contact-subtitle {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color-light);
    margin-bottom: 0.5rem;
}
.contact-text {
    font-size: 1rem;
    color: var(--skill-text-light);
    margin-bottom: 2rem;
}
.contact-form {
    width: 100%;
    max-width: 800px;
    background-color: var(--card-background-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.contact-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.contact-form-row .contact-input {
    flex: 1;
}
.contact-input, .contact-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--secondary-color-light);
    border-radius: 10px;
    box-sizing: border-box;
    background-color: var(--card-background-light);
    color: var(--text-color-light);
}
.contact-textarea {
    resize: vertical;
    min-height: 150px;
}
.contact-button {
    padding: 0.75rem 2rem;
    background-color: var(--primary-color-light);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.world-map-bg {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.4;
    z-index: 0;
    width: 80%;
    max-width: 1000px;
}
.contact-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Footer */
.footer {
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--skill-text-light);
    border-top: 1px solid var(--secondary-color-light);
    margin-top: 4rem;
}

/* Scroll to Top Button */
.scroll-top-button {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color-light);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 25%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s;
    font-size: 1.5rem;
    z-index: 100;
}
.scroll-top-button:hover {
    opacity: 0.8;
}

/* انمشن */
.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .scroll-fade.in-view {
    opacity: 1;
    transform: translateY(0);
  }

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: var(--background-color-light);
    color: var(--text-color-light);
    margin: 15% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
}
.modal-content.dark-mode {
    background-color: var(--background-color-dark);
    color: var(--text-color-dark);
}
.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.modal-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.modal-button.email {
    background-color: #ff6b6b;
    color: #fff;
}
.modal-button.whatsapp {
    background-color: #25d366;
    color: #fff;
}
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .profile-name{
        font-size: 2.4rem;
    }
    .nav-links {
        display: none;
    }
    .menu-toggle-button {
        display: block;
    }
    .timeline-container {
        padding: 1rem;
    }
    .services-container, .works-container {
        grid-template-columns: 1fr;
    }
    .testimonials-container{
        width: 95%;
        margin: 0 auto;
        padding: 0 10px;
        box-sizing: border-box;
    }
    .testimonial-slider{
        width: 100%;
    }
    .testimonial-image-container {
        width: 100px;
        height: 100px;
    }
    .testimonial-name {
        font-size: 1.2rem;
        
    }
    .testimonial-card{
       padding: 1.5rem 1rem;
       margin: 0 5px;
       width: calc(100% - 10px);
    }
    .testimonial-text {
        font-size: 1rem;
        width: 100%;
        max-width: 100%;
        
    }
    .contact-form-row {
        flex-direction: column;
        gap: 0;
    }
    .contact-input, .contact-textarea {
        margin-bottom: 1rem;
    }
    .world-map-bg {
        top: 20%;
        width: 100%;
        /* display: none; */
    }

    /**/
            /* تحسين أزرار النافذة المنبثقة للشاشات الصغيرة */
            /* الحفاظ على الاتجاه الأفقي */
              /* منع الانتقال لسطر جديد */
               /* تقليل المسافة بين الأزرار */
        /* .modal-buttons {
            flex-direction: row;    
            flex-wrap: nowrap;    
            gap: 0.5rem;           
        } */
        
        /* .modal-button {
            padding: 0.6rem 1rem; 
            font-size: 0.9rem; 
            white-space: nowrap; 
            min-width: auto; 
            flex: 1; 
        } */
        
        /* التأكد من بقاء النص في سطر واحد */
        /* .modal-button span {
            display: inline; 
        } */
        

        /* .modal-content {
            padding: 1.5rem; 
            margin: 15% auto; 
            width: 80%; 
        } */

}

@media (min-width: 769px) {
    .menu-toggle-button {
        display: none;
    }
    .mode-toggle-button{
        margin-right: 20px;
    }
    .nav-links {
        display: flex !important;
    }
    .sidebar {
        display: none;
    }   
}