/* ==================================
   1. VARIABLES & RESET
   ================================== */
:root {
    /* Colors - Light Mode (Updated to Logo Profile: Red/Black/White) */
    --hue-red: 354;
    /* Approximate Red from typical logos */
    --hue-black: 220;

    --primary-color: hsl(var(--hue-red), 78%, 45%);
    /* Logo Red */
    --secondary-color: hsl(var(--hue-black), 15%, 20%);
    /* Logo Black/Charcoal */
    --accent-color: hsl(var(--hue-red), 85%, 55%);
    /* Brighter Red for hovers */

    --background-color: #ffffff;
    /* pure white "light clarity" */
    --surface-color: #f8f9fa;
    /* very light grey for contrast */
    --surface-color-2: #f1f3f5;

    --text-color: #1a1a1a;
    --text-color-light: #6c757d;
    --white: #fff;
    --border-color: rgba(0, 0, 0, 0.08);
    /* Slightly clearer borders */

    /* Typography */
    --body-font: 'Cairo', sans-serif;
    --heading-font: 'Cairo', sans-serif;

    /* Metrics */
    --header-height: 5.5rem;
    --radius-sm: 8px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition: 0.3s ease-out;
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: hsl(var(--hue-red), 70%, 55%);
    --secondary-color: #fff;
    /* White text on dark */
    --background-color: #0f0f0f;
    --surface-color: #1a1a1a;
    --surface-color-2: #252525;
    --text-color: #e9ecef;
    --text-color-light: #adb5bd;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[dir="ltr"] {
    --body-font: 'Outfit', sans-serif;
    --heading-font: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.4s, color 0.4s;
    line-height: 1.7;
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    outline: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================================
   2. REUSABLE CLASSES
   ================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 7rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    /* Bolder */
    color: var(--text-color);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: var(--transition);
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-inline-start: 1rem;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==================================
   3. HEADER & NAV (Centered Layout)
   ================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.4s, padding 0.4s;
}

body.dark-mode .header {
    background-color: rgba(15, 15, 15, 0.95);
}

.header-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 1;
    /* Occupy left part */
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Nav Menu (Center) */
.nav-menu {
    flex: 2;
    /* Occupy center part */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.nav-list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Controls (Right) */
.controls {
    flex: 1;
    /* Occupy right part */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
    height: 100%;
}

.theme-toggle,
.lang-toggle,
.nav-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--surface-color-2);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.theme-toggle:hover,
.lang-toggle:hover,
.nav-toggle:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.lang-text {
    font-size: 0.9rem;
    font-weight: 700;
}

.nav-close,
.nav-toggle {
    display: none;
    cursor: pointer;
}

/* ==================================
   4. HERO SECTION
   ================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--header-height);
    background: radial-gradient(circle at top right, rgba(220, 53, 69, 0.05), transparent 40%),
        linear-gradient(135deg, var(--white) 0%, var(--surface-color) 100%);
    /* White/Light Clarity */
    overflow: hidden;
}

body.dark-mode .hero {
    /* Ensure hero background is dark but keeps the gradient effect if possible, or simplifies it */
    background: radial-gradient(circle at top right, rgba(220, 53, 69, 0.1), transparent 40%),
        linear-gradient(135deg, var(--background-color) 0%, var(--surface-color) 100%);
}

.hero-container {
    text-align: center;
    position: relative;
    z-index: 1;
    padding-bottom: 4rem;
}

.hero-company {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-subtitle {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(220, 53, 69, 0.08);
    color: var(--primary-color);
    /* Red text */
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.2;
    color: var(--text-color);
    /* Black text */
    margin-bottom: 1.5rem;
    font-weight: 900;
}

body.dark-mode .hero-title {
    color: var(--white);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-color-light);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Trust Strip */
.trust-strip {
    width: 100%;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--white);
    text-align: center;
    margin-top: auto;
}

.trust-label {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.trust-logos {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    opacity: 0.6;
    filter: grayscale(100%);
}

.trust-placeholder {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color-light);
}

/* ==================================
   5. SECTIONS (Shared)
   ================================== */
h2.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    /* Red underline */
    border-radius: 2px;
}

[dir="ltr"] h2.section-title::after {
    right: auto;
    left: 0;
}

.section-description {
    font-size: 1.15rem;
    color: var(--text-color-light);
    margin-bottom: 2.5rem;
}

/* About */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: flex-start;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.15rem;
    font-weight: 600;
    background-color: var(--white);
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border-inline-start: 4px solid var(--primary-color);
}

.feat-icon i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.about-stats-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--white);
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.stat-number {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-title {
    font-size: 1rem;
    color: var(--text-color-light);
    font-weight: 600;
}

/* Services */
.services {
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background-color: var(--white);
    padding: 3.5rem 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: start;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 4px;
    background-color: var(--primary-color);
    transition: width 0.4s;
}

[dir="ltr"] .service-card::before {
    right: auto;
    left: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
    width: 100%;
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: var(--surface-color-2);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.service-desc {
    color: var(--text-color-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* Why Us & Steps */
.why-us {
    background-color: var(--surface-color-2);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: center;
    margin-top: 4rem;
}

.why-card {
    padding: 2rem;
}

.why-icon {
    font-size: 3.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.about-feature:hover i,
.why-card:hover .why-icon {
    color: var(--primary-color);
    transition: 0.3s;
}

body.dark-mode .why-icon {
    color: var(--white);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 4rem;
    position: relative;
    flex-wrap: wrap;
}

@media (min-width: 900px) {
    .steps-container::before {
        content: '';
        position: absolute;
        top: 30px;
        left: 50px;
        right: 50px;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent);
        z-index: 0;
    }
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    min-width: 200px;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    border: 6px solid var(--white);
    box-shadow: var(--shadow-sm);
}

body.dark-mode .step-number {
    border-color: var(--background-color);
}


/* ==================================
   6. CONTACT SECTION (Redesign)
   ================================== */
.contact {
    position: relative;
    background-color: #111;
    /* Black for Contact */
    color: var(--white);
    overflow: hidden;
}

body.dark-mode .contact {
    background-color: #050505;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(220, 53, 69, 0.2), transparent 50%);
    z-index: 0;
}

.contact-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
}

.contact-info {
    padding-top: 1rem;
}

.contact-title {
    color: var(--white);
    font-size: 3rem;
}

.contact-intro {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
}

.contact-details {
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

.contact-icon-box {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.contact-item:hover .contact-icon-box {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Floating Form Card */
.contact-form {
    padding: 3.5rem;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
}

body.dark-mode .contact-form {
    background-color: var(--surface-color-2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 1.2rem;
    background-color: var(--surface-color);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.form-input:focus {
    border-color: var(--primary-color);
    background-color: var(--white);
}

/* ==================================
   7. FOOTER (Controlled)
   ================================== */
.footer {
    background-color: var(--surface-color);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo img {
    height: 55px;
    /* Strict footer logo control */
    width: auto;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-color-light);
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-color);
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px);
}

.footer-copy {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-color-light);
    font-size: 0.9rem;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}

[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 30px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Dark Mode Card Overrides */
body.dark-mode .about-feature,
body.dark-mode .stat-card,
body.dark-mode .service-card,
body.dark-mode .contact-form,
body.dark-mode .social-link,
body.dark-mode .why-card {
    background-color: var(--surface-color-2);
    color: var(--text-color);
    border-color: var(--border-color);
}

body.dark-mode .service-card:hover,
body.dark-mode .stat-card:hover {
    background-color: var(--surface-color);
    border-color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-stats-wrapper {
        grid-template-columns: 1fr;
    }

    .nav-list {
        gap: 1.5rem;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    /* Mobile Menu Drawer */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background-color: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 4rem 2rem;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        transition: right 0.4s ease;
        z-index: 2000;

        /* Force override flex props from desktop */
        flex: unset !important;
    }

    [dir="rtl"] .nav-menu {
        right: auto;
        left: -100%;
        transition: left 0.4s ease;
    }

    .nav-menu.show-menu {
        right: 0;
    }

    [dir="rtl"] .nav-menu.show-menu {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        text-align: center;
    }

    .nav-link {
        font-size: 1.25rem;
        display: block;
        width: 100%;
    }

    .nav-close {
        display: block;
        position: absolute;
        top: 2rem;
        right: 2rem;
        font-size: 2rem;
    }

    [dir="rtl"] .nav-close {
        right: auto;
        left: 2rem;
    }

    .header-container {
        justify-content: space-between;
    }

    .logo,
    .controls {
        flex: unset;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    .header {
        height: 4.5rem;
    }

    .logo-img {
        height: 45px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-company {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    /* Fix Hero Company Size */

    .section {
        padding: 4rem 0;
    }

    /* Stack Grids */
    .about-container,
    .contact-container,
    .why-grid,
    .steps-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* Contact Fixes */
    .contact-form {
        padding: 2rem 1.5rem;
    }

    .contact-item {
        gap: 1rem;
        font-size: 1rem;
        /* Smaller Font */
        flex-wrap: nowrap;
    }

    .contact-item a {
        word-break: break-all;
        /* Prevent Email Overflow */
    }

    .locations-list span {
        font-size: 0.95rem;
    }

    /* Trust Logos */
    .trust-logos {
        gap: 1.5rem;
    }
}

/* Very Small Screens */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 0.8rem 1.2rem;
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-outline {
        margin-inline-start: 0;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .controls {
        gap: 0.5rem;
    }

    .theme-toggle,
    .lang-toggle,
    .nav-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}