/* Font Face */
@font-face {
    font-family: 'Nahdi-Black';
    src: url('fonts/Nahdi-Black.woff2') format('woff2'),
         url('fonts/Nahdi-Black.woff') format('woff'),
         url('fonts/Nahdi-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables (New Dark/Orange Theme) */
:root {
    --bg-dark: #121212;
    --accent-orange: #FF5722;
    --text-light: #f5f5f5;
    --text-muted: #aaaaaa;
    --text-on-accent: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --font-primary: 'Nahdi-Black', sans-serif;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    font-family: var(--font-primary);
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/liquid-blurry.png');
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 100px 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

h1, h2, h3 {
    font-weight: 900;
    line-height: 1.4;
    color: var(--text-light);
}

p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
    font-family: var(--font-primary);
}

.btn-primary {
    background-color: var(--accent-orange);
    color: var(--text-on-accent);
    box-shadow: 0 4px 20px rgba(255, 87, 34, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 87, 34, 0.6);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}
.section-header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 50px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, var(--accent-orange) 0%, transparent 50%);
    opacity: 0.1;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.2; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 { font-size: clamp(3rem, 7vw, 5rem); }
.hero .subtitle {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 20px auto 40px;
    color: var(--text-light);
}
.centered-subtitle {
    text-align: center;
    width: 100%;
}

/* About Section */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 5rem; }
.about-image {
    width: 100%;
    max-width: 350px;
    height: 450px;
    background-color: var(--accent-orange);
    border-radius: 20px;
    position: relative;
    margin: 0 auto;
}
.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    transform: translate(-20px, -20px);
    border: 5px solid var(--bg-dark);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px var(--shadow-color);
}
.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-orange);
}
.service-card i {
    font-size: 2.5rem;
    color: var(--accent-orange);
    margin-bottom: 20px;
}
.service-card h3 { color: var(--text-light); }
.service-card p { color: var(--text-muted); }

/* Why Me Section */
.why-me-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem; }
.why-me-image { 
    width: 100%; 
    height: 500px; 
    border-radius: 20px; 
    overflow: hidden;
    position: relative;
}
.why-me-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-orange);
    mix-blend-mode: multiply;
    opacity: 0.5;
}
.why-me-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    filter: grayscale(80%) brightness(0.8);
}
.why-me-content ul { list-style: none; }
.why-me-content li {
    font-size: 1.2rem;
    padding: 15px 0;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}
.why-me-content li i {
    color: var(--accent-orange);
    font-size: 1.5rem;
    margin-left: 15px;
}

/* --- Portfolio Section on Index Page (بدون تأثيرات أو روابط) --- */
.portfolio-header {
    text-align: center;
    margin-bottom: 60px;
}

.portfolio-header .section-header {
    margin-bottom: 20px;
}

.category-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px var(--shadow-color);
}

.category-btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    background-color: transparent;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-btn.active, .category-btn:hover {
    background-color: var(--accent-orange);
    color: var(--text-on-accent);
}

/* Contact Section */
.contact-wrapper { padding-top: 0; }
.contact {
    background-color: #222;
    padding: 80px 40px;
    border-radius: 30px;
    text-align: center;
    background-image: linear-gradient(45deg, #FF5722, #FF9800);
}
.contact h2 { font-size: 3rem; color: var(--text-on-accent); }
.contact p { color: var(--text-on-accent); max-width: 600px; margin: 20px auto 40px; opacity: 0.9; }
.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.contact-card {
    background: rgba(255,255,255,0.1);
    padding: 20px 30px;
    border-radius: 15px;
    color: var(--text-on-accent);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    backdrop-filter: blur(5px);
    padding: 0;
}
.contact-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}
.contact-card i { 
    font-size: 1.8rem; 
    color: var(--text-on-accent); 
    margin: 0;
}
.contact-card span {
    display: none;
}


/* Floating WhatsApp Icon */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 24px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Footer */
.main-footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 100px;
}
.copyright { 
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 15px;
}
.footer-social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.footer-social-icons a {
    color: var(--accent-orange);
    font-size: 1.5rem;
    transition: color 0.3s ease;
    text-decoration: none;
}
.footer-social-icons a:hover {
    color: var(--text-light);
}


/* Responsive Design */
@media (max-width: 992px) {
    .about-grid, .why-me-grid { grid-template-columns: 1fr; }
    .about-image { margin: 2rem auto 0; }
    .why-me-image { height: 300px; order: -1; margin-bottom: 2rem; }
    .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

@media (max-width: 768px) {
    section { padding: 80px 0; }
    .contact-methods { flex-direction: row; gap: 1rem; }
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    .hero h1 { font-size: clamp(2.5rem, 9vw, 4rem); }
    .hero .subtitle { font-size: 1.1rem; }
    .section-header h2 { font-size: 2.5rem; }

    .portfolio-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 1.5rem;
        padding-bottom: 2rem;
        -webkit-overflow-scrolling: touch;
    }

    .portfolio-grid::-webkit-scrollbar {
        display: none;
    }

    .portfolio-item {
        flex: 0 0 80%;
        max-width: 300px;
    }
}