/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=Oswald:wght@400;500;700&family=Cairo:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #cbd5e1;
    /* Light Gray */
    --secondary-color: #64748b;
    /* Slate Gray */
    --accent-color: #94a3b8;
    /* Solid Steel (fallback/border) */
    --accent-gradient: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 50%, #64748b 100%);
    /* Steel Gradient */
    --bg-dark: #1e293b;
    /* Slate 800 */
    --bg-darker: #0f172a;
    /* Slate 900 */
    --bg-card: #334155;
    /* Slate 700 */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid transparent;
    border-image: var(--accent-gradient) 1;
    transition: all 0.3s ease;
}

header.scrolled {
    background: linear-gradient(180deg, #334155 0%, #0f172a 100%);
    padding: 0.8rem 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid transparent;
    border-image: var(--accent-gradient) 1;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logo a,
.logo img {
    height: 40px;
    margin: 0 !important;
    padding: 0 !important;
}

.logo span {
    vertical-align: middle;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 700;
}

.lang-toggle a {
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.lang-toggle a.active {
    background: var(--accent-gradient);
    color: var(--bg-darker);
    border-color: transparent;
}

[lang="ar"] {
    font-family: 'Cairo', sans-serif;
}

[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3,
[lang="ar"] h4,
[lang="ar"] h5,
[lang="ar"] h6 {
    font-family: 'Cairo', sans-serif;
}

[lang="ar"] .lang-toggle {
    margin-left: 0;
    margin-right: 0;
}

[lang="ar"] .service-list li {
    padding-left: 0;
    padding-right: 1.5rem;
}

[lang="ar"] .service-list li::before {
    left: auto;
    right: 0;
}

[lang="ar"] .cta-banner {
    border-left: none;
    border-right: 5px solid var(--accent-color);
}

[lang="ar"] .about-card {
    border-top: 3px solid var(--accent-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.6)), url('hero-bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    animation: fadeUp 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent-gradient);
    color: var(--bg-darker);
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #fff;
    opacity: 0.2;
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    margin-left: 1rem;
}

.btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-darker);
}

/* About Section */
section {
    padding: 6rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-title span {
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
}

.about-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 4px;
    border-top: 3px solid var(--accent-color);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-card p {
    color: var(--secondary-color);
}

/* Services */
.services {
    background: var(--bg-darker);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-item {
    position: relative;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.service-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.service-item:hover .service-img {
    transform: scale(1.05);
}

.service-content {
    padding: 2.5rem;
}

.service-icon {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.service-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-item p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.service-list {
    list-style-type: none;
    margin-top: 1rem;
}

.service-list li {
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    /* Kept solid for list bullets as gradients on pseudo-elements are tricky */
}

/* Call to Action Banner */
.cta-banner {
    background: linear-gradient(90deg, var(--bg-card) 0%, var(--bg-dark) 100%);
    border-left: 5px solid var(--accent-color);
    padding: 4rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 4rem 5%;
    border-radius: 8px;
}

.cta-text h2 {
    margin-bottom: 0.5rem;
}

/* Gallery / Projects */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    height: 300px;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h4 {
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-dark);
    border: 1px solid #334155;
    color: #fff;
    border-radius: 4px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Footer */
footer {
    background: var(--bg-darker);
    padding: 4rem 5% 2rem;
    border-top: 1px solid #1e293b;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem 5%;
        border-bottom: 1px solid #334155;
        transform: translateY(-150%);
        transition: var(--transition);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
        /* Stack buttons on mobile */
    }

    .lang-toggle {
        margin-left: 0;
        margin-top: 0;
    }

    [lang="ar"] .lang-toggle {
        margin-right: 0;
    }

    [lang="ar"] .nav-links {
        text-align: right;
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}