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

:root {
    --bg-dark: #0a0f1e;
    --bg-card: rgba(255, 255, 255, 0.03);
    --primary: #c5a059;
    --primary-glow: rgba(197, 160, 89, 0.3);
    --text-white: #ffffff;
    --text-dim: #a0a6b1;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Final Slider Positions */
    --title-pos: 175px;
    --desc-pos: 200px;
    --btn-pos: -20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.6;
    direction: rtl;
}

/* 3D Glass Effect Utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

/* Contact Info Refined */
.contact-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.contact-icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
    transition: var(--transition);
}

.contact-wrapper:hover .contact-icon-circle {
    background: var(--primary);
    color: white;
}

.contact-wrapper:hover .contact-number {
    color: var(--primary);
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, var(--bg-dark), transparent);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    /* For the <a> wrapper */
}

.site-logo {
    height: 50px;
    width: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: white;
    /* To hide transparency artifacts if any */
}

/* Hero Slider */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    /* Center the whole content block vertically */
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

/* Slider Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    backdrop-filter: blur(5px);
}

.slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--primary-glow);
}

.slider-btn.prev {
    right: 30px;
}

.slider-btn.next {
    left: 30px;
}

/* Mobile Slider Adjustments */
@media (max-width: 768px) {
    header#home {
        height: 80vh !important;
        /* Smaller on mobile */
    }

    .slide-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }

    /* تحكم الموبايل - السطر الأول */
    .slide-content h1 {
        font-size: 1.8rem !important;
        margin-top: -60px;
        /* ارفع أو نزل من هنا */
        margin-bottom: 20px;
    }

    /* تحكم الموبايل - السطر الثاني */
    .slide-content p {
        font-size: 1rem !important;
        padding: 0 10px;
        margin-top: 40px;
        /* ارفع أو نزل من هنا */
        margin-bottom: 20px;
    }

    /* تحكم الموبايل - الزر */
    .slide-content .btn {
        margin-top: 10px;
        /* ارفع أو نزل من هنا */
    }

    .slider-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .slider-btn.prev {
        right: 10px;
    }

    .slider-btn.next {
        left: 10px;
    }
}

/* Slider Backgrounds */
.slide:nth-child(1) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('assets/slider1.jpg');
}

.slide:nth-child(2) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('assets/slider2.jpg');
}

.slide:nth-child(3) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('assets/slider3.jpg');
}

.slide:nth-child(4) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('assets/slider4.jpg');
}

.slide:nth-child(5) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('assets/slider1.jpg');
}

.slide:nth-child(6) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('assets/slider2.jpg');
}

.slide-content {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Changed to center for manual control */
    padding: 20px;
    z-index: 2;
    height: 100%;
    /* Full height to allow movement across the whole slide */
}

/* 1. السطر الأول: العنوان (اسم الشركة) */
.slide h1 {
    font-size: 2.8rem;
    color: var(--primary);
    font-weight: 800;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    margin-top: var(--title-pos);
    margin-bottom: 20px;
}

/* 2. السطر الثاني: الوصف (الجملة التوضيحية) */
.slide p {
    font-size: 1.2rem;
    color: var(--text-white);
    font-weight: 600;
    margin-top: var(--desc-pos);
    margin-bottom: 30px;
}

/* 3. السطر الثالث: الزر (تواصل معنا) */
.slide .btn {
    margin-top: var(--btn-pos);
    display: inline-block;
}

/* Companies Section */
.companies-grid {
    padding: 100px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.company-card {
    padding: 40px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.company-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.1);
}

.company-card h3 {
    margin: 20px 0;
    color: var(--primary);
}

.company-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

/* Stats Section Refined */
.stats {
    display: flex;
    justify-content: center;
    padding: 80px 5%;
    gap: 30px;
    flex-wrap: wrap;
    background: linear-gradient(to bottom, var(--bg-dark), rgba(197, 160, 89, 0.05));
}

.stat-item {
    flex: 1;
    max-width: 350px;
    min-width: 280px;
    padding: 50px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.02);
    will-change: transform, box-shadow;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    background: rgba(197, 160, 89, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(197, 160, 89, 0.1);
}

.stat-item i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 25px;
    transition: transform 0.4s ease;
}

.stat-item:hover i {
    transform: scale(1.1);
}

.stat-item h3 {
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 10px;
    font-weight: 700;
}

.stat-item p {
    color: var(--text-dim);
    font-size: 1rem;
    margin-bottom: 25px;
}

.stat-value {
    font-size: 2.2rem;
    color: var(--primary);
    font-weight: 800;
    text-shadow: 0 0 15px var(--primary-glow);
}

/* Global Buttons */
.btn {
    display: inline-block;
    padding: 12px 35px;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    text-align: center;
    will-change: transform, box-shadow;
}

.btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-3px) scale(1.05);
}

/* Footer */
footer {
    padding: 60px 5%;
    background: #050810;
    border-top: 1px solid var(--glass-border);
}

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

.footer-links a {
    display: block;
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-right: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--primary);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.footer-contact p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    color: var(--primary);
    margin-left: 12px;
    font-size: 1.1rem;
}

.footer-contact a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--text-white);
    text-shadow: 0 0 10px var(--primary-glow);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* About Us Section */
.about-section {
    padding: 100px 5%;
    background: rgba(255, 255, 255, 0.01);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
}

.about-content {
    padding: 50px;
    line-height: 2;
    font-size: 1.2rem;
    color: var(--text-dim);
    text-align: center;
    border-radius: 30px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.value-card {
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    will-change: transform, box-shadow;
}

.value-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    background: rgba(197, 160, 89, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(197, 160, 89, 0.1);
}

.value-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: block;
    transition: transform 0.4s ease;
}

.value-card:hover i {
    transform: scale(1.15) rotate(8deg);
}

.value-card h3 {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 15px;
}

.value-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.company-card:active,
.stat-item:active,
.value-card:active,
.contact-box:active {
    transform: translateY(-5px) scale(0.98);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
    transition: all 0.1s ease;
}

.contact-strip {
    padding: 80px 5%;
    background: linear-gradient(to bottom, transparent, rgba(197, 160, 89, 0.05));
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-box {
    padding: 50px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    will-change: transform, box-shadow;
    /* Optimization */
}

.contact-box:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    background: rgba(197, 160, 89, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(197, 160, 89, 0.1);
}

.contact-box i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 25px;
    display: block;
    transition: transform 0.4s ease;
}

.contact-box:hover i {
    transform: scale(1.1) rotate(5deg);
}

.contact-box h3 {
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 15px;
}

.contact-box p {
    color: var(--text-dim);
    margin-bottom: 20px;
    font-size: 1rem;
}

.contact-box a {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-box a:hover {
    color: var(--text-white);
    text-shadow: 0 0 15px var(--primary);
}

/* Animations */
/* Optimization for smooth scrolling and animations */
.fade-in,
.stat-item,
.company-card,
.value-card,
.contact-box {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) translateZ(0);
    }

    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Navbar Stability */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 5%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 15, 30, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

/* Company Pages Styles */
.service-section {
    padding: 100px 5%;
}

.service-card {
    padding: 40px;
    border-radius: 20px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: rgba(197, 160, 89, 0.05);
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    margin-bottom: 20px;
    color: var(--text-dim);
    position: relative;
    padding-right: 35px;
    line-height: 1.6;
}

.service-list li i {
    position: absolute;
    right: 0;
    top: 5px;
    color: var(--primary);
    font-size: 1.1rem;
}

.service-list li strong {
    color: var(--text-white);
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 700;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.back-btn:hover {
    transform: translateX(-10px);
    text-shadow: 0 0 10px var(--primary-glow);
}

header.company-hero {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
}

header.company-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 15, 30, 0.8), rgba(10, 15, 30, 0.9));
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

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

.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-white);
}

.mobile-only {
    display: none;
}

/* Responsive Design Improvements */
@media (max-width: 1024px) {
    .slide h1 {
        font-size: 3rem;
    }

    .nav-links {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 15px 5%;
        background: var(--bg-dark);
        justify-content: space-between;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 15, 30, 0.98);
        backdrop-filter: blur(20px);
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        gap: 20px;
        padding: 40px;
    }

    .nav-links.active {
        right: 0;
    }

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

    .nav-links li a {
        font-size: 1.8rem !important;
        font-weight: 700;
        color: var(--text-white);
        display: block;
        padding: 15px;
        border-radius: 15px;
        transition: var(--transition);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links li a:hover {
        background: rgba(197, 160, 89, 0.1);
        color: var(--primary);
        transform: scale(1.05);
    }

    /* Mobile Phone Button in Menu */
    .nav-phone {
        background: var(--primary) !important;
        color: var(--bg-dark) !important;
        border-radius: 50px !important;
        margin-top: 20px;
        box-shadow: 0 10px 20px var(--primary-glow);
        font-weight: 800 !important;
        border: none !important;
    }

    .logo {
        font-size: 1.2rem;
    }

    .slide h1 {
        font-size: 2rem;
        padding: 0 10px;
        line-height: 1.4;
    }

    .slide p {
        font-size: 1rem;
        padding: 0 20px;
    }

    .slide {
        align-items: flex-end;
        padding-bottom: 80px;
        /* Less padding on mobile */
    }

    .slide-content {
        padding: 15px;
        width: 100%;
    }

    .companies-grid {
        padding: 60px 5%;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .company-card {
        padding: 30px 20px;
    }

    .stats {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        padding: 60px 5%;
    }

    .stat-item {
        width: 100%;
        max-width: 350px;
        flex: none;
        margin: 0 auto;
    }

    .stat-item h2, .stat-item h3 {
        font-size: 2.2rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    /* Footer Fixes */
    footer {
        padding: 60px 20px !important;
        overflow: visible !important;
    }

    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 40px !important;
        width: 100%;
    }

    .footer-info,
    .footer-links,
    .footer-contact {
        width: 100%;
        max-width: 100%;
    }

    .social-icons {
        justify-content: center !important;
        margin-top: 15px;
    }

    .footer-contact p {
        word-break: break-all;
        margin-bottom: 10px;
    }

    .back-btn {
        font-size: 0.9rem;
    }

    header.company-hero h1 {
        font-size: 1.8rem !important;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .slide h1 {
        font-size: 1.6rem;
    }

    .slide-content .btn {
        padding: 8px 20px !important;
        font-size: 0.9rem;
    }

    .company-card h3 {
        font-size: 1.2rem;
    }
}