/* Google Fonts - Cairo for modern Arabic look */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    --primary-color: #FFD700;
    /* Standard Taxi Yellow */
    --primary-hover: #E6C200;
    --bg-dark: #121212;
    --bg-card: #1E1E1E;
    --bg-secondary: #252525;
    --text-white: #FFFFFF;
    --text-gray: #B0B0B0;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
    /* Enforce RTL */
    text-align: right;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Button & UI Components */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #000;
}

.section-padding {
    padding: 5rem 0;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
}

.spinning-logo {
    height: 55px;
    width: 55px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    box-sizing: border-box;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header Logo: Clock-like 2D rotation */
.header .spinning-logo {
    animation: spin 10s linear infinite !important;
    -webkit-animation: spin 10s linear infinite !important;
}

/* Footer & App Logos: 3D rotation */
.footer .spinning-logo,
.app-box .spinning-logo {
    animation: spin3d 3s linear infinite !important;
    -webkit-animation: spin3d 3s linear infinite !important;
}

.app-box .spinning-logo {
    height: 80px;
    width: 80px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-white);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    /* RTL alignment */
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: url('../assets/hero-bg.png') no-repeat center center/cover;
    display: flex;
    align-items: center;
    margin-top: 0;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(18, 18, 18, 0.95) 0%, rgba(18, 18, 18, 0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero h1 span {
    color: var(--primary-color);
    display: block;
}

.hero p {
    margin: 1.5rem 0 2.5rem;
    font-size: 1.25rem;
    color: #e0e0e0;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Sections General */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-img {
    position: relative;
}

.about-img::before {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 100px;
    height: 100px;
    border-top: 5px solid var(--primary-color);
    border-right: 5px solid var(--primary-color);
    z-index: 0;
}

.about-img img {
    width: 100%;
    border-radius: var(--border-radius);
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Apps Section */
.apps-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.app-box {
    flex: 1;
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    min-width: 300px;
}

.app-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
}

.app-box ul {
    margin-bottom: 2rem;
}

.app-box ul li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-gray);
}

.app-box ul li i {
    color: var(--primary-color);
}

/* How It Works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.step-item {
    position: relative;
}

.step-number {
    background: var(--primary-color);
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Join Form */
.join-form {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--border-radius);
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background: #000;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.footer .logo img {
    width: 100px;
    height: 100px;
    animation: none;
    /* Stop the spin animation in footer */
}

.footer .logo {
    gap: 15px;
    /* Increase gap slightly for larger logo */
    font-size: 2rem;
    /* Optional: Make text slightly bigger to match */
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    transform: rotate(360deg);
    color: #fff;
}

.social-links a[href*="facebook"]:hover {
    background: #1877F2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.5);
}

.social-links a[href*="tiktok"]:hover {
    background: #000000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.social-links a[href*="instagram"]:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    box-shadow: 0 0 15px rgba(214, 36, 159, 0.5);
}

.social-links a[href*="youtube"]:hover {
    background: #FF0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 991px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .mobile-toggle {
        display: block;
        color: var(--primary-color);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 250px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 5rem 2rem;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }
}

/* Animated Border for Driver App */
@keyframes borderRotate {
    100% {
        background-position: 0% 50%;
    }
}

/* Floating Animation for App Icons */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Apply Float to Images and Icon Divs in App Box */
.app-box img,
.app-box .fa-phone-alt {
    animation: float 1.5s ease-in-out infinite;
}

/* Add a slight delay to different icons so they don't move in perfect sync */
.app-box:nth-child(2) img {
    animation-delay: 0.5s;
}

.app-box:nth-child(3) .fa-phone-alt {
    animation-delay: 1s;
}

/* Hover Effect for App Cards (Mobile) */
.app-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.animated-border-card {
    position: relative;
    z-index: 0;
    overflow: hidden;
    border-radius: 20px;
    /* Match other cards */
}

/* 3D Carousel Styles (Desktop Only - Visual Ref Match) */
@media (min-width: 992px) {
    .apps-container {
        display: flex !important;
        justify-content: center;
        align-items: center;
        height: 600px;
        position: relative;
        perspective: 1000px;
        transform-style: preserve-3d;
    }

    .carousel-card {
        position: absolute;
        width: 350px;
        transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
        cursor: pointer;
        opacity: 0.5;
        filter: blur(2px) grayscale(50%);
        transform: scale(0.8);
        z-index: 1;
    }

    /* Active Center Card */
    .carousel-card.active {
        opacity: 1;
        filter: blur(0) grayscale(0);
        transform: translateX(0) scale(1.1) translateZ(100px);
        z-index: 10;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    }

    /* Left Card */
    .carousel-card.prev {
        transform: translateX(-320px) scale(0.85) translateZ(-50px) rotateY(20deg);
        z-index: 5;
    }

    /* Right Card */
    .carousel-card.next {
        transform: translateX(320px) scale(0.85) translateZ(-50px) rotateY(-20deg);
        z-index: 5;
    }

    /* Side cards should always be clickable with priority */
    .carousel-card.prev,
    .carousel-card.next {
        cursor: pointer;
        pointer-events: auto;
        z-index: 5;
    }

    /* Hover effects for side cards - priority z-index and clear visibility */
    .carousel-card.prev:hover,
    .carousel-card.next:hover {
        opacity: 0.95;
        filter: blur(0) grayscale(0);
        z-index: 100;
        /* Priority over center card */
    }

    .carousel-card.prev:hover {
        transform: translateX(-320px) scale(0.9) translateZ(120px) rotateY(10deg);
    }

    .carousel-card.next:hover {
        transform: translateX(320px) scale(0.9) translateZ(120px) rotateY(-10deg);
    }
}

/* Splash Screen 3D Animation */
@keyframes spin3d {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }

    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

@-webkit-keyframes spin3d {
    0% {
        -webkit-transform: perspective(1000px) rotateY(0deg);
    }

    100% {
        -webkit-transform: perspective(1000px) rotateY(360deg);
    }
}

#splash-screen img {
    border-radius: 50%;
    /* Circular */
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    /* Glow effect */
    animation: spin3d 3s linear infinite;
    /* Continuous 3D rotation */
}

/* Create the gradient border effect using a pseudo-element behind the card content */
.animated-border-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #ffeaa7, #FFD700, #b8860b);
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 22px;
    /* Slightly larger radius */
    animation: borderAnimation 3s ease infinite;
}

/* Inner card background to cover the center of gradient */
.animated-border-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    z-index: -1;
    border-radius: 20px;
}

@keyframes borderAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Building Image Hover Effect */
.hover-effect {
    transition: all 0.5s ease;
}

.hover-effect:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.5) !important;
    z-index: 10;
    cursor: pointer;
}