/* General Styles */
body {
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1e1e2f;
    color: #ffffff;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Floating and Rounded Navbar */
header {
    background: rgba(30, 30, 47, 0.9);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 10px 20px;
    position: fixed;
    width: 90%;
    max-width: 1200px;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    border-radius: 25px; /* Rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Floating effect */
    transition: all 0.3s ease; /* Smooth transitions */
}

header:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); /* Enhanced shadow on hover */
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a, nav ul li button {
    color: #ffffff;
    text-decoration: none;
    background: none;
    border: 2px solid #ffffff;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease; /* Smooth transitions */
}

nav ul li a:hover, nav ul li button:hover {
    background-color: #ffffff;
    color: #1e1e2f;
    transform: translateY(-3px); /* Floating effect on hover */
}

.burger-menu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section with Animations */
.hero-section {
    background: url('hero_background.png') no-repeat center center/cover;
    color: #ffffff;
    text-align: center;
    padding: 150px 20px;
    margin-top: 100px; /* Adjusted for navbar height */
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
    background-blend-mode: overlay; /* Blend image with overlay */
    animation: fadeIn 2s ease-in-out; /* Fade-in animation */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: rgba(30, 30, 47, 0.8);
    padding: 10px 20px;
    border-radius: 10px;
    animation: slideInDown 1.5s ease-in-out; /* Slide-in animation */
}

@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-section p {
    font-size: 1.2rem;
    background: rgba(30, 30, 47, 0.8);
    padding: 10px 20px;
    border-radius: 10px;
    animation: slideInUp 1.5s ease-in-out; /* Slide-in animation */
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Sections with Animations */
section {
    padding: 100px 0;
    animation: fadeInUp 1s ease-in-out; /* Fade-in animation for sections */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.game {
    margin-bottom: 30px;
}

/* Footer */
footer {
    background: rgba(30, 30, 47, 0.9);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 30px 0;
    text-align: center;
    animation: fadeIn 2s ease-in-out; /* Fade-in animation */
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    color: #ffffff;
    margin: 0 10px;
    font-size: 1.5rem;
    transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover {
    transform: scale(1.2);
    color: #ff6b6b;
}

/* Scroll to Top Button */
#toTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-size: 1.2rem;
    background-color: #ff6b6b;
    color: #ffffff;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    transition: transform 0.3s;
}

#toTopBtn:hover {
    transform: scale(1.2);
}

/* Project Card Styles - Move outside of media query */
.project-card {
    background: rgba(30, 30, 47, 0.9);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 20px auto;
    max-width: 1000px; /* Increased max-width for larger screens */
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    max-height: 500px; /* Increased height for larger screens */
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.project-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
    font-size: 1.2rem;
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: auto;
    padding: 1.5rem 0;
}

.project-links a {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #ffffff;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.project-links a:hover {
    background-color: #ff6b6b;
    border-color: #ff6b6b;
    color: #1e1e2f;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navbar for Mobile */
    header {
        width: 95%; /* Adjust width for mobile */
        top: 10px; /* Adjust position for mobile */
    }

    nav ul {
        display: none;
        flex-direction: column;
        background: rgba(30, 30, 47, 0.9);
        backdrop-filter: blur(10px);
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        text-align: center;
        border-radius: 15px; /* Rounded corners for mobile menu */
        padding: 10px 0;
    }

    nav ul.show {
        display: flex;
    }

    .burger-menu {
        display: block;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a, nav ul li button {
        width: 90%;
        border: none;
    }

    /* Hero Section for Mobile */
    .hero-section {
        height: 50vh; /* Smaller height for mobile */
        padding: 100px 20px;
    }

    .hero-section h2 {
        font-size: 2rem; /* Smaller font size for mobile */
    }

    .hero-section p {
        font-size: 1rem; /* Smaller font size for mobile */
    }

    /* Sections for Mobile */
    section {
        padding: 50px 0;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .project-card {
        margin: 10px;
        max-width: 100%;
    }
    
    .project-card img {
        max-height: 220px;
    }
    
    .project-card h3 {
        font-size: 1.5rem;
    }
    
    .project-card p {
        font-size: 1rem;
    }
    
    .project-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .project-links a {
        width: 80%;
        padding: 10px 20px;
        font-size: 1rem;
    }
}
