/*
 * Modern & Dynamic Web Page Style
 * Author: M. Samy
 * Version: 2.1
 * Description: A clean, minimalist dark theme with subtle interactivity and a functional slider.
 */

:root {
    --primary-color: #00bcd4; /* A vibrant teal for accents */
    --secondary-color: #f4f6f8;
    --background-dark: #121212;
    --surface-color: #1a1a1a;
    --text-light: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #333;
    --font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* General Body and Typography */
body {
    font-family: var(--font-sans);
    background-color: var(--background-dark);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Header Section */
header {
    background-color: var(--surface-color);
    padding: 3rem 1rem;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    animation: fadeIn 1s ease-in-out;
}

header h1 {
    margin: 0;
    font-size: 3.5rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(0, 188, 212, 0.5);
}

header p {
    margin-top: 10px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Main Content Container */
main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 2.5rem;
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Headings and Separators */
h2 {
    font-size: 2.2rem;
    color: var(--text-light);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-top: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h3 { /* Added for consistency with primary color */
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Links and Interactivity */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
    color: #4a86f7;
    text-decoration: underline;
    transform: translateY(-2px);
}

/* Expertise and Service Boxes (Flexbox for modern layout) */
.expertise-container, .service-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.expertise-box, .service-box {
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.expertise-box:hover, .service-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Module List (Grid for better layout) */
.module-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.module-list li {
    background-color: #222;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.module-list li h4 { /* Style for module titles in list */
    margin-top: 0;
    color: var(--primary-color);
}

/* Project Slider */
.project-slider-container {
    position: relative;
    max-width: 100%; /* Ensure container respects parent width */
    margin: 2rem auto;
    padding: 0;
}

.project-slider {
    display: flex;
    overflow-x: hidden; /* Hide default scrollbar */
    scroll-behavior: smooth; /* For smooth scrolling */
    gap: 25px; /* Space between cards */
    padding: 10px; /* Padding for the cards inside the slider */
    -webkit-overflow-scrolling: touch; /* For smoother scrolling on iOS */
}

/* Hide scrollbar for all browsers */
.project-slider::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.project-slider {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}


.project {
    flex-shrink: 0; /* Prevents projects from shrinking */
    width: 300px; /* Fixed width for each project card */
    background-color: #222;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    color: var(--text-light); /* Ensure text color is light */
}

.project:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.project img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.project img.logo-img {
    object-fit: contain;
    background-color: #1a1a1a;
    padding: 10px; /* Add some padding for contained logos */
}

.project h3, .project p {
    padding: 0 20px;
    margin-bottom: 10px;
}
.project h3 {
    margin-top: 15px; /* Space from image */
}
.project p strong {
    color: var(--primary-color); /* Highlight skills */
}


/* Slider Buttons */
.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--text-light);
    border: none;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.2s;
    line-height: 1; /* Fix vertical alignment of arrow character */
}

.slider-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.slider-button.prev {
    left: 0; /* Align to the edge of the container */
}

.slider-button.next {
    right: 0; /* Align to the edge of the container */
}

/* Footer Section */
footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 2rem auto 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Keyframe Animations for Entrance */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 1.2s ease-in-out;
}