@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;700;900&display=swap');

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --text-main: #334155;
    --text-light: #94a3b8;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
}

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

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    font-weight: 700;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.logo img {
    height: 50px;
    object-fit: contain;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--accent);
}

.contact-btn a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.contact-btn a:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    z-index: -2;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9));
    z-index: -1;
}

.hero-content {
    color: white;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeIn 1s ease-out;
}

.hero-content h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 900;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.cta-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.cta-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-3px) scale(1.05);
}

/* Sections General */
section {
    padding: 100px 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--bg-white);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4rem;
}

.about-content {
    flex: 1;
    min-width: 300px;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.about-image {
    flex: 1;
    min-width: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

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

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

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--accent);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

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

/* Portfolio / Gallery */
.portfolio {
    background: var(--primary);
    color: white;
}

.portfolio .section-title {
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

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

.gallery-icon {
    font-size: 2rem;
    color: white;
}

/* Contact */
.contact {
    background: var(--bg-white);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: var(--bg-light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

.contact-info {
    flex: 1;
    min-width: 300px;
    padding: 3rem;
    background: var(--primary);
    color: white;
}

.contact-info h3 {
    color: white;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.info-item i {
    color: var(--accent);
    font-size: 1.5rem;
}

.contact-map {
    flex: 2;
    min-width: 300px;
    min-height: 400px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Footer */
footer {
    background: var(--primary-light);
    color: var(--text-light);
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

footer p {
    margin: 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dynamic Gallery Styles */
.view-more-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border: 2px dashed var(--glass-border);
    transition: all 0.3s ease;
}

.view-more-item:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
}

.view-more-link {
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.view-more-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.view-more-content i {
    font-size: 3rem;
}

.view-more-content span {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Page Header for Gallery */
.page-header {
    background: var(--primary);
    padding: 120px 5% 60px;
    text-align: center;
    color: white;
}

.page-header h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-hover);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }
    .nav-links {
        display: none; /* Add a hamburger menu for production */
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .contact-container {
        flex-direction: column;
    }
    .contact-map {
        min-height: 350px;
        width: 100%;
    }
}
