/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --primary-color: #d4af37; /* Premium Gold */
    --primary-dark: #b5952f;
    --bg-dark: #0a0a0a; /* Rich Black */
    --bg-darker: #121212;
    --bg-light: #1a1a1a; /* Dark Gray */
    --text-light: #f5f5f5; /* Off-white for readability */
    --text-muted: #aaaaaa;
    --border-color: #333333;
    
    --font-main: 'Tajawal', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section-padding {
    padding: 80px 0;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   Typography & Titles
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

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

.section-title h2 span {
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.underline {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin-bottom: 30px;
    border-radius: 2px;
}

.center-line {
    margin: 0 auto 30px auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn i {
    margin-left: 8px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    background-color: rgba(10, 10, 10, 0.98);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 130px; /* Larger logo for better detail */
    transition: var(--transition);
    margin-right: 5px; /* Slightly shift left to become more visible in RTL */
}

.navbar.scrolled .logo img {
    height: 110px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
}

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

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

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

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    min-height: 600px;
    background-image: url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0; /* Align right in RTL */
}

.hero h1 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero .slogan {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-light);
}

.hero .hero-desc {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #cccccc;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

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

.about-text strong {
    color: var(--text-light);
}

.about-features {
    margin-top: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 700;
}

.feature i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--primary-color);
    color: var(--bg-dark);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    font-weight: 800;
}

.experience-badge .number {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

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

.service-card {
    background-color: var(--bg-light);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: right;
}

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

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px auto;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

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

.service-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   Call To Action
   ========================================================================== */
.cta {
    background-image: url('../images/service_diagnostics.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(212, 175, 55, 0.85); /* Gold overlay */
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta h2 {
    font-size: 3rem;
    color: var(--bg-dark);
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.3rem;
    color: var(--bg-darker);
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-weight: 500;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.cta .btn-primary {
    background-color: var(--bg-dark);
    color: var(--primary-color);
}

.cta .btn-primary:hover {
    background-color: #000;
}

.cta .btn-secondary {
    border-color: var(--bg-dark);
    color: var(--bg-dark);
}

.cta .btn-secondary:hover {
    background-color: var(--bg-dark);
    color: var(--primary-color);
}

/* ==========================================================================
   Why Choose Us
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.feature-box {
    padding: 30px;
}

.icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px auto;
    border: 2px dashed var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.feature-box:hover .icon-wrapper {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    border-style: solid;
}

.feature-box h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-box p {
    color: var(--text-muted);
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10,10,10,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    transform: translateY(20px);
    transition: var(--transition);
}

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

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

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

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: var(--bg-light);
    transition: var(--transition);
}

.faq-question h3 {
    font-size: 1.2rem;
    margin: 0;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: var(--bg-darker);
}

.faq-answer p {
    color: var(--text-muted);
    padding: 20px 0;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-text h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

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

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

.contact-map {
    flex: 1;
}

.map-link {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-image: url('../images/qemaworkshop.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.map-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.8);
    z-index: 1;
}

.map-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

.map-placeholder p {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
}

.map-placeholder span {
    font-size: 1.2rem;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #050505;
    padding-top: 60px;
    border-top: 2px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 120px;
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 400px;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bg-light);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

.footer h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: var(--text-muted);
}

.footer ul li a:hover {
    color: var(--primary-color);
    padding-right: 5px; /* RTL shift */
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    background-color: #000;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--bg-light);
    padding: 40px 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.testimonial-card .stars {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.testimonial-card .review-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.testimonial-card .customer-name {
    color: var(--text-light);
    font-size: 1.2rem;
}

/* Star rating */
.star-rating i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 2px;
}

/* Statistics Section */
.stats-section {
    background-color: var(--bg-dark);
    color: var(--text-light);
}
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.stat-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.stat-card h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.stat-card p {
    font-size: 1.1rem;
    color: var(--text-muted);
}
/* ==========================================================================
   Floating Buttons
   ========================================================================== */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Positioned on the left side */
    display: flex; /* Show on mobile */
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: var(--transition);
    text-decoration: none;
}

.float-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

.float-whatsapp {
    background-color: #25d366;
}

.float-whatsapp:hover {
    background-color: #1ebe57;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

.float-phone {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

.float-phone:hover {
    background-color: var(--primary-dark);
    color: var(--bg-dark);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   Animations & Utilities
   ========================================================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px); /* RTL */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px); /* RTL */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.appear {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .about-container, .contact-content, .footer-content {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }

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

    .hero .slogan {
        font-size: 1.5rem;
    }
    
    .cta h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-btn {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .navbar.active .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-dark);
        padding: 20px;
        text-align: center;
        border-top: 1px solid var(--border-color);
    }

    .hero {
        height: auto;
        min-height: auto; /* Remove the tall height on mobile */
        padding-top: 150px; /* Give enough space for the fixed navbar */
        padding-bottom: 80px;
        background-attachment: scroll;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-padding {
        padding: 50px 0;
    }

    .floating-buttons {
        display: flex; /* Show only on mobile */
        bottom: 15px;
        left: 15px;
        gap: 10px;
    }

    .float-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}
