/*==========================================================
  1. ROOT VARIABLES
==========================================================*/
:root {
    --primary: #613f99;
    --secondary: #7A5AF8;
    --dark: #111111;
    --text: #444444;
    --white: #ffffff;
    --light: #fafafa;
}

/*==========================================================
  2. RESET & BASE
==========================================================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Offset for fixed navbar */
*[id] {
    scroll-margin-top: 80px;
}

body {
    font-family: "Roboto Condensed", sans-serif;
    color: var(--dark);
    background: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================
   FONT FAMILY – CLASS BASED
   ========================================================== */
/* Default: Roboto Condensed for English */
body,
.navbar-nav .nav-link,
.explore-btn,
.hero-content h1,
.hero-content h3,
.hero-content p,
.section-title,
.section-subtitle,
.advantage-card h4,
.advantage-card p,
.vision-pillar h4,
.vision-pillar p,
.capability-card h4,
.capability-card p,
.testimonial-text,
.t-author-info h4,
.t-author-info span,
.contact-card-content h5,
.contact-card-content p,
.contact-card-content a,
.form-header h3,
.form-header p,
.form-group label,
.form-control,
.btn-submit,
.footer-description,
.footer-links ul li a,
.footer-legal a,
.footer-copyright,
.section-tag,
.gradient-text,
.hero-tagline {
    font-family: "Roboto Condensed", sans-serif;
}

/* Arabic: Cairo font – applied via body class */
body.lang-ar,
body.lang-ar .navbar-nav .nav-link,
body.lang-ar .explore-btn,
body.lang-ar .hero-content h1,
body.lang-ar .hero-content h3,
body.lang-ar .hero-content p,
body.lang-ar .section-title,
body.lang-ar .section-subtitle,
body.lang-ar .advantage-card h4,
body.lang-ar .advantage-card p,
body.lang-ar .vision-pillar h4,
body.lang-ar .vision-pillar p,
body.lang-ar .capability-card h4,
body.lang-ar .capability-card p,
body.lang-ar .testimonial-text,
body.lang-ar .t-author-info h4,
body.lang-ar .t-author-info span,
body.lang-ar .contact-card-content h5,
body.lang-ar .contact-card-content p,
body.lang-ar .contact-card-content a,
body.lang-ar .form-header h3,
body.lang-ar .form-header p,
body.lang-ar .form-group label,
body.lang-ar .form-control,
body.lang-ar .btn-submit,
body.lang-ar .footer-description,
body.lang-ar .footer-links ul li a,
body.lang-ar .footer-legal a,
body.lang-ar .footer-copyright,
body.lang-ar .section-tag,
body.lang-ar .gradient-text,
body.lang-ar .hero-tagline {
    font-family: "Cairo", sans-serif;
}

a {
    text-decoration: none;
}

img {
    width: 100%;
    display: block;
}

.container {
    max-width: 1400px;
}

/*==========================================================
  3. NAVBAR
==========================================================*/
.custom-navbar {
    padding: 10px 0;
    transition: 0.4s;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
}

.navbar-brand img {
    height: 50px;
}

.navbar-nav {
    gap: 18px;
}

.nav-link {
    font-size: 17px;
    font-weight: 600;
    color: #111;
    position: relative;
    transition: 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 3px;
    border-radius: 30px;
    background: var(--primary);
}

.explore-btn {
    background: var(--primary);
    color: #fff;
    padding: 18px 32px;
    border-radius: 60px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.35s;
}

.explore-btn:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(90, 54, 214, 0.35);
}

.navbar-toggler {
    font-size: 28px;
}

/*==========================================================
  4. HERO SECTION
==========================================================*/
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: url('../images/hero/hero.png') center center / cover no-repeat;
    padding: 100px 0;
}

/* Watermark */
.hero-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 900px;
    aspect-ratio: 16/9;
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
    background: url('../images/hero/hero.png') center / contain no-repeat;
}
/* Flip the background image horizontally for RTL */
[dir="rtl"] .hero-section,
body.rtl .hero-section {
    background-image: none; /* Remove the background from the main element */
    position: relative;
}

/* Use a pseudo-element to hold the flipped background */
[dir="rtl"] .hero-section::before,
body.rtl .hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/hero/hero.png') center center / cover no-repeat;
    transform: scaleX(-1); /* Mirror the image */
    z-index: 0;
    pointer-events: none; /* So it doesn't block interactions */
}

/* Ensure content is above the pseudo-element */
[dir="rtl"] .hero-section .container,
body.rtl .hero-section .container {
    position: relative;
    z-index: 1;
}
/* Left content */
.hero-content {
    position: relative;
    z-index: 5;
    padding-right: 20px;
}

.hero-tagline {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    display: inline-block;
    background: rgba(90, 54, 214, 0.06);
    padding: 6px 24px;
    border-radius: 60px;
    margin: 20px 0 0 0;
}

.hero-tagline span {
    color: var(--primary);
}

.hero-content h1 {
    margin-top: 20px;
    font-size: 72px;
    font-weight: 900;
    line-height: 1.05;
    color: var(--dark);
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-line {
    width: 70px;
    height: 3px;
    border-radius: 20px;
    background: var(--primary);
    margin: 0 0 25px 0;
}

.hero-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-content h3 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    max-width: 540px;
    margin-bottom: 30px;
}

/* Buttons */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 45px;
}

.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    padding: 16px 36px;
    border-radius: 60px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    transition: all 0.35s ease;
    border: none;
}

.btn-primary-custom:hover {
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(90, 54, 214, 0.35);
    background: var(--secondary);
}

.btn-outline-custom {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 14px 36px;
    border-radius: 60px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    background: transparent;
    transition: all 0.35s ease;
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(90, 54, 214, 0.2);
}

/* Feature cards */
.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1 1 180px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(90, 54, 214, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.feature-text h5 {
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
    margin-bottom: 2px;
}

.feature-text p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Stats */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px 30px;
    padding: 20px 30px;
    background: var(--primary);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(90, 54, 214, 0.25);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.stat-number span {
    color: rgba(255, 255, 255, 0.5);
}

.stat-number-ksa {
    font-size: 28px;
}

.stat-label {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    margin-top: 2px;
}

/* Right image */
.hero-image-wrapper {
    position: relative;
    padding-left: 20px;
}

.hero-image {
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(90, 54, 214, 0.25);
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: scale(1.02);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-overlay-brand {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
}

.hero-image:hover .image-overlay-brand {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(90, 54, 214, 0.2);
}

.image-overlay-brand img {
    height: 40px;
    width: auto;
}

.image-overlay-brand .brand-tag {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    letter-spacing: 0.02em;
    margin-left: auto;
}

/* Purple shape */
.purple-shape {
    position: absolute;
    width: 700px;
    height: 700px;
    background: rgba(123, 97, 255, 0.10);
    border-radius: 200px;
    top: -80px;
    left: -100px;
    transform: rotate(-25deg);
    z-index: 0;
    pointer-events: none;
}

/*==========================================================
  5. SECTION HEADER (shared)
==========================================================*/
.section-header {
    margin-top: 50px;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: rgba(90, 54, 214, 0.06);
    padding: 6px 20px;
    border-radius: 50px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.section-tag i {
    font-size: 13px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.15;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-line {
    width: 70px;
    height: 4px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin-bottom: 24px;
}

.section-line.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 1400px;
    margin: 0 auto;
    line-height: 1.7;
}

/*==========================================================
  6. LANGUAGE SWITCHER
==========================================================*/
.language-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 6px 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(90, 54, 214, 0.2);
}

.lang-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 54, 214, 0.3);
}

.lang-btn i {
    font-size: 14px;
}

.lang-btn .fa-chevron-down {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.language-dropdown.active .lang-btn .fa-chevron-down {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(90, 54, 214, 0.06);
    padding: 6px;
    z-index: 1000;
    animation: dropdownFade 0.3s ease;
}

.language-dropdown.active .lang-dropdown {
    display: block;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s ease;
}

.lang-item:hover {
    background: rgba(90, 54, 214, 0.06);
    color: var(--primary);
}

.lang-item.active {
    background: var(--primary);
    color: #fff;
}

.lang-item.active:hover {
    background: var(--secondary);
    color: #fff;
}

.lang-code {
    font-weight: 700;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 8px;
    border-radius: 6px;
    min-width: 30px;
    text-align: center;
}

.lang-item.active .lang-code {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.lang-name {
    font-size: 13px;
}

/*==========================================================
  7. RESPONSIVE
==========================================================*/
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 60px;
    }
    .purple-shape {
        width: 550px;
        height: 550px;
        left: -40px;
    }
}

@media (max-width: 992px) {
    .hero-section {
        min-height: auto;
        padding: 120px 0 60px;
    }
    .hero-content h1 {
        font-size: 50px;
    }
    .hero-content h3 {
        font-size: 22px;
    }
    .hero-content p {
        font-size: 17px;
    }
    .hero-watermark {
        display: none;
    }
    .hero-image-wrapper {
        padding-left: 0;
        margin-top: 40px;
    }
    .purple-shape {
        width: 450px;
        height: 450px;
        top: -30px;
        left: -30px;
    }
    .hero-features {
        gap: 15px;
    }
    .feature-item {
        flex: 1 1 100%;
    }
    .hero-stats {
        padding: 20px 25px;
        gap: 15px;
    }
    .stat-number {
        font-size: 28px;
    }
    .section-title {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 38px;
    }
    .hero-tagline {
        font-size: 16px;
        padding: 4px 16px;
    }
    .hero-content h3 {
        font-size: 20px;
    }
    .hero-content p {
        font-size: 16px;
        max-width: 100%;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-primary-custom,
    .btn-outline-custom {
        justify-content: center;
        width: 100%;
    }
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 25px;
    }
    .stat-number {
        font-size: 24px;
    }
    .purple-shape {
        width: 300px;
        height: 300px;
        top: 0;
        left: -20px;
    }
    .section-title {
        font-size: 28px;
    }
    .section-subtitle {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 28px;
    }
    .hero-line {
        width: 50px;
        margin: 25px 0;
    }
    .hero-features {
        flex-direction: column;
        gap: 12px;
    }
    .hero-stats {
        padding: 15px 20px;
        gap: 10px;
    }
    .stat-number {
        font-size: 20px;
    }
    .stat-label {
        font-size: 13px;
    }
    .hero-image img {
        border-radius: 24px;
    }
    .image-overlay-brand {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        padding: 10px 16px;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    .image-overlay-brand .brand-tag {
        margin-left: 0;
        width: 100%;
    }
    .image-overlay-brand img {
        height: 30px;
    }
    .section-title {
        font-size: 24px;
    }
    .section-tag {
        font-size: 12px;
        padding: 4px 16px;
    }
    .section-line {
        width: 50px;
    }
    .lang-btn {
        padding: 4px 12px;
        font-size: 12px;
    }
    .lang-btn i {
        font-size: 12px;
    }
    .lang-dropdown {
        right: -10px;
        min-width: 140px;
    }
    .lang-item {
        font-size: 13px;
        padding: 6px 12px;
    }
}