:root {
    --primary-color: #1067b2;
    --secondary-color: #fdb81a;
    --black: #191e29;
    --white: #ffffff;
    --light-gray: #f9fafb;
    --text-color: #333;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;600&family=Cairo:wght@400;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--white);
    color: var(--text-color);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3 {
    font-family: 'Cairo', sans-serif;
    /* Keep Cairo for Arabic Headlines */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -------------------------------------------
   SaaS Header System (Morphing)
------------------------------------------- */
.navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0px;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    pointer-events: none;
    /* Let clicks pass through padding area */
}

.navbar {
    pointer-events: auto;
    width: 90%;
    max-width: 1300px;
    padding: 15px 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
    transition: var(--transition-smooth);
    /* Ensure generic state allows full width */
    max-width: 200px;
}

.logo img {
    height: 59px;
    width: auto;
    display: block;
    /* Prevent image from shrinking when container shrinks */
    min-width: 100%;
    max-width: none;
    /* Critical for scroll effect */
    object-fit: cover;
    object-position: left center;
    transition: var(--transition-smooth);
    filter: brightness(0) invert(1);
    /* Initial state: White */
}

.navbar-wrapper.scrolled .logo img {
    filter: none;
    /* Scrolled state: Original color */
}

.insight-highlight {
    color: var(--secondary-color);
    font-weight: 700;
}

.navbar-wrapper.scrolled .logo.lang-en {
    max-width: 50px;
    /* Adjust based on icon size */
}

.navbar-wrapper.scrolled .logo.lang-ar {
    max-width: 55px;
}


.nav-right {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--white);
    position: relative;
    opacity: 0.9;
    transition: var(--transition-smooth);
}

.navbar-wrapper.scrolled .nav-links a {
    color: var(--black);
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

/* Hide Mobile Lang Button on Desktop */
.mobile-lang-item {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Scrolled State (Pill for Desktop) */
.navbar-wrapper.scrolled {
    padding: 15px 0;
}

.navbar-wrapper.scrolled .navbar {
    width: 90%;
    max-width: 700px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    box-shadow: 0 0 0 1px #0000000d;
    padding: 2px 30px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

/* -------------------------------------------
   Creative Hero Section (Full Screen Slider)
------------------------------------------- */
.creative-hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 10s linear;
    transform: scale(1.1);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
}

.hero-content-wrapper {
    position: relative;
    z-index: 3;
    width: 100%;
    color: var(--white);
    text-align: center;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-text p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(16, 103, 178, 0.2);
}

.btn-primary:hover {
    background-color: #0d5491;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 103, 178, 0.3);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 6px;
}

.btn-text {
    background: none;
    border: none;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.navbar-wrapper.scrolled .btn-text {
    color: #666;
}

.btn-text:hover {
    color: var(--secondary-color);
}

.navbar-wrapper.scrolled .btn-text:hover {
    color: var(--black);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Indicators */
.hero-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 4;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.indicator.active {
    background: var(--secondary-color);
    width: 30px;
    border-radius: 10px;
    border-color: var(--secondary-color);
}


/* -------------------------------------------
   General Sections
------------------------------------------- */
.section {
    padding: 50px 0;
}

.bg-light {
    background-color: var(--light-gray);
}

.bg-dark {
    background-color: var(--black);
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
}

.underline {
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    margin: 0 auto;
}

/* Cards Defaults */
.services-grid,
.about-grid,
.projects-grid,
.gallery-grid,
.contact-wrapper {
    margin-top: 40px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

/* Forms */
.contact-form input,
.contact-form textarea {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: white;
}

.contact-form button {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 2001;
    /* Ensure above overlay */
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    position: absolute;
    left: 0;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.navbar-wrapper.scrolled .mobile-toggle span {
    background: var(--black);
}

.navbar-wrapper .mobile-toggle.active span {
    background: var(--black);
}

.mobile-toggle span:nth-child(1) {
    top: 0;
}

.mobile-toggle span:nth-child(2) {
    top: 9px;
}

.mobile-toggle span:nth-child(3) {
    top: 18px;
}

/* Hamburger Active State (X) */
.mobile-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 992px) {

    /* Mobile: Rectangular Sticky Navbar */
    .navbar-wrapper.scrolled {
        padding: 0;
    }

    .navbar-wrapper.scrolled .navbar {
        width: 100%;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        border-radius: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        padding: 4px 20px;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav-actions {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        /* Changed from center to allow scrolling */
        padding-top: 100px;
        /* Space for top bar */
        padding-bottom: 50px;
        gap: 30px;
        /* Reduced gap */
        z-index: 2000;
        overflow-y: auto;
        /* Enable scrolling for tall content */

        /* Hidden State */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-20px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.5rem;
        color: var(--black);
    }

    /* Show Mobile Lang Button */
    .mobile-lang-item {
        display: block;
        margin-top: 10px;
    }

    .mobile-lang-btn {
        font-size: 1.2rem;
        padding: 10px 20px;
        border: 2px solid var(--primary-color);
        border-radius: 50px;
        background: transparent;
        color: var(--primary-color);
        width: auto;
        display: inline-block;
    }

    .mobile-lang-btn:hover {
        background: var(--primary-color);
        color: white;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .chat-mockup {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .navbar-wrapper {
        padding: 15px 0px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .services-donut {
        max-width: 350px;
        margin: 0 auto;
    }
}


/* Animations */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-in-up {
    animation: fadeSlideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.fade-in {
    animation: fadeSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.4s;
}

.delay-400 {
    animation-delay: 0.7s;
}


/* -------------------------------------------
   Showcase Section (SaaS Image Toggle)
------------------------------------------- */
.showcase-section {
    padding: 120px 0;
    overflow: hidden;
}

.showcase-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.04);
}

/* Visual Side (Images) */
.showcase-visual {
    position: relative;
    width: 100%;
    height: 400px;
    /* Fixed height for stacking */
    border-radius: 16px;
    overflow: hidden;
    background: #f5f5f5;
}

.image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.02) translateY(12px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.image-wrapper.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    z-index: 2;
}

.showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 6s ease;
    filter: brightness(1.02) contrast(1.05);
    /* Slight pop */
}

/* Comparison Slider */
.comparison-slider {
    position: relative;
    width: 100%;
    height: 100%;
    user-select: none;
    overflow: hidden;
}

.after-image,
.before-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.before-image {
    width: 50%;
    z-index: 2;
    overflow: hidden;
    left: 0;
}

[dir="rtl"] .before-image {
    left: auto;
    right: 0;
}

.before-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

[dir="rtl"] .before-image img {
    left: auto;
    right: 0;
}

/* Ensure images inside slider don't drift and have fixed alignment */
.comparison-slider .showcase-img {
    transition: none !important;
    max-width: none !important;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    /* Thinner line for elegance */
    background: var(--white);
    z-index: 10;
    cursor: ew-resize;
    transform: translateX(-50%);
    pointer-events: auto;
}

/* BIG HIT AREA */
.slider-handle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    /* Very easy to grab */
    height: 100%;
    z-index: -1;
}

.handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--white);
    pointer-events: none;
}

.handle-button svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

/* Slider Labels */
.slider-label {
    position: absolute;
    top: 20px;
    /* Moved to top */
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
    letter-spacing: 0.1em;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

/* LTR: Before on Left, After on Right */
.label-before {
    left: 20px;
}

.label-after {
    right: 20px;
}

/* RTL: Before on Right, After on Left */
[dir="rtl"] .label-before {
    left: auto;
    right: 20px;
}

[dir="rtl"] .label-after {
    right: auto;
    left: 20px;
}

.image-wrapper.active .showcase-img {
    transform: scale(1.05);
    /* Slight zoom in while active */
}

/* Placeholders for images using gradients */
.placeholder-gradient {
    width: 100%;
    height: 100%;
}

.gradient-1 {
    background: radial-gradient(circle at top left, #a18cd1 0%, #fbc2eb 100%);
}

.gradient-2 {
    background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
}

.gradient-3 {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
}


/* Content Side */
.showcase-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Pill Tabs */
.showcase-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tab-pill {
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    background: transparent;
    font-family: var(--font-body);
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(16, 103, 178, 0.2);
}

/* Descriptions */
.showcase-descriptions {
    position: relative;
    min-height: 100px;
    /* Reserve space */
}

.desc-item {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    width: 100%;
    pointer-events: none;
}

.desc-item.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    /* Take up space */
    pointer-events: auto;
}

.desc-item h3 {
    font-size: 1.8rem;
    color: var(--black);
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.desc-item p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 992px) {
    .showcase-container {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 30px;
        text-align: center;
    }

    .showcase-visual {
        height: 300px;
    }

    .showcase-tabs {
        justify-content: center;
    }

    .showcase-content {
        align-items: center;
    }
}

/* -------------------------------------------
   Progress Section (Our Works)
------------------------------------------- */
.progress-section-container {
    padding: 0;
    font-family: var(--font-body);
}

.progress-header {
    background-color: var(--secondary-color);
    padding: 80px 20px;
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
    text-align: center;
    color: var(--black);
}

.progress-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--black);
}

.progress-header p {
    max-width: 900px;
    margin: 0 auto 15px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

/* Dark Body for Chart & Insights */
.progress-body {
    background-color: #191e29;
    padding: 80px 20px;
    color: white;
    margin-top: -50px;
    /* Overlap effect if needed, or just flow */
    padding-top: 80px;
    position: relative;
    z-index: -1;
}

/* Chart */
.chart-container-wrapper {
    max-width: 1000px;
    margin: 0 auto 80px;
}

.chart-header-label {
    text-align: center;
    width: 60%;
    margin-left: auto;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.chart-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.chart-label {
    width: 40%;
    text-align: right;
    padding-right: 20px;
    font-size: 0.9rem;
    color: #ccc;
}

[dir="rtl"] .chart-label {
    text-align: left;
    padding-right: 0;
    padding-left: 20px;
}

[dir="rtl"] .chart-header-label {
    text-align: center;
    margin-left: 0;
    margin-right: auto;
}

.chart-bar-area {
    width: 60%;
    display: flex;
    align-items: center;
}

.chart-bar {
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    position: relative;
}

.bar-blue {
    background-color: #1a73e8;
    margin: auto;
}

.bar-yellow {
    background-color: #fdb81a;
    color: black;
    margin: auto;
}

/* Insights Container Enhancement */
.insights-container {
    max-width: 1100px;
    margin: 40px auto 0;
    padding: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Subtle Glow Effect */
.insights-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at center, rgba(255, 193, 7, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.insights-title {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 50px;
    text-align: center;
    font-weight: 700;
}

.insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    /* Increased gap for better breathing room */
}

.insight-item {
    margin-bottom: 10px;
}

.insight-paragraph {
    font-size: 1.15rem;
    /* Increased font size */
    font-weight: 999;
    /* Regular weight closer to light */
    line-height: 1.3;
    /* More comfortable line height */
    color: #e2e8f0;
    /* Softer white */
}

.insight-highlight {
    font-size: 1.6rem;
    /* Slightly larger for emphasis */
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 4px;
    /* Spacing around the numbers */
    background: linear-gradient(120deg, var(--secondary-color), #ffe082);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    /* Helps with gradient clip */
}

@media (max-width: 768px) {
    .progress-header h2 {
        font-size: 2rem;
    }

    .chart-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-label {
        width: 100%;
        text-align: center;
        padding-bottom: 5px;
    }

    [dir="rtl"] .chart-label {
        text-align: center;
    }

    .chart-bar-area {
        width: 100%;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------
   Coverage Section Redesign
------------------------------------------- */
.coverage-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 120px 0;
    overflow: hidden;
    position: relative;
}

.coverage-section .section-header h2 {
    color: white;
}

.coverage-section .section-subtitle {
    color: #94a3b8;
}

.coverage-section .underline {
    background: var(--secondary-color);
}

/* Libya SVG Map Styling */
.libya-map-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    object-fit: contain;
}

.libya-map-svg path {
    fill: rgba(100, 116, 139, 0.3);
    stroke: rgba(148, 163, 184, 0.4);
    stroke-width: 1;
    transition: fill 0.3s ease, stroke 0.3s ease;
    cursor: pointer;
}

.libya-map-svg path:hover,
.libya-map-svg path.active {
    fill: var(--secondary-color);
    stroke: white;
}

/* Coverage Content Intro */
.coverage-content-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 60px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.coverage-stat {
    text-align: center;
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    max-width: 200px;
    margin: 0 auto;
    line-height: 1.4;
}

.coverage-description {
    color: #cbd5e1;
}

.coverage-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.coverage-description p:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: #e2e8f0;
}


/* Grid Layout */
.coverage-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center;
    margin-top: 60px;
}

/* Locations List */
.locations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.location-item:hover,
.location-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--secondary-color);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.loc-icon {
    font-size: 1.5rem;
}

.loc-name {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Map Container */
.coverage-map-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Abstract Tech Map Background */
.map-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px, 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.5;
}

/* Map shape approximation (CSS only visual interest) - Libya Shape */
.map-bg::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none" stroke="rgba(255,255,255,0.15)"><path d="M10,10 L90,10 L90,40 L95,45 L85,90 L15,90 L5,45 L10,40 Z" /></svg>') no-repeat center/contain;
    opacity: 0.3;
}


/* SVG City Markers */
.marker-dot {
    fill: var(--secondary-color);
    filter: drop-shadow(0 0 8px var(--secondary-color));
    cursor: pointer;
    transition: all 0.3s ease;
}

.marker-dot:hover {
    r: 8;
    fill: white;
}

.pulse-ring {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 1;
    opacity: 0.8;
    animation: pulse-svg 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-svg {
    0% {
        r: 6;
        opacity: 0.8;
    }

    100% {
        r: 30;
        opacity: 0;
    }
}

/* Tooltips on Map */
.tooltip {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    color: var(--black);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.map-point:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.map-point:hover .dot {
    transform: scale(1.5);
    background-color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .coverage-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .coverage-map-container {
        height: 400px;
        order: -1;
    }

    .coverage-content-intro {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    .coverage-description p {
        font-size: 1rem;
    }

}

/* -------------------------------------------
   Navbar Dropdown System
------------------------------------------- */
.dropdown-parent {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    height: 100%;
}

.chevron {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chevron svg {
    transition: transform 0.3s ease;
    width: 10px;
    height: 6px;
}

.dropdown-parent:hover .chevron svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    /* Slight offset */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    pointer-events: none;
}

/* Bridge to keep hover active */
.dropdown-parent::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}


.dropdown-menu li {
    width: 100%;
    margin-bottom: 2px;
}

.dropdown-menu li:last-child {
    margin-bottom: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-align: right;
    opacity: 1;
}

[dir="ltr"] .dropdown-menu a {
    text-align: left;
}

@media (min-width: 993px) {
    .dropdown-parent:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .dropdown-menu a:hover {
        background: rgba(16, 103, 178, 0.06);
        color: var(--primary-color);
        transform: translateX(-4px);
    }

    [dir="ltr"] .dropdown-menu a:hover {
        transform: translateX(4px);
    }
}

/* Mobile Dropdown Styling */
@media (max-width: 992px) {
    .dropdown-parent {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        height: auto !important;
        /* Override any desktop fixed height */
    }

    .dropdown-trigger {
        width: 100%;
        justify-content: center;
        padding: 10px 0;
        /* Increased touch target */
    }

    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.03);
        width: 90%;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        padding: 0;
        /* Reset padding when closed */
        margin-top: 5px;
        transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease, padding 0.6s ease;
        border-radius: 12px;
    }

    .dropdown-parent.active .dropdown-menu {
        max-height: 1000px;
        /* Large enough for content */
        opacity: 1;
        visibility: visible;
        padding: 15px 10px;
        /* Vertical, Horizontal */
        margin-top: 10px;
        overflow: visible;
        /* Ensure content is never clipped when open */
        pointer-events: auto;
        /* Enable clicks */
    }

    /* Ensure content is never clipped when open */
}

.dropdown-parent.active .chevron svg {
    transform: rotate(180deg);
}

.dropdown-menu li {
    margin-bottom: 5px;
    /* Separation */
}

.dropdown-menu li:last-child {
    margin-bottom: 0;
}

.dropdown-menu a {
    text-align: center;
    width: 100%;
    font-size: 1.1rem;
    /* Slightly larger text */
    padding: 12px;
    white-space: normal;
    display: block;
}

.dropdown-menu a:hover,
[dir="ltr"] .dropdown-menu a:hover {
    transform: none !important;
    background: transparent;
    color: var(--primary-color);
}

.dropdown-parent::after {
    display: none;
}


/* -------------------------------------------
   Contact Section Enhancement
------------------------------------------- */
#contact {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

/* Subtle background effect */
#contact::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(16, 103, 178, 0.1) 0%, transparent 50%);
    opacity: 0.5;
    pointer-events: none;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

/* Contact Info Styling */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.contact-section-logo {
    max-width: 280px;
    /* Reasonable size */
    height: auto;
    margin-bottom: 20px;
    align-self: flex-start;
    /* Align left in LTR, right in RTL via CSS logic if needed, but flex-start follows direction */
}

/* Ensure consistent alignment in RTL */
[dir="rtl"] .contact-section-logo {
    align-self: flex-start;
    /* Still flex-start because flex direction doesn't flip, but text alignment might. Flex content flows from start. */
}


.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-item span {
    font-size: 1.8rem;
    color: var(--secondary-color);
    background: rgba(255, 193, 7, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.info-item:hover span {
    transform: scale(1.1);
    background: var(--secondary-color);
    color: white;
}

.info-item p {
    font-size: 1.1rem;
    color: #e2e8f0;
    font-weight: 500;
}

/* Contact Form Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(16, 103, 178, 0.1);
}

.contact-form button {
    margin-top: 10px;
    padding: 15px;
    font-size: 1.1rem;
    border-radius: 12px;
}

/* -------------------------------------------
   Chart Title Enhancement
------------------------------------------- */
.chart-header-label {
    text-align: center;
    width: 100%;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    /* Updated to white for visibility on dark background */
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

/* Adjust color if chart section is dark */
.progress-section-container .chart-header-label {
    color: white;
}

.chart-header-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* -------------------------------------------
   Mobile Responsiveness for Contact & Chart
------------------------------------------- */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-top: 30px;
    }

    .contact-info,
    .contact-form {
        padding: 30px 20px;
    }

    .info-item span {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    .info-item p {
        font-size: 1rem;
    }

    /* Chart Title Mobile */
    .chart-header-label {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
}

/* -------------------------------------------
   Services Quadrant Component (Interlocking)
------------------------------------------- */
/* -------------------------------------------
   Services Quadrant Component (Segmented Ring)
------------------------------------------- */
.quadrant-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.services-quadrant {
    width: 100%;
    max-width: 500px;
    height: auto;
    overflow: visible;
    direction: ltr !important;
    /* Force LTR to stabilize SVG coordinates */
}

.quadrant-sector {
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: 200px 200px;
}

.quadrant-sector path {
    stroke: transparent;
    stroke-width: 0;
    transition: all 0.5s ease;
}

.sector-overlay {
    transition: opacity 0.5s ease;
    opacity: 0.6;
    /* Initial blue tint intensity */
}

/* Text styles inside SVG */
.q-num {
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 800;
    fill: rgba(255, 255, 255, 0.9);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    direction: ltr !important;
    text-anchor: middle;
}

.q-label {
    font-family: 'Cairo', sans-serif;
    font-size: 20px;
    font-weight: 700;
    fill: white;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    direction: ltr !important;
}

.q-icon {
    font-size: 36px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    opacity: 0.8;
    transition: all 0.4s ease;
    direction: ltr !important;
}

/* Hover Effects */
.quadrant-sector:hover {
    transform: scale(1.08);
    /* Expand from center */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    z-index: 10;
    /* Bring to front visually */
}

/* Remove tint on hover to show full image color */
.quadrant-sector:hover .sector-overlay {
    opacity: 0;
}

.quadrant-sector:hover path {
    /* Optional: Add a border or glow */
    stroke: var(--secondary-color);
    stroke-width: 2px;
}

/* Hover positioning for numbers - Balanced for LTR base */
.quadrant-sector:hover .q-num.q-num-TL {
    fill: var(--secondary-color);
    transform: scale(1.1) translate(-60px, -60px);
}

.quadrant-sector:hover .q-num.q-num-TR {
    fill: var(--secondary-color);
    transform: scale(1.1) translate(45px, -45px);
}

.quadrant-sector:hover .q-num.q-num-BL {
    fill: var(--secondary-color);
    transform: scale(1.1) translate(-55px, 55px);
}

.quadrant-sector:hover .q-num.q-num-BR {
    fill: var(--secondary-color);
    transform: scale(1.1) translate(45px, 45px);
}

.quadrant-sector:hover .q-label {
    opacity: 1;
    transform: translateY(0);
}

.quadrant-sector:hover .q-icon {
    opacity: 1;
    transform: translateY(-10px) scale(1.1);
}

/* Center Logo Background */
.center-hub circle {
    transition: all 0.5s ease;
}

/* Responsive */
@media (max-width: 992px) {
    .services-quadrant {
        max-width: 400px;
    }

    .q-num {
        font-size: 24px;
    }

    .q-label {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .services-quadrant {
        max-width: 340px;
    }
}

/* -------------------------------------------
   Services Grid & Cards
------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: white;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    border-bottom: 4px solid transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 103, 178, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(16, 103, 178, 0.15);
    border-bottom-color: var(--secondary-color);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card .icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.service-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--primary-color);
}

.service-desc {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 25px;
    }
}