/* Design Tokens & Reset */
:root {
    --primary: #402f92;
    --primary-hover: #2e2170;
    --primary-light: #eef0fa;
    --dark-bg: #0b081c; /* خلفية داكنة مائلة للنيلي لتناسق الألوان */
    --card-bg: rgba(26, 21, 54, 0.6); /* كروت مائلة للنيلي لتناسق الألوان */
    --card-border: rgba(255, 255, 255, 0.06);
    --text-main: #f8fafc;
    --text-muted: #a3aed0;
    --accent: #ec4428;
    --transition-speed: 0.3s;
    --font-family: 'Cairo', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(11, 8, 28, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    transition: all var(--transition-speed) ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.5rem;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-speed);
}

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

.logo-text .highlight {
    color: var(--accent); /* تغيير لون التمييز إلى البرتقالي المحمر الخاص بالشعار للتناسق */
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: color var(--transition-speed);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-speed);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.btn-nav {
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.btn-nav:hover {
    background-color: var(--primary-hover);
    color: white;
}

.btn-nav::after {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all var(--transition-speed);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background: radial-gradient(circle at 10% 20%, rgb(11, 8, 28) 0%, rgb(26, 21, 54) 90.1%);
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(11, 8, 28, 0.8) 100%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-badge {
    align-self: flex-start;
    background-color: rgba(236, 68, 40, 0.12);
    color: var(--accent);
    border: 1px solid rgba(236, 68, 40, 0.25);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-speed);
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
    border: none;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gear-animation {
    position: relative;
    width: 250px;
    height: 250px;
}

.gear {
    position: absolute;
    line-height: 1;
}

.gear-large {
    font-size: 10rem;
    top: 20px;
    left: 20px;
    animation: spin 20s linear infinite;
    opacity: 0.8;
}

.gear-small {
    font-size: 6rem;
    top: 110px;
    left: 140px;
    animation: spin-back 12s linear infinite;
    opacity: 0.6;
}

/* Sections Global */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 5px;
}

.section-line {
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: transform var(--transition-speed);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.feature-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: all var(--transition-speed);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(64, 47, 146, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.service-description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Branches Section */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.branch-card {
    background: linear-gradient(145deg, rgba(26, 21, 54, 0.8), rgba(11, 8, 28, 0.9));
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-speed);
}

.branch-card:hover {
    transform: translateY(-5px);
}

.branch-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(14, 165, 233, 0.15);
    color: var(--accent);
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

.branch-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 20px;
    color: var(--primary);
}

.branch-desc {
    color: var(--text-main);
    font-size: 1.05rem;
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
}

.branch-links {
    display: flex;
    justify-content: flex-end;
}

.branch-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid var(--card-border);
    transition: all var(--transition-speed);
}

.branch-phone:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Contact Section */
.contact-box {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.contact-info {
    padding: 50px;
    background: radial-gradient(circle at 100% 0%, rgba(64, 47, 146, 0.15) 0%, transparent 80%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.contact-desc {
    color: var(--text-muted);
    margin-bottom: 40px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-icon {
    font-size: 1.8rem;
    background-color: rgba(255, 255, 255, 0.05);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.info-item h4 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.info-item p {
    color: var(--text-muted);
}

.info-item a {
    color: var(--text-main);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.info-item a:hover {
    color: var(--primary);
}

.contact-form-container {
    padding: 50px;
    border-right: 1px solid var(--card-border);
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input, .form-group textarea {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: var(--font-family);
    transition: all var(--transition-speed);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.2);
}

.form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.form-status.success {
    background-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    display: block;
}

.form-status.error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: block;
}

/* Footer */
.footer {
    background-color: #070514;
    padding: 40px 0;
    border-top: 1px solid var(--card-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--primary);
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-back {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

/* Gallery Section */
.gallery-section {
    background-color: rgba(15, 23, 42, 0.4);
}

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

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--card-border);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-speed) ease;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(transparent, rgba(11, 8, 28, 0.95));
    transform: translateY(100%);
    transition: transform var(--transition-speed) ease;
}

.gallery-overlay h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

.gallery-overlay p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Hover Effects */
.gallery-item:hover {
    transform: translateY(-5px);
    border-color: rgba(64, 47, 146, 0.45);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

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

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

@media (hover: none) {
    .gallery-overlay {
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(11, 8, 28, 0.85) 50%);
    }
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-content {
        align-items: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .contact-form-container {
        border-right: none;
        border-top: 1px solid var(--card-border);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--dark-bg);
        z-index: 999;
        transition: left var(--transition-speed) ease;
        border-top: 1px solid var(--card-border);
    }

    .nav.open {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        padding: 40px 20px;
        gap: 25px;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .btn-nav {
        width: 100%;
        text-align: center;
    }

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

    .about-stats {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
