/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

:root {
    --primary-color: #6C63FF;
    --secondary-color: #2A2A72;
    --accent-color: #4FACFE;
    --text-color: #333;
    --background-color: #f8f9fa;
}

body {
    background: linear-gradient(135deg, var(--background-color), #ffffff);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 2.2rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #FFF;
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(33, 150, 243, 0.1) 0%, transparent 100%);
    animation: gradientAnimation 8s ease infinite;
}

@keyframes gradientAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.profile-container {
    position: relative;
    flex: 0 0 300px;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    transition: all 0.5s ease;
    position: relative;
    z-index: 2;
}

.profile-image:hover {
    transform: rotate(10deg) scale(1.05);
}

.profile-circle {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px dashed rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.profile-social-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-social-icon {
    position: absolute;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transform: translate(0, 0) scale(0);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 3;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.profile-social-icon i {
    color: var(--primary-color);
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.profile-social-icon:hover {
    background: var(--primary-color);
    transform: scale(1.2) !important;
}

.profile-social-icon:hover i {
    color: white;
    transform: rotate(360deg);
}

.profile-container:hover .profile-social-icons {
    opacity: 1;
}

.profile-container:hover .profile-social-icon.facebook {
    transform: translate(-160px, -80px) scale(1);
    animation: floatIcon1 3s ease-in-out infinite;
}

.profile-container:hover .profile-social-icon.twitter {
    transform: translate(-180px, 0) scale(1);
    animation: floatIcon2 3s ease-in-out infinite 0.2s;
}

.profile-container:hover .profile-social-icon.instagram {
    transform: translate(-160px, 80px) scale(1);
    animation: floatIcon3 3s ease-in-out infinite 0.4s;
}

.profile-container:hover .profile-social-icon.tiktok {
    transform: translate(-120px, 160px) scale(1);
    animation: floatIcon4 3s ease-in-out infinite 0.6s;
}

@keyframes floatIcon1 {
    0%, 100% {
        transform: translate(-160px, -80px) scale(1);
    }
    50% {
        transform: translate(-170px, -85px) scale(1.1);
    }
}

@keyframes floatIcon2 {
    0%, 100% {
        transform: translate(-180px, 0) scale(1);
    }
    50% {
        transform: translate(-190px, 5px) scale(1.1);
    }
}

@keyframes floatIcon3 {
    0%, 100% {
        transform: translate(-160px, 80px) scale(1);
    }
    50% {
        transform: translate(-170px, 85px) scale(1.1);
    }
}

@keyframes floatIcon4 {
    0%, 100% {
        transform: translate(-120px, 160px) scale(1);
    }
    50% {
        transform: translate(-130px, 165px) scale(1.1);
    }
}

.profile-social-icon::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), var(--primary-color));
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.4s ease;
    opacity: 0.7;
    left: 100%;
}

.profile-container:hover .profile-social-icon::after {
    transform: scaleX(1);
}

.profile-social-icon.facebook::after,
.profile-social-icon.instagram::after,
.profile-social-icon.twitter::after,
.profile-social-icon.tiktok::after {
    transform-origin: left center;
    left: 100%;
    transform: rotate(0deg) scaleX(0);
}

.profile-container:hover .profile-social-icon.facebook::after {
    transform: rotate(-45deg) scaleX(1);
}

.profile-container:hover .profile-social-icon.instagram::after {
    transform: rotate(45deg) scaleX(1);
}

.profile-container:hover .profile-social-icon.twitter::after {
    transform: rotate(0deg) scaleX(1);
}

.profile-container:hover .profile-social-icon.tiktok::after {
    transform: rotate(60deg) scaleX(1);
}

.content-area {
    flex: 1;
    margin-right: 4rem;
    position: relative;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
}

.social-icons {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.social-icon {
    position: relative;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon i {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
    background: white;
}

.social-icon:hover i {
    color: var(--primary-color);
}

.connector {
    position: absolute;
    background: rgba(255,255,255,0.2);
    pointer-events: none;
    transition: all 0.3s ease;
    opacity: 0;
}

.social-icon:hover .connector {
    opacity: 1;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.highlight {
    color: #FFD700;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.highlight:hover::after {
    transform: scaleX(1);
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* تحسين عناوين الأقسام */
.section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* تحسين قسم الخدمات */
.services {
    padding: 100px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
}

.services h2 {
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(33, 150, 243, 0.05), transparent);
    transition: transform 0.6s ease;
    transform: translateY(100%);
}

.service-card:hover::before {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 15px 40px rgba(108, 99, 255, 0.2);
}

.service-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.service-card:hover i {
    transform: rotateY(360deg);
}

.service-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.service-content p {
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-features li {
    padding: 10px 0;
    color: var(--text-color);
    position: relative;
    padding-right: 25px;
    transition: transform 0.3s ease;
}

.service-features li:hover {
    transform: translateX(-5px);
}

.service-features li::before {
    content: '✓';
    color: var(--primary-color);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* تحسين التأثيرات الحركية */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background-color: var(--background-color);
}

.projects h2 {
    text-align: center;
    margin-bottom: 50px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3, .project-card p {
    padding: 20px;
}

.coming-soon {
    text-align: center;
    padding: 50px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.coming-soon h3 {
    margin-bottom: 10px;
    font-size: 24px;
    color: var(--secondary-color);
}

.coming-soon p {
    margin-bottom: 60px;
    color: var(--text-color);
}

.coming-soon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(33, 150, 243, 0.1), transparent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.loading-dots {
    position: relative;
    width: 80px;
    height: 80px;
    display: block;
    margin: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.loading-dots::before {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: #00bfff;
    border-bottom-color: #ff0000;
    animation: loader 1s ease infinite;
    filter: drop-shadow(0 0 10px #00bfff) drop-shadow(0 0 20px #ff0000);
}

.loading-dots::after {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 5px solid transparent;
    border-left-color: #ff6600;
    border-right-color: #00bfff;
    animation: loader 1s ease infinite reverse;
    filter: drop-shadow(0 0 10px #ff6600) drop-shadow(0 0 20px #00bfff);
}

@keyframes loader {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background-color: #fff;
}

.contact h2 {
    text-align: center;
    margin-bottom: 50px;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: var(--background-color);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 20px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.2);
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-form button {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.contact-form button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.contact-form button:hover::before {
    width: 300px;
    height: 300px;
}

.contact-form button:hover {
    transform: translateY(-3px) rotateX(5deg);
    background-color: #1976d2;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.social-links {
    margin-bottom: 20px;
}

.social-link {
    color: #fff;
    font-size: 24px;
    margin: 0 15px;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 1rem;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: scale(1.2) rotate(360deg);
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1.2em;
    }
    
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
    }
    
    .contact-item {
        width: 100%;
    }
}

/* تحسينات للشاشات المحمولة */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        padding: 1rem;
        gap: 2rem;
        margin-top: 60px;
    }

    .profile-container {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }

    .content-area {
        text-align: center;
        margin-right: 0;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .logo {
        font-size: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 1rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 15px;
    }

    .contact-form {
        padding: 0 1rem;
    }

    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* تحسينات إضافية للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .hero {
        min-height: auto;
        padding: 4rem 0;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* تحسين عرض الأيقونات على الشاشات المحمولة */
@media (max-width: 768px) {
    .profile-container:hover .profile-social-icon.facebook {
        transform: translate(-100px, -40px) scale(1);
    }

    .profile-container:hover .profile-social-icon.twitter {
        transform: translate(-100px, 0) scale(1);
    }

    .profile-container:hover .profile-social-icon.instagram {
        transform: translate(-100px, 40px) scale(1);
    }

    .profile-container:hover .profile-social-icon.tiktok {
        transform: translate(-100px, 80px) scale(1);
    }
}
