﻿/* 
 * Kafaa Development & Training - Main Stylesheet
 * Primary Color: Black/Dark Grey (from Logo Icon)
 * Accent Color: Lime Green (from Logo Text 'Kafaa')
 */

:root {
    --primary-color: #2c2c2c;
    /* Soft Black from Icon */
    --secondary-color: #a4ce3a;
    /* Lime Green from 'Kafaa' Text */
    --text-color: #333333;
    --light-bg: #f9fbf2;
    /* Slight green tint for harmony */
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;

    /* Fonts */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Roboto', sans-serif;

    /* Animations */
    --hover-lift: translateY(-5px);
    --glow-shadow: 0 10px 20px rgba(164, 206, 58, 0.3);
}

/* Animations Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-ar);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Defaults for English */
body[dir="ltr"] {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-info {
    display: flex;
    gap: 20px;
}

.top-bar-info i {
    color: var(--secondary-color);
    margin-left: 8px;
    /* RTL default */
}

body[dir="ltr"] .top-bar-info i {
    margin-left: 0;
    margin-right: 8px;
}

.top-bar-social a {
    color: var(--white);
    margin-right: 15px;
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.top-bar-social a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Modern Glass Header */
header {
    background-color: transparent;
    position: absolute;
    width: 100%;
    top: 45px;
    /* Matches top bar height */
    z-index: 1000;
    transition: all 0.4s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.scrolled {
    position: fixed;
    top: 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 80px;
}

header.scrolled .navbar {
    height: 80px;
}

header.scrolled .logo span {
    color: var(--primary-color);
}

header.scrolled .nav-links a {
    color: var(--primary-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    transition: height 0.4s ease;
}

.logo {
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px;
    /* Default height */
    transition: height 0.4s ease;
}

/* Default State (Transparent): Show White, Hide Dark */
/* Navbar Logo */
.logo {
    display: flex;
    /* Changed from default to flex */
    align-items: center;
    /* Center items vertically */
    height: 60px;
    /* Limit height */
    gap: 15px;
    /* Spacing between logo and divider */
}

/* Base Logo Styles */
.logo img.logo-white,
.logo img.logo-dark,
.logo img.logo-ilm {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

/* Visibility Toggles for Kafaa Logo */
.logo img.logo-white {
    display: block;
}

.logo img.logo-dark {
    display: none;
}

/* ILM Logo (Always Visible) */
.logo img.logo-ilm {
    height: 45px;
    /* Slightly smaller than main logo */
}

/* Logo Divider */
.logo-divider {
    display: block;
    width: 2px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    /* White initially */
    transition: var(--transition);
}

/* Scrolled State Behavior */
header.scrolled .logo img.logo-white {
    display: none;
}

header.scrolled .logo img.logo-dark {
    display: block;
}

header.scrolled .logo-divider {
    background-color: #ddd;
}

/* Darker divider on scroll */

header.scrolled .logo img {
    height: 50px;
}

/* Old desktop nav styles removed for Unified Hamburger Menu */

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after,
.dropdown:hover .dropbtn::after {
    width: 100%;
}

/* Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown {
    width: 100%;
    text-align: center;
}

.dropdown-content {
    display: none;
    position: static;
    /* Stack vertically in drawer */
    background-color: transparent;
    /* Seamless with drawer */
    min-width: 100%;
    box-shadow: none;
    padding: 0;
    margin-top: 5px;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: #666 !important;
    /* Lighter text for sub-items */
    padding: 10px 0;
    text-decoration: none;
    display: block;
    text-align: center;
    /* Center align sub-items */
    font-size: 1rem;
    font-weight: 500;
    border-bottom: none;
    background: transparent;
}

.dropdown-content a:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--secondary-color) !important;
    transform: none;
    /* No slide for sub-items */
}

/* Show the dropdown menu on hover (Desktop) */
@media (min-width: 993px) {
    .dropdown:hover .dropdown-content {
        display: block;
        animation: fadeIn 0.3s ease;
    }
}

/* Show the dropdown menu on click (JS toggles .active) */
.dropdown.active .dropdown-content {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

/* Rotate arrow when active */
.dropdown.active .dropbtn i {
    transform: rotate(180deg);
}

/* Arrow rotation on hover */


/* Clean up leftover CSS */

/* Dropdown Icon Spacing */
.dropbtn i {
    margin-right: 10px;
    transition: transform 0.3s ease;
}

html[dir="ltr"] .dropbtn i {
    margin-right: 0;
    margin-left: 10px;
}

/* Prevent underline on lang switch */
.nav-links a.lang-switch::after {
    content: none;
}

.lang-switch {
    font-weight: 800;
    font-size: 14px;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    /* Circle */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    /* Override previous padding */
}

.lang-switch:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
    transform: rotate(360deg);
    /* Playful interaction */
}

header.scrolled .lang-switch {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* LTR Override for Dropdown */
body[dir="ltr"] .dropdown-content {
    right: auto;
    left: 0;
}

body[dir="ltr"] .dropdown-content a {
    text-align: left;
}

header.scrolled .lang-switch:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Hero Slider - Full Screen */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Full viewport height */
    overflow: hidden;
    background-color: #000;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(44, 44, 44, 0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    padding: 0 20px;
    transform: translateY(30px);
    opacity: 0;
    transition: all 1s ease 0.5s;
    /* Delay text */
}

.slide.active .hero-content {
    transform: translateY(0);
    opacity: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    font-weight: 300;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    text-align: center;
    color: white;
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 20px;
    margin: 0 auto 10px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: white;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 10px;
    }

    100% {
        opacity: 0;
        top: 25px;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.9) 0%, rgba(0, 51, 102, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(45deg, var(--secondary-color), #8ab628);
    color: var(--white);
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(164, 206, 58, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(164, 206, 58, 0.6);
}

/* Section Common */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Page Header (Inner Pages) */
.page-header {
    background-color: var(--primary-color);
    padding: 160px 0 60px;
    /* Extra top padding for absolute header */
    text-align: center;
    color: var(--white);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
    margin-bottom: 50px;
    position: relative;
    background-image: url('../../Images/vectors/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 44, 44, 0.75);
    /* Dark overlay */
    z-index: 1;
}

.page-header h1,
.page-header p {
    position: relative;
    z-index: 2;
}

/* Split Layout for Pages */
.intro-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.intro-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.1); */
    /* Removed shadow for vector as per clean style */
    object-fit: contain;
    /* Better for vectors */
    max-height: 400px;
}

@media (max-width: 992px) {
    .intro-split-layout {
        grid-template-columns: 1fr;
    }

    .intro-image {
        order: -1;
        /* Image on top on mobile */
        margin-bottom: 20px;
    }
}

.page-header h1,
.page-header p {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Adjust English Header Height */
/* English padding override restored (Font metrics require more space) */
html[dir="ltr"] .page-header {
    padding-top: 180px !important;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.icon-box {
    width: 80px;
    height: 80px;
    background-color: #f4f9e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--secondary-color);
    font-size: 2.2rem;
    transition: transform 0.4s ease;
}

.service-card:hover .icon-box {
    transform: rotateY(180deg);
    background-color: var(--secondary-color);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Unified Mobile/Desktop Menu --- */

/* Mobile Controls Wrapper */
.mobile-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Lang Switcher in Mobile Controls */
.mobile-lang {
    display: flex !important;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.mobile-lang:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Hamburger Icon */
.hamburger {
    display: block;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--white);
    transition: color 0.4s ease;
}

/* Scrolled State */
header.scrolled .hamburger {
    color: var(--primary-color);
}

header.scrolled .mobile-lang {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

header.scrolled .mobile-lang:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Navigation Drawer */
.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    left: auto;
    /* explicit LTR */
    background-color: rgba(255, 255, 255, 0.99);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 150px;
    /* Default: Top Bar (45) + Header (100) + gap */
    gap: 20px;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1), padding-top 0.4s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1004;
    /* Below header (1005) */
}

/* Reduced padding when scrolled (header is shorter/fixed) */
.nav-links.scrolled-padding {
    padding-top: 100px;
    /* Header is 80px, give 20px gap */
}

/* Close Menu Button */
.close-menu {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-menu:hover {
    transform: rotate(90deg);
    color: var(--secondary-color);
}

/* RTL Close Button Position */
/* RTL Close Button Position */
html[dir="rtl"] .close-menu {
    right: auto;
    left: 30px;
}

/* RTL Drawer Direction */
/* RTL Drawer Direction */
html[dir="rtl"] .nav-links {
    right: auto;
    left: -100%;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
}

.nav-links.active {
    right: 0;
}

html[dir="rtl"] .nav-links.active {
    left: 0;
    right: auto;
}

/* Nav Link Styles in Drawer */
.nav-links a {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    /* Always dark text in drawer */
    position: relative;
    padding: 10px 0;
    text-transform: uppercase;
    transition: color 0.3s;
}

/* Lighter Font for English */
/* Lighter Font for English */
html[dir="ltr"] .nav-links a {
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--secondary-color);
    transform: translateX(10px);
}

/* RTL Hover Direction */
/* RTL Hover Direction */
html[dir="rtl"] .nav-links a:hover {
    transform: translateX(-10px);
}

/* Hide the old desktop "lang-switch" inside nav-links since we have mobile-lang */
.nav-links .lang-switch {
    display: none;
}

/* Media Query: Only for specific mobile tweaks if needed */
@media (max-width: 768px) {
    .nav-links {
        max-width: 100%;
        /* Full screen on mobile */
    }

    .top-bar {
        display: none;
        /* Keep hiding top bar on mobile */
    }

    header {
        top: 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    /* Fix Mobile Dropdown Spacing & Click Area */
    .nav-links .dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-links .dropbtn {
        display: inline-flex !important;
        /* Fit content to text width */
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        /* Shrink width so underline matches text */
        position: relative;
        /* Anchor for absolute arrow */
        padding: 15px 0;
    }

    .nav-links .dropbtn i {
        margin: 0 !important;
        /* Absolute position to not affect text centering */
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: -60px;
        /* Position to the left of text in RTL */

        /* Button styling */
        background: rgba(0, 0, 0, 0.05);
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        color: var(--secondary-color);
    }

    /* LTR Support for Arrow Position */
    html[dir="ltr"] .nav-links .dropbtn i {
        left: auto;
        right: -60px;
    }

    /* DISABLE HOVER SHIFT ON MOBILE */
    /* This prevents the text from "jumping" or looking shifted when tapped */
    .nav-links a:hover,
    .nav-links a:active,
    .nav-links .dropbtn:hover,
    .nav-links .dropbtn:active {
        transform: none !important;
    }
}

/* Footer Global Style */
footer {
    background-color: var(--primary-color);
    color: #ddd;
    padding: 60px 0 20px;
    margin-top: 0;
    /* Removed gap */
    position: relative;
    z-index: 10;
}

footer h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3rem;
    position: relative;
}

footer h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
}

html[dir="ltr"] footer h3::after {
    left: 0;
    right: auto;
}

footer ul li {
    margin-bottom: 12px;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
}



/* Footer Mobile Centering */
@media (max-width: 992px) {
    footer {
        text-align: center;
    }

    footer .container {
        justify-content: center !important;
        text-align: center !important;
    }

    footer h3::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
    }

    html[dir="ltr"] footer h3::after {
        left: 50% !important;
        right: auto !important;
    }
}

/* --- Statistics Section --- */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color), #4a4a4a);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.stat-item p {
    font-size: 1.2rem;
    font-weight: 500;
}

.stats-section .container {
    padding: 0 20px;
}

/* --- Accreditations Section --- */
.accreditations-section {
    padding: 60px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.accreditations-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
}

/* Use a generic class for logos */
.accreditations-grid .accred-logo {
    height: 80px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.accreditations-grid .accred-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* --- Client Ticker Section --- */
.clients-section {
    padding: 40px 0;
    background-color: var(--white);
    overflow: hidden;
    border-top: 1px solid #eee;
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    direction: ltr;
    /* CRITICAL: Force LTR for consistent leftward scrolling animation */
}

.ticker {
    display: flex;
    white-space: nowrap;
    flex-wrap: nowrap;
    /* Force single line */
    /* We will use 2 identical sets of logos. 
       We animate from X=0 to X=-50% (the width of one set).
       This creates a seamless loop. */
    width: max-content;
    /* Force it to be as wide as all content */
    min-width: 100%;
    /* Safety */
    animation: ticker 70s linear infinite;
}

.ticker:hover {
    animation-play-state: paused;
}

.ticker-item {
    padding: 0 28px;
    /* User requested 28px */
    display: block;
    /* Images inside block */
    flex: 0 0 auto;
    /* CRITICAL: Prevent flex shrinking */
}

.ticker-item img {
    height: 95px;
    /* User requested 95px */
    width: auto;
    max-width: none;
    /* Override global max-width: 100% */
    object-fit: contain;
    /* Removed filter: grayscale and opacity: 0.7 as requested */
    transition: all 0.3s ease;
}

/* Hover effect removed as requested */

/* Mobile Ticker Adjustments */
@media (max-width: 768px) {
    .ticker {
        animation-duration: 55s;
        /* Mobile speed */
    }

    .ticker-item {
        padding: 0 18px;
        /* User requested 18px */
    }

    .ticker-item img {
        height: 68px;
        /* User requested 68px */
    }
}

/* -------------------------------------------------------------------------- */
/*                               Clients Page Grid                            */
/* -------------------------------------------------------------------------- */

.clients-page-content {
    background-color: var(--light-bg);
}

.country-section {
    margin-bottom: 60px;
}

.country-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

.country-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.client-card {
    width: 180px;
    /* Static width for consistency */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    /* Very subtle shadow for visibility */
}

.client-logo {
    width: 100%;
    height: 90px;
    /* Fixed height as requested */
    object-fit: contain;
    margin-bottom: 10px;
}

.client-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-top: 8px;
    line-height: 1.4;
}

/* Mobile Adjustments for Grid */
@media (max-width: 768px) {
    .clients-grid {
        gap: 20px;
    }

    .client-card {
        width: 45%;
        /* 2 col on mobile */
    }

    .client-name {
        font-size: 13px;
    }
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
        /* Move half the total width (one full set) */
    }
}

/* -------------------------------------------------------------------------- */
/*                          About Us Page Restructure                         */
/* -------------------------------------------------------------------------- */

.about-page .about-content {
    padding-bottom: 80px;
}

.about-page .section-block {
    margin-bottom: 60px;
}

.about-page .section-title {
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    font-size: 2rem;
}

.about-page .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.about-page .intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.about-page .vision-mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.about-page .info-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-top: 5px solid var(--primary-color);
    height: 100%;
    transition: transform 0.3s ease;
}

.about-page .info-card:hover {
    transform: translateY(-5px);
}

.about-page .info-card.mission {
    border-top-color: var(--secondary-color);
}

.about-page .info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.about-page .objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.about-page .objective-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.about-page .objective-card i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 4px;
    flex-shrink: 0;
}

.about-page .values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.about-page .value-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.about-page .value-card:hover {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.about-page .value-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.about-page .service-block {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.about-page .service-header {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.about-page .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.about-page .project-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    height: 100%;
}

[dir="rtl"] .about-page .project-card {
    border-left: none;
    border-right: 4px solid var(--secondary-color);
}

.about-page .project-card h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 1.1rem;
}

.about-page .project-date {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
    display: block;
    font-style: italic;
}

.about-page .partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.about-page .partner-box {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: #555;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

/* Fix for About Page Spacing */
.about-page .section-block {
    margin-bottom: 60px;
}

.about-page .vision-mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-page .info-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary-color);
    text-align: center;
}

.about-page .info-card.mission {
    border-top-color: var(--secondary-color);
}

.about-page .intro-text {
    line-height: 1.8;
    text-align: justify;
    color: #555;
    background-color: #fcfcfc;
    padding: 30px;
    border: 1px solid #eee;
}

.about-page .custom-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.about-page .custom-list i {
    color: var(--secondary-color);
    margin-left: 10px;
}

[dir="ltr"] .about-page .custom-list i {
    margin-left: 0;
    margin-right: 10px;
}

/* =========================================
   Professional Stats Section (Premium Design)
   ========================================= */
.stats-section {
    position: relative;
    background-image: url('../../Images/vectors/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax Effect */
    padding: 60px 0;
    /* Reduced from 120px */
    color: var(--white);
    text-align: center;
    margin-top: 60px;
    overflow: hidden;
}

/* Dark Gradient Overlay */
.stats-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(10, 25, 47, 0.92) 100%);
    z-index: 1;
}

.stats-section .container {
    position: relative;
    z-index: 2;
}

/* Single Strip Layout Container */
.stats-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    /* Reduced from 60px */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    gap: 20px;
}

/* Individual Stat Item */
.stat-item {
    text-align: center;
    position: relative;
    padding: 0 15px;
    flex: 1;
    min-width: 200px;
    transition: transform 0.4s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

/* Animated Icon */
.stat-icon {
    font-size: 2.5rem;
    /* Reduced from 3.5rem */
    background: linear-gradient(45deg, var(--secondary-color), #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 15px rgba(164, 206, 58, 0.3));
}

.stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(10deg);
}

/* Counters Typography */
.stat-item h3 {
    font-size: 3rem;
    /* Reduced from 4.5rem */
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-item p {
    font-size: 1rem;
    /* Reduced from 1.2rem */
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Vertical Dividers between items (Desktop only) */
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

[dir="rtl"] .stat-item:not(:last-child)::after {
    right: auto;
    left: -10px;
}

@media (max-width: 992px) {
    .stats-grid {
        flex-direction: column;
        padding: 30px 20px;
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }

    .stat-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .stat-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .stat-icon {
        font-size: 2rem;
        /* Even smaller for mobile */
        margin-bottom: 10px;
    }

    .stat-item h3 {
        font-size: 2.5rem;
        /* Smaller for mobile */
    }
}/* ============================================


























/* ============================================
   DESKTOP NAVIGATION - RESTORED STABLE V12 (Safe Zones + Bridge)
   ============================================ */
@media (min-width: 1200px) {
    /* 1. Hide Mobile Controls */
    .mobile-controls,
    .hamburger,
    .close-menu {
        display: none !important;
    }

    /* 2. Navbar Container - SAFE ZONES (Restored) */
    .navbar {
        position: relative !important;
        display: flex !important;
        justify-content: center !important; 
        align-items: center !important; 
        min-height: 90px; 
        
        /* RTL: Logo Right (260px safe), Lang Left (80px safe) */
        padding-right: 260px !important; 
        padding-left: 80px !important;
    }
    
    /* LTR: Logo Left (260px safe), Lang Right (80px safe) */
    html[dir="ltr"] .navbar {
        padding-left: 260px !important; 
        padding-right: 80px !important;
    }
    
    /* 3. ABSOLUTE LOGO (Right in RTL) */
    .logo {
        position: absolute !important;
        top: 50%;
        transform: translateY(-50%);
        right: 20px; 
        left: auto;
        margin: 0 !important;
        z-index: 20;
        max-width: 240px; 
        display: flex;
        align-items: center;
    }
    
    html[dir="ltr"] .logo {
        left: 20px;
        right: auto;
    }

    /* 4. STATIC CENTERED NAV LINKS (Restored) */
    .nav-links {
        display: flex !important;
        flex-direction: row;
        align-items: center !important;
        justify-content: center !important;
        
        position: static !important; 
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        
        background: transparent !important;
        box-shadow: none !important;
        gap: 20px; 
        
        /* RESET OFFSETS */
        left: auto !important;
        right: auto !important;
    }
    
    /* Scrolled State */
    header.scrolled .nav-links {
        background: transparent !important;
    }

    /* 5. Link Styling */
    .nav-links li,
    .nav-links .dropdown {
        position: relative;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 6. ABSOLUTE LANG SWITCH (Left in RTL) */
    .nav-links li:last-child {
        position: absolute !important;
        top: 50%;
        transform: translateY(-50%);
        left: 20px; 
        right: auto;
        margin: 0 !important;
    }
    
    html[dir="ltr"] .nav-links li:last-child {
        right: 20px;
        left: auto;
    }

    /* Link Style Restoration & Jitter Fix */
    .nav-links a,
    .nav-links .dropbtn {
        font-size: 0.95rem; 
        font-weight: 600;
        color: white; 
        padding: 6px 0 !important; 
        text-decoration: none;
        white-space: nowrap;
        display: inline-block !important; 
        position: relative;
        transition: color 0.3s ease !important; 
        background: transparent !important;
        
        /* STRICTLY DISABLE TRANSFORM/MARGIN ON HOVER */
        transform: none !important;
        margin: 0 !important;
    }

    .nav-links a:hover,
    .nav-links .dropbtn:hover {
        transform: none !important;
        margin: 0 !important; 
        padding: 6px 0 !important; 
        color: var(--secondary-color);
        background: transparent !important;
    }

    /* Underline Effect */
    .nav-links a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%; 
        transform: translateX(-50%); 
        width: 0;
        height: 2px;
        background-color: var(--secondary-color);
        transition: width 0.3s ease;
        z-index: 10;
        box-shadow: none !important;
    }

    /* No underline for Lang Switch */
    .nav-links .lang-switch::after {
        display: none !important;
    }

    .nav-links a:hover::after,
    .nav-links a.active::after {
        width: 100%; 
    }

    .nav-links a:hover,
    .nav-links a.active,
    .nav-links .dropbtn:hover,
    .nav-links .dropbtn.active {
        color: var(--secondary-color);
    }

    /* 7. Dropdown Menu & Bridge */
    .nav-links .dropdown-content {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%); 
        min-width: 220px;
        background-color: white !important;
        padding: 10px 0;
        border-radius: 8px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.15) !important;
        
        margin-top: 15px; /* Visual Gap */
        
        z-index: 1100;
        border-top: 3px solid var(--secondary-color);
        text-align: right; 
    }
    
    /* INVISIBLE BRIDGE */
    .nav-links .dropdown-content::before {
        content: '';
        position: absolute;
        top: -15px; 
        left: 0;
        width: 100%;
        height: 15px;
        background: transparent;
        display: block;
    }
    
    html[dir="ltr"] .nav-links .dropdown-content {
        text-align: left;
    }

    .nav-links .dropdown:hover .dropdown-content {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .nav-links .dropdown-content a {
        color: #333 !important;
        padding: 10px 20px !important;
        width: 100% !important;
        text-align: inherit !important;
        display: block !important;
        border-bottom: 1px solid #eee;
    }

    .nav-links .dropdown-content a:hover {
        background-color: #f9f9f9 !important;
        color: var(--secondary-color) !important;
    }
    
    .nav-links .dropdown-content a::after {
        display: none;
    }

    /* 8. Language Switcher Button */
    .nav-links .lang-switch {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px !important;
        height: 38px !important;
        border-radius: 50%;
        border: 2px solid rgba(255, 255, 255, 0.4);
        padding: 0 !important;
    }
    
    /* 9. Scrolled Header Adaptations */
    header.scrolled .nav-links a { color: var(--primary-color); }
    header.scrolled .nav-links a:hover,
    header.scrolled .nav-links a.active { color: var(--secondary-color); }
    
    header.scrolled .nav-links .lang-switch {
        border-color: #ddd;
        color: var(--primary-color);
    }
    header.scrolled .nav-links .lang-switch:hover {
        background-color: var(--secondary-color) !important;
        color: white;
        border-color: var(--secondary-color);
        transform: none !important; 
    }
    
    /* Reset Icons */
    .nav-links .dropbtn i {
        margin-right: 5px;
        margin-left: 0;
        font-size: 0.8rem;
        transform: none;
    }
    html[dir="ltr"] .nav-links .dropbtn i {
        margin-right: 0;
        margin-left: 5px;
    }
}

/* Floating Home Button (Mobile Only) */
.floating-home-btn {
    display: none; /* Hidden on Desktop */
}

@media (max-width: 768px) {
    .floating-home-btn {
        position: fixed;
        bottom: 25px;
        left: 25px;
        width: 55px; /* Slightly smaller for mobile */
        height: 55px;
        background-color: var(--secondary-color);
        color: white;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        z-index: 9999;
        transition: all 0.3s ease;
        font-size: 1.4rem;
        opacity: 0;
        animation: fadeInBtn 0.5s forwards 0.5s;
    }

    html[dir='ltr'] .floating-home-btn {
        left: auto;
        right: 25px;
    }

    .floating-home-btn:hover {
        transform: translateY(-5px);
        background-color: var(--primary-color);
        color: white;
    }
}

@keyframes fadeInBtn {
    to { opacity: 1; }
}
